Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Add debian packaging of radicle-httpd
Open did:key:z6MkexLU...8Bd3 opened 10 months ago
3 files changed +57 -5 56f27ff8 57871442
modified radicle-httpd/debian/control
@@ -11,5 +11,8 @@ 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.
+
Description: HTTP API daemon for Radicle peer-to-peer code collaboration
+
 This package provides a standalone HTTP API service for interacting with
+
 Radicle's distributed storage and peer-to-peer network. It enables external
+
 tools and applications to access, query, and manage Radicle data over HTTP.
+
 .
modified radicle-httpd/debian/rules
@@ -6,11 +6,11 @@ DEB_BUILD_OPTIONS=nostrip
	dh $@

override_dh_auto_build:
-
	scripts/build-man-pages.sh . *.adoc
+
	../scripts/build-man-pages.sh . *.adoc

override_dh_auto_install:
-
	mkdir -p debian/radicle/usr
-
	cargo install --offline --locked --root=debian/radicle-httpd/usr
+
	mkdir -p debian/radicle-httpd/usr
+
	cargo install --offline --locked --root=debian/radicle-httpd/usr --path .
	find debian/radicle-httpd -name '.crates*' -delete

override_dh_auto_test:
added scripts/build-man-pages.sh
@@ -0,0 +1,49 @@
+
#!/bin/sh
+

+
set -e
+

+
# Attempt to install `asciidoctor` on Debian, Arch Linux and MacOS.
+
install() {
+
  os="$(uname)"
+

+
  case "$os" in
+
    Linux)
+
      if command -v apt-get >/dev/null 2>&1; then
+
        # Debian
+
        apt-get update
+
        apt-get install -y asciidoctor
+
      elif command -v pacman >/dev/null 2>&1; then
+
        # Arch Linux
+
        pacman -Sy --noconfirm asciidoctor
+
      fi ;;
+
    Darwin) # MacOS
+
      if command -v brew >/dev/null 2>&1; then
+
        brew install asciidoctor
+
      fi ;;
+
    *)
+
      echo "fatal: unknown operating system: $os"
+
      exit 1 ;;
+
  esac
+
}
+

+
main() {
+
  if [ $# -lt 2 ]; then
+
    echo "usage: $0 <output-dir> <input-file>..."
+
    exit 1
+
  fi
+

+
  outdir="$1"
+
  shift
+

+
  if ! command -v asciidoctor >/dev/null 2>&1; then
+
    echo "Installing 'asciidoctor'.."
+
    install
+
  fi
+

+
  for input in "$@"; do
+
    echo "Building $input.."
+
    asciidoctor --doctype manpage --backend manpage --destination-dir "$outdir" "$input"
+
  done
+
}
+

+
main "$@"