]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
build: debian package
authortobtoht <tob@featherwallet.org>
Wed, 28 Jun 2023 18:23:37 +0000 (20:23 +0200)
committertobtoht <tob@featherwallet.org>
Wed, 28 Jun 2023 19:31:09 +0000 (21:31 +0200)
contrib/debian/control [new file with mode: 0644]
contrib/debian/make_deb.sh [new file with mode: 0644]
contrib/flatpak/make_flatpak.sh
contrib/guix/guix-build
contrib/guix/libexec/build.sh

diff --git a/contrib/debian/control b/contrib/debian/control
new file mode 100644 (file)
index 0000000..f89824f
--- /dev/null
@@ -0,0 +1,7 @@
+Package: feather
+Version: VERSION
+Description: Monero desktop wallet
+Maintainer: tobtoht <tob@featherwallet.org>
+Architecture: amd64
+Priority: optional
+Section: misc
diff --git a/contrib/debian/make_deb.sh b/contrib/debian/make_deb.sh
new file mode 100644 (file)
index 0000000..7784833
--- /dev/null
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+set -ex
+
+mkdir -p /output/debian
+cd /output/debian
+
+#.
+#├── control.tar.gz
+cp /feather/contrib/debian/control .
+sed -i "s/VERSION/${VERSION}/" control
+touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" control
+tar -czvf control.tar.gz control
+rm control
+
+#├── data.tar.gz
+mkdir data
+cd data
+
+mkdir -p usr/bin
+cd usr/bin
+# copy feather binary
+cp /feather-bin feather
+cd ../..
+
+find . -print0 | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
+tar -czvf ../data.tar.gz .
+
+cd /output/debian
+chmod -R 755 data
+rm -rf data
+
+#└── debian-binary
+echo "2.0" > debian-binary
+
+ar r "feather_${VERSION}-1_amd64.deb" debian-binary control.tar.gz data.tar.gz
+rm debian-binary control.tar.gz data.tar.gz
\ No newline at end of file
index eeee508f73eaf6ccc32ed4137cfd44debcc19a5f..ee691c876daa2b95667d73c72139a8e939d248bd 100644 (file)
@@ -24,8 +24,8 @@ cp /feather/contrib/flatpak/metadata .
 mkdir files
 cd files
 
-# Extract feather binary
-unzip /feather-zip
+# Copy feather binary
+cp /feather-bin feather
 
 # Copy metadata
 cp -a /feather/contrib/flatpak/share .
index a977977e81f9e6d29ee367aa9dbd83523de90484..422ae9dcba9081674c1af6891d7047576e94e0ec 100755 (executable)
@@ -447,27 +447,27 @@ EOF
 
         case "$OPTIONS" in
             pack)
-                FEATHER_ZIP="$(outdir_for_host "$host")/${DISTNAME}-pack.zip"
+                FEATHER_BIN="$(outdir_for_host "$host")/feather"
+                export VERSION=${VERSION}
                 time-machine pack -S /profile=. --manifest="${PWD}/contrib/guix/pack.scm"
                 PACK=$(time-machine pack --manifest="${PWD}/contrib/guix/pack.scm")
-                time-machine pack -R --manifest="${PWD}/contrib/guix/pack.scm"
-                RPACK=$(time-machine pack -R --manifest="${PWD}/contrib/guix/pack.scm")
                 time-machine environment --ad-hoc unzip tar gzip findutils grep patchelf coreutils-minimal bash binutils sed \
                                          --container \
                                          --pure \
                                          --no-cwd \
                                          --share="$PWD"=/feather \
                                          --share="$PACK"=/pack \
-                                         --share="$RPACK"=/rpack \
                                          --share="$(outdir_for_host "$host")"=/output \
-                                         --share="$FEATHER_ZIP"=/feather-zip \
+                                         --share="$FEATHER_BIN"=/feather-bin \
                                          --keep-failed \
                                          --fallback \
                                          --user="user" \
                                          ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
                                          ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
                                          -- env SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
+                                                VERSION="$VERSION" \
                                          bash -c "cd /feather && \
+                                                  bash contrib/debian/make_deb.sh && \
                                                   bash contrib/flatpak/make_flatpak.sh"
                 ;;
         esac
index 631495e78030dad6018178d8482501d5acab9f26..c138833411013c02dd7728d0b43d10c5d2bf47ab 100755 (executable)
@@ -434,10 +434,7 @@ mkdir -p "$DISTSRC"
                 else
                     find . -print0 \
                         | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
-                    find . \
-                        | sort \
-                        | zip -X@ "${OUTDIR}/${DISTNAME}-pack.zip" \
-                        || ( rm -f "${OUTDIR}/${DISTNAME}-pack.zip" && exit 1 )
+                    cp feather "${OUTDIR}"
                 fi
                 ;;
             *darwin*)