mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
build: debian package
This commit is contained in:
parent
04f7fa16f7
commit
2ec4a05780
5 changed files with 51 additions and 11 deletions
7
contrib/debian/control
Normal file
7
contrib/debian/control
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Package: feather
|
||||||
|
Version: VERSION
|
||||||
|
Description: Monero desktop wallet
|
||||||
|
Maintainer: tobtoht <tob@featherwallet.org>
|
||||||
|
Architecture: amd64
|
||||||
|
Priority: optional
|
||||||
|
Section: misc
|
36
contrib/debian/make_deb.sh
Normal file
36
contrib/debian/make_deb.sh
Normal file
|
@ -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
|
|
@ -24,8 +24,8 @@ cp /feather/contrib/flatpak/metadata .
|
||||||
mkdir files
|
mkdir files
|
||||||
cd files
|
cd files
|
||||||
|
|
||||||
# Extract feather binary
|
# Copy feather binary
|
||||||
unzip /feather-zip
|
cp /feather-bin feather
|
||||||
|
|
||||||
# Copy metadata
|
# Copy metadata
|
||||||
cp -a /feather/contrib/flatpak/share .
|
cp -a /feather/contrib/flatpak/share .
|
||||||
|
|
|
@ -447,27 +447,27 @@ EOF
|
||||||
|
|
||||||
case "$OPTIONS" in
|
case "$OPTIONS" in
|
||||||
pack)
|
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"
|
time-machine pack -S /profile=. --manifest="${PWD}/contrib/guix/pack.scm"
|
||||||
PACK=$(time-machine pack --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 \
|
time-machine environment --ad-hoc unzip tar gzip findutils grep patchelf coreutils-minimal bash binutils sed \
|
||||||
--container \
|
--container \
|
||||||
--pure \
|
--pure \
|
||||||
--no-cwd \
|
--no-cwd \
|
||||||
--share="$PWD"=/feather \
|
--share="$PWD"=/feather \
|
||||||
--share="$PACK"=/pack \
|
--share="$PACK"=/pack \
|
||||||
--share="$RPACK"=/rpack \
|
|
||||||
--share="$(outdir_for_host "$host")"=/output \
|
--share="$(outdir_for_host "$host")"=/output \
|
||||||
--share="$FEATHER_ZIP"=/feather-zip \
|
--share="$FEATHER_BIN"=/feather-bin \
|
||||||
--keep-failed \
|
--keep-failed \
|
||||||
--fallback \
|
--fallback \
|
||||||
--user="user" \
|
--user="user" \
|
||||||
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
|
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
|
||||||
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
|
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
|
||||||
-- env SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
|
-- env SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
|
||||||
|
VERSION="$VERSION" \
|
||||||
bash -c "cd /feather && \
|
bash -c "cd /feather && \
|
||||||
|
bash contrib/debian/make_deb.sh && \
|
||||||
bash contrib/flatpak/make_flatpak.sh"
|
bash contrib/flatpak/make_flatpak.sh"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -434,10 +434,7 @@ mkdir -p "$DISTSRC"
|
||||||
else
|
else
|
||||||
find . -print0 \
|
find . -print0 \
|
||||||
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
|
| xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
|
||||||
find . \
|
cp feather "${OUTDIR}"
|
||||||
| sort \
|
|
||||||
| zip -X@ "${OUTDIR}/${DISTNAME}-pack.zip" \
|
|
||||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-pack.zip" && exit 1 )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
|
|
Loading…
Reference in a new issue