summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2015-12-31 20:52:20 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2015-12-31 20:52:20 +0100
commitf6e9b2b948aabfced76ea1901a0aec608c020c11 (patch)
treea4e40234488c38d8fa71bc10754097585896195a /redhat/build
parentcc979ff6d7f7c2bb91c4d9450b38ad25d3b89d72 (diff)
downloadtde-packaging-f6e9b2b948aabfced76ea1901a0aec608c020c11.tar.gz
tde-packaging-f6e9b2b948aabfced76ea1901a0aec608c020c11.zip
RPM packaging: update build scripts
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/get_spec_version.sh1
-rwxr-xr-xredhat/build/is_latest_package_installed.sh5
2 files changed, 4 insertions, 2 deletions
diff --git a/redhat/build/get_spec_version.sh b/redhat/build/get_spec_version.sh
index 0980fd239..fc3b1e085 100755
--- a/redhat/build/get_spec_version.sh
+++ b/redhat/build/get_spec_version.sh
@@ -12,6 +12,7 @@ SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
VERSION=$(sed -n "/^Version:/ s/Version:[ ]*//p" ${SPECFILE})
RELEASE=$(sed -n "/^Release:/ s/Release:[ ]*//p" ${SPECFILE})
VERSION=$(rpm -E "${VERSION}")
+VERSION=$(rpm --define "tde_version ${TDE_VERSION}" -E "${VERSION}")
RELEASE=$(rpm --define "tde_version ${TDE_VERSION}" -E "${RELEASE}")
RELEASE=${RELEASE%$(rpmdist.sh --dist)}
diff --git a/redhat/build/is_latest_package_installed.sh b/redhat/build/is_latest_package_installed.sh
index ab04bd8f7..7923eca50 100755
--- a/redhat/build/is_latest_package_installed.sh
+++ b/redhat/build/is_latest_package_installed.sh
@@ -8,8 +8,9 @@ TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})
SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION})
# Package containing "~" (e.g. R14 preversion tarballs):
-if [ "${INSTALLED/\~/}" != "${INSTALLED}" ]; then
- if [ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then
+if [ "${TARBALL/\~/}" != "${TARBALL}" ]; then
+ # Only compare the part after '~'
+ if [ "${INSTALLED##*_}" = "${TARBALL#*\~}" ] ||[ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then
echo "Latest package '${PKGNAME}' version '${TARBALL}' is already built and installed."
exit 0
fi