index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-09-28 17:39:19 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-28 17:39:19 +0200 |
commit | 6ab3f17aa9cc512db8e643014cf5a3051f5587bd (patch) | |
tree | 14302ad9d07fb06e97494246f6823a7d32b2eee4 | |
parent | d79aaf42d898df61254d016a9f8d71e158501fe5 (diff) |
-rwxr-xr-x | lib/common-functions | 2 | ||||
-rw-r--r-- | misc/PKGBUILD-appendix-for-archive-server | 32 |
diff --git a/lib/common-functions b/lib/common-functions index 34a3bf6..e9585a4 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -499,6 +499,8 @@ extract_source_directory() { tar -x --strip-components=3 -C "${output}" printf '\n' >> \ "${output}/PKGBUILD" + cat "${base_dir}/misc/PKGBUILD-appendix-for-archive-server" >> \ + "${output}/PKGBUILD" fi if [ -n "${PKGBUILD_mod}" ]; then diff --git a/misc/PKGBUILD-appendix-for-archive-server b/misc/PKGBUILD-appendix-for-archive-server new file mode 100644 index 0000000..3fcb5ba --- /dev/null +++ b/misc/PKGBUILD-appendix-for-archive-server @@ -0,0 +1,32 @@ +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@ + 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=' + infos="${infos#* }" + printf '%s' "${infos%% *}" | \ + base64 -w0 | \ + sed 's/=/%3D/g' + infos="${infos#* }" + if [ "${infos%% *}" = 'signed' ]; then + infos="${infos#* }" + printf '&valid_keys=' + printf '%s,' "${validpgpkeys[@]}" | \ + sed 's/,$//' + fi + printf '&%s\n' "${infos}" + ) + fi +done |