Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/common-functions32
1 files changed, 30 insertions, 2 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 6cf0231..ce3f75b 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -322,6 +322,9 @@ make_source_info() {
( # the new shell is intentional
+ local epoch
+ local pkgver
+
tmp_dir=$(mktemp -d "${work_dir}/tmp.make_source_info.XXXXXX")
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
@@ -336,8 +339,33 @@ make_source_info() {
makepkg --printsrcinfo
cd ..
} > \
- "${output}" || \
- rm -f "${output}"
+ "${tmp_dir}/SRCINFO"
+
+ unset epoch
+ unset pkgver
+ eval "$(
+ sed -n '
+ s/^\t\(epoch\|pkgver\) = /\1=/
+ T
+ p
+ ' "${tmp_dir}/SRCINFO"
+ )"
+ sed -i '
+ /^pkgname = /! b
+ /= gtk-doc$/ b
+ s/= \(openjdk[0-9]\+\)-doc$/\0\n\tdepends = \1-src/
+ t append_version
+ s/= \(qt5\)-doc$/\0\n\tdepends = \1-base/
+ t append_version
+ s/= \(\S\+\)-i18n-\S\+$/\0\n\tdepends = \1/
+ t append_version
+ b
+ :append_version
+ s/$/='"${epoch}${epoch+:}${pkgver}"'/
+ ' "${tmp_dir}/SRCINFO"
+
+ cat "${tmp_dir}/SRCINFO" > \
+ "${output}"
)