summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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