--- /dev/null
+#!/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
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
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*)