From 6ed25f26baf57115f8907966b0e170cef55f2a81 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 27 Oct 2024 14:10:34 -0400 Subject: Add initial setup --- bin/package | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 bin/package (limited to 'bin/package') diff --git a/bin/package b/bin/package new file mode 100755 index 0000000..837dfbf --- /dev/null +++ b/bin/package @@ -0,0 +1,41 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +set -eu + +test $# = 2 || { + cat >&2 <<-EOF +usage: $0 + +Create 'builds/git-annex--linux-amd64.tar.gz' from +files under ./git-annex/, most importantly the git-annex binary under +cabal's build directory for and . +EOF + exit 2 +} + +version_ghc=$1 +version_annex=$2 + +cabal_root=git-annex/dist-newstyle/build/x86_64-linux +binary=$cabal_root/ghc-$version_ghc/git-annex-$version_annex/build/git-annex/git-annex + +pkg_root=builds/git-annex-$version_annex +mkdir -p "$pkg_root" + +pkg_bin=$pkg_root/bin +mkdir "$pkg_bin" +cp "$binary" "$pkg_bin"/ +ln -s git-annex "$pkg_bin"/git-annex-shell +ln -s git-annex "$pkg_bin"/git-remote-annex +ln -s git-annex "$pkg_bin"/git-remote-tor-annex + +cp git-annex/COPYRIGHT "$pkg_root"/ + +pkg_man=$pkg_root/share/man/man1 +mkdir -p "$pkg_man" +cp git-annex/man/*.1 "$pkg_man"/ +gzip -9 "$pkg_man"/*.1 + +tar czf "$pkg_root"-linux-amd64.tar.gz -C builds git-annex-"$version_annex" +rm -r "$pkg_root" -- cgit v1.2.3