index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-26 09:05:07 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-26 09:05:07 +0200 |
commit | 261567c3a0ce3b2211dec99b29652a635f0230f9 (patch) | |
tree | 42257e16c50f3f79dc693435dedab76da5246fd2 /lib/common-functions | |
parent | dfda73807ee7e016e65fb298b54f5edc2880ecb5 (diff) |
-rwxr-xr-x | lib/common-functions | 32 |
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}" ) |