Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/create-build-support-package
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-04 15:43:01 +0200
committerErich Eckner <git@eckner.net>2019-04-04 15:43:01 +0200
commit75c9b800f12d9a7245e2bc7925c08eb33972624e (patch)
tree757a2b661952fdf9d757113181e04c39efd0c9fe /bin/create-build-support-package
parentc4cdd7b51f448f0a21d9451407d33b8de329047e (diff)
bin/create-build-support-package: --only-versioned-so-provides new - this should create a shim package which needs to be installed beside the original one in a different version
Diffstat (limited to 'bin/create-build-support-package')
-rwxr-xr-xbin/create-build-support-package25
1 files changed, 24 insertions, 1 deletions
diff --git a/bin/create-build-support-package b/bin/create-build-support-package
index 65f880d..7a0db32 100755
--- a/bin/create-build-support-package
+++ b/bin/create-build-support-package
@@ -17,6 +17,8 @@ usage() {
>&2 echo ' Operate on repository of given architecture.'
>&2 echo ' -h|--help:'
>&2 echo ' Show this help and exit.'
+ >&2 echo ' --only-versioned-so-provides:'
+ >&2 echo ' Remove all but versioned *.so provide entries. (only with --from)'
>&2 echo ' -w|--wait:'
>&2 echo ' Wait for lock if necessary.'
[ -z "$1" ] && exit 1 || exit "$1"
@@ -27,12 +29,14 @@ eval set -- "$(
--long arch: \
--long from: \
--long help \
+ --long only-versioned-so-provides \
--long shim: \
--long wait \
-n "$(basename "$0")" -- "$@" || \
echo usage
)"
+only_versioned_so_provides=false
repo_arch=''
shim_package=''
source_package=''
@@ -58,6 +62,9 @@ while true; do
-h|--help)
usage 0
;;
+ --only-versioned-so-provides)
+ only_versioned_so_provides=true
+ ;;
--shim)
if [ -n "${shim_package}" ]; then
>&2 prinf -- '--shim given more than once.\n'
@@ -88,6 +95,12 @@ if [ -n "${source_package}" ] \
usage
fi
+if ${only_versioned_so_provides} \
+ && [ -n "${shim_package}" ]; then
+ >&2 echo 'Conflicting parameters: --shim and --only-versioned-so-provides'
+ usage
+fi
+
exec 9> "${sanity_check_lock_file}"
verbose_flock -s ${wait_for_lock} 9
@@ -164,9 +177,19 @@ if [ -n "${source_package}" ]; then
# TODO: mangle customizable meta-infos here (new provides, keep some
# depends)
sed -i '
- /^pkgname = / s/ \S\+$/\0-shim\nprovides =\0/
/^depend = /d
' "${tmp_dir}/content/.PKGINFO"
+ if ${only_versioned_so_provides}; then
+ sed -i '
+ /^provides = / {
+ / = \S\+\.so=/ ! d
+ }
+ ' "${tmp_dir}/content/.PKGINFO"
+ else
+ sed -i '
+ /^pkgname = / s/ \S\+$/\0-shim\nprovides =\0/
+ ' "${tmp_dir}/content/.PKGINFO"
+ fi
# from /usr/bin/makepkg
list_package_files() {