mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Add debian package builder
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
rm -f ../radicle-httpd*_*
|
||||
git clean -fdx
|
||||
|
||||
# Get name and version of source package.
|
||||
name="$(dpkg-parsechangelog -SSource)"
|
||||
version="$(dpkg-parsechangelog -SVersion)"
|
||||
|
||||
# Get upstream version: everything before the last dash.
|
||||
# shellcheck disable=SC2001
|
||||
uv="$(echo "$version" | sed 's/-[^-]*$//')"
|
||||
orig="${name}_${uv}.orig.tar.xz"
|
||||
|
||||
# Create a tar ball without the Debian packaging.
|
||||
tmp="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
git archive HEAD | tar -C "$tmp" -xf -
|
||||
rm -rf "$tmp/debian"
|
||||
tar -C "$tmp" -cf - . | xz >"../$orig"
|
||||
|
||||
# Actually build the package, without signing the .changes file.
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
# Dump some information to make it easier to visually verify
|
||||
# everything looks OK. Also, test the package with the lintian tool.
|
||||
arch="$(dpkg --print-architecture)"
|
||||
deb="../${name}_${version}_${arch}.deb"
|
||||
changes="../${name}_${version}_${arch}.changes"
|
||||
|
||||
ls -l "$deb"
|
||||
dpkg -c "$deb"
|
||||
lintian -i "$changes"
|
||||
@@ -0,0 +1 @@
|
||||
/* This file needs to exist, but can be empty. */
|
||||
@@ -0,0 +1,5 @@
|
||||
radicle-httpd (0.19.1-1) unstable; urgency=medium
|
||||
|
||||
* New release.
|
||||
|
||||
-- Sebastian Martinez <sebastian@rhizoma.dev> Fri, 6 Jun 2025 10:06:46 +0200
|
||||
@@ -0,0 +1,2 @@
|
||||
10
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Source: radicle-httpd
|
||||
Maintainer: The Radicle Team <team@radicle.xyz>
|
||||
Uploaders: Sebastian Martinez <sebastian@rhizoma.dev>
|
||||
Section: vcs
|
||||
Priority: optional
|
||||
Standards-Version: 4.6.2
|
||||
Build-Depends: debhelper (>= 10~),
|
||||
asciidoctor
|
||||
Homepage: https://radicle.xyz/
|
||||
|
||||
Package: radicle-httpd
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}, git
|
||||
Description: A Radicle HTTP daemon exposing a JSON HTTP API that allows
|
||||
someone to browse local repositories on a Radicle node via their web browser.
|
||||
@@ -0,0 +1,10 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: radicle-httpd
|
||||
Upstream-Contact: https://radicle.xyz/
|
||||
Source: https://app.radicle.xyz/seeds/seed.radicle.xyz
|
||||
|
||||
Files: *
|
||||
Copyright: 2019-2021, The Radicle Foundation
|
||||
License: Apache-2 or Expat
|
||||
License texts omitted, see LICENSE-APACHE and LICENSE-MIT in the
|
||||
source tree.
|
||||
@@ -0,0 +1 @@
|
||||
*.1 usr/share/man/man1
|
||||
@@ -0,0 +1,3 @@
|
||||
radicle-httpd binary: initial-upload-closes-no-bugs
|
||||
radicle-httpd binary: no-manual-page
|
||||
radicle-httpd binary: unstripped-binary-or-object
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
DEB_BUILD_OPTIONS=nostrip
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
asciidoctor --doctype manpage --backend manpage --destination-dir . *.adoc
|
||||
|
||||
override_dh_auto_install:
|
||||
mkdir -p debian/radicle/usr
|
||||
cargo install --offline --locked --root=debian/radicle-httpd/usr
|
||||
find debian/radicle-httpd -name '.crates*' -delete
|
||||
|
||||
override_dh_auto_test:
|
||||
echo tests are disabled, for now
|
||||
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
@@ -0,0 +1 @@
|
||||
radicle-httpd source: debian-rules-sets-DEB_BUILD_OPTIONS
|
||||
Reference in New Issue
Block a user