Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-04 10:41:24 +0200
committerErich Eckner <git@eckner.net>2018-09-04 10:41:24 +0200
commite8989364d703974ce2b968a0c2f2249a61f423f2 (patch)
tree630e1394025741c2b9254fd4f0df20f600a64a1d
parentbbe86f0b49e5324f0ef684707beb08a31701f0d3 (diff)
bin/build-packages: save versions of required python and perl
-rwxr-xr-xbin/build-packages23
1 files changed, 22 insertions, 1 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 5d107d1..ea4cdec 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -500,7 +500,7 @@ while [ "${count}" -ne 0 ] && \
done
>&2 printf 'searching for required and more provided libraries\n'
package_content_dir=$(mktemp -d "${tmp_dir}/package-content.XXXXXX")
- # TODO: qt, perl and python versions should be added here, too
+ # TODO: qt version should be added here, too
find "${tar_content_dir}" -maxdepth 1 \
-name '*.pkg.tar.xz' | \
while read -r pkgfile; do
@@ -548,6 +548,27 @@ while [ "${count}" -ne 0 ] && \
find "${package_content_dir:?}/${pkgfile##*/}" -xdev -exec chmod 777 '{}' \;
rm -rf --one-file-system "${package_content_dir:?}/${pkgfile##*/}"
fi
+ tar -tJf "${pkgfile}" 2>/dev/null | \
+ sed -n '
+ s,^usr/lib/python\([^/]\+\)/$,python \1,
+ t print
+ s,^usr/lib/perl[^/]\+/\([^/]\+\)/$,perl \1,
+ t print
+ b
+ :print
+ s/\./ /
+ p
+ ' | \
+ while read -r name major_version minor_version; do
+ printf '%s>=%s.%s\n%s<%s.%s\n' \
+ "${name}" \
+ "${major_version}" \
+ "${minor_version}" \
+ "${name}" \
+ "${major_version}" \
+ "$((minor_version+1))"
+ done >> \
+ "${pkgfile}.so.needs"
done
>&2 printf 'running namcap ...'
if [ "${repository}" = 'multilib' ]; then