|
|
|
@ -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
|
|
|
|
|
# Base package (tdelibs ...)
|
|
|
|
|
eval VERSION="${pkg_version}_${pkg_release/0_/\~}"
|
|
|
|
|
# Likely core package
|
|
|
|
|
eval VERSION="${pkg_version}${pkg_release/0_/\~}"
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
# 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
|
|
|
|
|