Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/repo
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-06-13 18:13:02 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-06-13 18:13:02 +0200
commit49e8c981ea3df771605c835e851a4b59beace085 (patch)
tree0f1d2a91f593623c6e22d4699981ba4f73379d31 /src/lib/repo
parente3dcd8923b4db2c45b62069361037f3328c95268 (diff)
pkgctl repo clone --arch32 does a Arch32 specific clone now
Diffstat (limited to 'src/lib/repo')
-rw-r--r--src/lib/repo/arch32.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/repo/arch32.sh b/src/lib/repo/arch32.sh
index 996630d..d1039ed 100644
--- a/src/lib/repo/arch32.sh
+++ b/src/lib/repo/arch32.sh
@@ -1,10 +1,26 @@
+# does local adaptions needed to build for Archlinux32
pkgctl_repo_patch_arch32() {
local pkgname="$1"
-
+
# add the remote branch with our patches
- git -C "${pkgname}" remote add -m master archlinux32 https://git.archlinux32.org/packages/
+ git -C "${pkgname}" remote add -m master archlinux32 git://git.archlinux32.org/packages
+ git -C "${pkgname}" fetch --depth 1 archlinux32
# extend architecture with our architecture
awk -i inplace '!/^arch=[^#]*any/ {gsub(/^arch=\(/,"arch=(i486 i686 pentium4 ")}; {print}' \
"${pkgname}/PKGBUILD"
+
+ # iterate the arch32 diffs in the archlinux32/master branch (we don't know
+ # the destination repo, so we just scan both 'core' and 'extra')
+ listfile=$(mktemp --tmpdir="${WORKDIR}" pkgctl-arch32.XXXXXXXXXX)
+ git -C "${pkgname}" ls-tree -r --name-only archlinux32/master "core/${pkgname}" >"${listfile}"
+ git -C "${pkgname}" ls-tree -r --name-only archlinux32/master "extra/${pkgname}" >>"${listfile}"
+ for file in $(cat "${listfile}"); do
+ if [[ "${file##*/}" = "PKGBUILD" ]]; then
+ printf "\n\n# -- Arch32 specific --\n\n" >> "${pkgname}/PKGBUILD"
+ git -C "${pkgname}" show archlinux32/master:"${file}" >> "${pkgname}/PKGBUILD"
+ else
+ git -C "${pkgname}" show archlinux32/master:"${file}" > "${pkgname}/${file##*/}"
+ fi
+ done
}