summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-08-26 10:29:27 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2021-11-01 21:50:17 +0100
commite6509d6af9963eed78bac8596cd9f4698a2d11e6 (patch)
tree8706e191e3e9afc1a37ca8a9c2093a7812b3b51b /redhat/build
parent2a76de9cd079cdf6900cf7dfc0f9c8eacba016d7 (diff)
downloadtde-packaging-e6509d6af9963eed78bac8596cd9f4698a2d11e6.tar.gz
tde-packaging-e6509d6af9963eed78bac8596cd9f4698a2d11e6.zip
RPM: update for opensuse tumbleweed
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/get_latest_built_package_version.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/redhat/build/get_latest_built_package_version.sh b/redhat/build/get_latest_built_package_version.sh
index ee4514725..76330566a 100755
--- a/redhat/build/get_latest_built_package_version.sh
+++ b/redhat/build/get_latest_built_package_version.sh
@@ -13,11 +13,24 @@ pkg_version="$(rpm -qp --qf "%{version}" "${RPM}")"
pkg_release="$(rpm -qp --qf "%{release}" "${RPM}")"
# Application packages: version does not match TDE version
-if [[ "${pkg_release}" =~ _0_ ]] || [[ "${pkg_release}" =~ ${TDE_VERSION}_ ]] ; then
- eval VERSION="${pkg_release/_0_/\~}"
+if [[ "${pkg_release}" =~ ^0_ ]]; then
+ # Preversion
+ if [[ "${pkg_release}" =~ ${TDE_VERSION}_ ]] ; then
+ # Likely application package
+ eval VERSION="${pkg_release/0_/\~}"
+ else
+ # Likely core package
+ eval VERSION="${pkg_version}${pkg_release/0_/\~}"
+ fi
else
- # Base package (tdelibs ...)
- eval VERSION="${pkg_version}_${pkg_release/0_/\~}"
+ # Stable version
+ if [[ "${pkg_release}" =~ ${TDE_VERSION}_ ]] ; then
+ # Likely application package
+ eval VERSION="${pkg_release/_*/}"
+ else
+ # Likely core package
+ eval VERSION="${pkg_version}"
+ fi
fi
VERSION="${VERSION%.opt}" # Remove '.opt' suffix