diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-10-29 10:23:46 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-10-29 10:23:46 +0200 |
commit | 0fea22281b1a30454afbb8728543f6383ca6a0ca (patch) | |
tree | aa0fdfe24b4433105b1a46998a5b90828291e7d1 /build-support/pacman-static/build-packages.sh | |
parent | e17223351da2abcc89fafb809bbd85484a1195ed (diff) | |
download | packages-0fea22281b1a30454afbb8728543f6383ca6a0ca.tar.xz |
added pacman-static to build-support
Diffstat (limited to 'build-support/pacman-static/build-packages.sh')
-rwxr-xr-x | build-support/pacman-static/build-packages.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/build-support/pacman-static/build-packages.sh b/build-support/pacman-static/build-packages.sh new file mode 100755 index 00000000..b1eb05a2 --- /dev/null +++ b/build-support/pacman-static/build-packages.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# requires devtools, devtools32 (for extra-i686-build) +# if debug variants of extra-* exist, use them (I have a custom script for this) + +rm -rf artifacts/ + +for buildarch in x86_64 i686; do + extradir=artifacts/${buildarch}-extracted + + if command -v debug-${buildarch}-build; then + debug-${buildarch}-build + else + extra-${buildarch}-build + fi + + CARCH=${buildarch} makepkg --packagelist | while read -r pkgfile; do + if bsdtar -tf "${pkgfile}" usr/bin/pacman-static > /dev/null 2>&1; then + mkdir -p ${extradir} + bsdtar --strip-components 2 -C ${extradir} -xf "${pkgfile}" usr/bin/pacman-static + break + fi + done + + xz -ke ${extradir}/pacman-static + gpg --detach-sign ${extradir}/pacman-static + gpg --detach-sign ${extradir}/pacman-static.xz +done |