index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | extra/python-xcffib/PKGBUILD | 5 | ||||
-rwxr-xr-x | extra/python-xcffib/xcffibgen-custom | 33 |
diff --git a/extra/python-xcffib/PKGBUILD b/extra/python-xcffib/PKGBUILD new file mode 100644 index 00000000..a27ac98c --- /dev/null +++ b/extra/python-xcffib/PKGBUILD @@ -0,0 +1,5 @@ +source+=('xcffibgen-custom') +sha512sums+=('9743d6edbd878a9d8896fb693c6847fedfcbc4324a575e4df4e833db09282791e362b51d4b07621674920a43b14c59d193409ab3d3e759cf48f5fa59fa871410') +makedepends=(${makedepends[@]//haskell-xcffib/}) +makedepends+=('archlinux-keyring' 'pacman') +eval "$(declare -f build | sed 's@GEN=xcffibgen@GEN="../xcffibgen-custom $pkgver-$pkgrel"@')" diff --git a/extra/python-xcffib/xcffibgen-custom b/extra/python-xcffib/xcffibgen-custom new file mode 100755 index 00000000..9e23f120 --- /dev/null +++ b/extra/python-xcffib/xcffibgen-custom @@ -0,0 +1,33 @@ +#!/usr/bin/env -S bash -x +mirror='http://ftp.otenet.gr/linux/archlinux' + +# Strip arch32 specific part of the version string +version="${1%.*}" +shift + +while [[ $# -gt 0 ]]; do + if [[ $1 == '--output' ]]; then + output="$2" + shift + shift + elif [[ $1 == '--input' ]]; then + input="$2" + shift + shift + fi +done + +curl --fail -O "${mirror}/extra/os/x86_64/python-xcffib-${version}-any.pkg.tar.zst" +curl --fail -O "${mirror}/extra/os/x86_64/python-xcffib-${version}-any.pkg.tar.zst.sig" + +if pacman-key -v "python-xcffib-${version}-any.pkg.tar.zst.sig" "python-xcffib-${version}-any.pkg.tar.zst"; then + tar -xf "python-xcffib-${version}-any.pkg.tar.zst" + + pyver=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') + tarpath="usr/lib/python${pyver}/site-packages/xcffib/" + + mapfile -t files < <(find "$input" -type f -name '*.xml' -printf "${tarpath}%f\n" | sed 's/xml$/py/') + + mkdir -p "$output" + cp "${files[@]}" "$output" || true +fi |