diff options
author | François Andriot <albator78@libertysurf.fr> | 2022-05-18 21:29:06 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2022-05-20 09:50:17 +0200 |
commit | 7f790f695d457b930486f1981ffb252cc09a74b1 (patch) | |
tree | cb4a09dd04c1e31f85b612054560e81b32eac526 /redhat/build/get_source_files.sh | |
parent | a9a0aa144af42eead9c2a04101385411ca42d98e (diff) | |
download | tde-packaging-7f790f695d457b930486f1981ffb252cc09a74b1.tar.gz tde-packaging-7f790f695d457b930486f1981ffb252cc09a74b1.zip |
RPM: update build scripts
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/build/get_source_files.sh')
-rwxr-xr-x | redhat/build/get_source_files.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/redhat/build/get_source_files.sh b/redhat/build/get_source_files.sh index d6c43b0e4..1b0463e4c 100755 --- a/redhat/build/get_source_files.sh +++ b/redhat/build/get_source_files.sh @@ -8,13 +8,12 @@ DIST="$3" SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION}) SPECDIR="${SPECFILE%/*}" RPMPKGNAME="$(get_rpm_package_name.sh ${PKGNAME})" - [ ! -r "${SPECFILE}" ] && exit 2 while read var val; do case "${var}" in Version:*) VERSION="${val}";; - Source[0-9]*:|Source:|Patch[0-9]*:) + Source*:|Source:|Patch[0-9]*:) FILE="${SPECDIR}/${val##*/}" if [ "${DIST}" = "any" ] && [ "${var//%\{?dist\}/}" = "${var}" ]; then FILES="${FILE//%\{?dist\}/.}"* @@ -23,12 +22,15 @@ while read var val; do fi for FILE in $FILES; do - file=$(rpm --define "tde_pkg ${PKGNAME}" \ - --define "tde_version ${TDE_VERSION}" \ - --define "name ${RPMPKGNAME}" \ - --define "version ${VERSION}" \ - --define "dist ${DIST:-$(rpm -E %dist)}" \ - -E "${FILE}") + for name in ${RPMPKGNAME} ${PKGNAME} trinity-${PKGNAME}; do + file=$(rpm --define "tde_pkg ${PKGNAME}" \ + --define "tde_version ${TDE_VERSION}" \ + --define "name ${name}" \ + --define "version ${VERSION}" \ + --define "dist ${DIST:-$(rpm -E %dist)}" \ + -E "${FILE}") + [ -r "${file}" ] && break + done [ -r "${file}" ] && echo "${file}" done ;; |