Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/misc/PKGBUILD-appendix-for-archive-server
diff options
context:
space:
mode:
Diffstat (limited to 'misc/PKGBUILD-appendix-for-archive-server')
-rw-r--r--misc/PKGBUILD-appendix-for-archive-server64
1 files changed, 48 insertions, 16 deletions
diff --git a/misc/PKGBUILD-appendix-for-archive-server b/misc/PKGBUILD-appendix-for-archive-server
index 3fcb5ba..b2bdf79 100644
--- a/misc/PKGBUILD-appendix-for-archive-server
+++ b/misc/PKGBUILD-appendix-for-archive-server
@@ -2,31 +2,63 @@ for ((i=0; i<${#source[@]}; i++)); do
infos=$(
printf '%s\n' "${source[${i}]}" | \
sed -n '
- s@^\([^:]\+\)::git+\(https://git\.archlinux\.org/linux.git\)?\(signed\)#\(tag=\S\+\)$@\1 \2 \3 \4@
+ s@^\(\([^:]\+\)::\)\?git+\('"$(
+ printf '%s\|' \
+ 'https://git.archlinux.org/linux.git' \
+ 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git' \
+ 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' \
+ 'https://github.com/zen-kernel/zen-kernel' | \
+ sed '
+ s/\\|$//
+ s/[.]/[.]/g
+ '
+ )"'\)\(?signed\)\?#\(\(tag\|commit\)=\S\+\)$@\2 \3 \4 \5@
T
p
'
)
if [ -n "${infos}" ]; then
source[${i}]=$(
- printf '%s.tar.gz::https://archive-server.archlinux32.org/?p=' \
- "${infos%% *}"
- printf '%s/' "${infos%% *}" | \
- base64 -w0 | \
- sed 's/=/%3D/g'
- printf '&r='
+ if [ -n "${infos%% *}" ]; then
+ prefix="${infos%% *}"
+ else
+ prefix=''
+ fi
+ infos="${infos#* }"
+ repo="${infos%% *}"
+ repo64=$(
+ printf '%s' "${repo}" | \
+ base64 -w0 | \
+ sed 's/=/%3D/g'
+ )
infos="${infos#* }"
- printf '%s' "${infos%% *}" | \
- base64 -w0 | \
- sed 's/=/%3D/g'
+ if [ "${infos%% *}" = '?signed' ]; then
+ key_check=$(
+ printf '&valid_keys='
+ printf '%s,' "${validpgpkeys[@]}" | \
+ sed 's/,$//'
+ )
+ else
+ key_check=''
+ fi
infos="${infos#* }"
- if [ "${infos%% *}" = 'signed' ]; then
- infos="${infos#* }"
- printf '&valid_keys='
- printf '%s,' "${validpgpkeys[@]}" | \
- sed 's/,$//'
+ if [ -z "${prefix}" ]; then
+ prefix="${repo%.git}"
+ prefix="${prefix##*/}"
fi
- printf '&%s\n' "${infos}"
+ prefix_64=$(
+ printf '%s/' "${prefix}" | \
+ base64 -w0 | \
+ sed 's/=/%3D/g'
+ )
+
+ printf '%s-%s.tar.gz::https://archive-server.archlinux32.org/?p=%s&r=%s%s&%s\n' \
+ "${prefix}" \
+ "${pkgver}" \
+ "${prefix_64}" \
+ "${repo64}" \
+ "${key_check}" \
+ "${infos}"
)
fi
done