diff --git a/radicle-httpd/debian/build-deb b/radicle-httpd/debian/build-deb new file mode 100755 index 000000000..c7b469744 --- /dev/null +++ b/radicle-httpd/debian/build-deb @@ -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" diff --git a/radicle-httpd/debian/cargo-checksum.json b/radicle-httpd/debian/cargo-checksum.json new file mode 100644 index 000000000..6852d00f5 --- /dev/null +++ b/radicle-httpd/debian/cargo-checksum.json @@ -0,0 +1 @@ +/* This file needs to exist, but can be empty. */ diff --git a/radicle-httpd/debian/changelog b/radicle-httpd/debian/changelog new file mode 100644 index 000000000..8054a0ac1 --- /dev/null +++ b/radicle-httpd/debian/changelog @@ -0,0 +1,5 @@ +radicle-httpd (0.19.1-1) unstable; urgency=medium + + * New release. + + -- Sebastian Martinez Fri, 6 Jun 2025 10:06:46 +0200 diff --git a/radicle-httpd/debian/compat b/radicle-httpd/debian/compat new file mode 100644 index 000000000..021ea30c0 --- /dev/null +++ b/radicle-httpd/debian/compat @@ -0,0 +1,2 @@ +10 + diff --git a/radicle-httpd/debian/control b/radicle-httpd/debian/control new file mode 100644 index 000000000..9e759c6b6 --- /dev/null +++ b/radicle-httpd/debian/control @@ -0,0 +1,15 @@ +Source: radicle-httpd +Maintainer: The Radicle Team +Uploaders: Sebastian Martinez +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. diff --git a/radicle-httpd/debian/copyright b/radicle-httpd/debian/copyright new file mode 100644 index 000000000..bd192c0a6 --- /dev/null +++ b/radicle-httpd/debian/copyright @@ -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. diff --git a/radicle-httpd/debian/install b/radicle-httpd/debian/install new file mode 100644 index 000000000..7e79e07c7 --- /dev/null +++ b/radicle-httpd/debian/install @@ -0,0 +1 @@ +*.1 usr/share/man/man1 diff --git a/radicle-httpd/debian/lintian-overrides b/radicle-httpd/debian/lintian-overrides new file mode 100644 index 000000000..61469cb32 --- /dev/null +++ b/radicle-httpd/debian/lintian-overrides @@ -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 diff --git a/radicle-httpd/debian/rules b/radicle-httpd/debian/rules new file mode 100755 index 000000000..68db11972 --- /dev/null +++ b/radicle-httpd/debian/rules @@ -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 diff --git a/radicle-httpd/debian/source/format b/radicle-httpd/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/radicle-httpd/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/radicle-httpd/debian/source/lintian-overrides b/radicle-httpd/debian/source/lintian-overrides new file mode 100644 index 000000000..650c1e11b --- /dev/null +++ b/radicle-httpd/debian/source/lintian-overrides @@ -0,0 +1 @@ +radicle-httpd source: debian-rules-sets-DEB_BUILD_OPTIONS