index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/create-build-support-package | 25 |
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() { |