summaryrefslogtreecommitdiff
path: root/build-support/pacman-static/build-packages.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-support/pacman-static/build-packages.sh')
-rwxr-xr-xbuild-support/pacman-static/build-packages.sh28
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