From cfd456389ac55465fc25f250d7bb9d2f8987402d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Wed, 1 Oct 2014 20:09:15 +0200 Subject: RPM Packaging: updates --- redhat/build/get_latest_tarball_filename.sh | 10 +++++++--- redhat/build/get_specfile.sh | 15 ++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'redhat/build') diff --git a/redhat/build/get_latest_tarball_filename.sh b/redhat/build/get_latest_tarball_filename.sh index 8cc39f65d..e4c58d2b6 100755 --- a/redhat/build/get_latest_tarball_filename.sh +++ b/redhat/build/get_latest_tarball_filename.sh @@ -5,15 +5,19 @@ TDE_VERSION="${2:-14.0.0}" [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 [ -d "${TARBALLS_DIR}" ] || TARBALLS_DIR=~/tde/tde-tarballs/${TDE_VERSION}/ -[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging/redhat/ +[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging +[ -d "${DIST_PACKAGING_DIR}" ] || DIST_PACKAGING_DIR=${PACKAGING_DIR}/redhat/ RET=$(find "${TARBALLS_DIR}" -name "trinity-${PKGNAME}-[0-9]*.tar.gz" | sort -n | tail -n 1) +if [ -z "${RET}" ]; then + RET=$(find "${TARBALLS_DIR}/../extras/" -name "${PKGNAME}-[0-9]*.tar.*" | sort -n | tail -n 1) +fi if [ ! -r "${RET}" ]; then # Retry without 'trinity-*', and allow any TAR extension. - RET=$(find "${PACKAGING_DIR}" -name "${PKGNAME}-[0-9]*.tar*" | sort -n | tail -n 1) + RET=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}-[0-9]*.tar*" | sort -n | tail -n 1) if [ ! -r "${RET}" ]; then # Retry by removing numbers in package name, e.g "imlib1" => "imlib" - RET=$(find "${PACKAGING_DIR}" -name "$(tr -d "[0-9]" <<< ${PKGNAME})-[0-9]*.tar*" | sort -n | tail -n 1) + RET=$(find "${DIST_PACKAGING_DIR}" -name "$(tr -d "[0-9]" <<< ${PKGNAME})-[0-9]*.tar*" | sort -n | tail -n 1) fi fi diff --git a/redhat/build/get_specfile.sh b/redhat/build/get_specfile.sh index 8f4b542e0..ac59434a7 100755 --- a/redhat/build/get_specfile.sh +++ b/redhat/build/get_specfile.sh @@ -5,23 +5,24 @@ TDE_VERSION="${2:-14.0.0}" [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 -[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging/redhat +[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging +[ -d "${DIST_PACKAGING_DIR}" ] || DIST_PACKAGING_DIR=${PACKAGING_DIR}/redhat # Special case for QT3 if [ "${PKGNAME}" = "qt3" ]; then case "$(rpmdist.sh --dist)" in - .oss*) PACKAGING_DIR=~/tde/tde-packaging/opensuse ;; - .mga*|.mdk*|.pclos*) PACKAGING_DIR=~/tde/tde-packaging/mageia ;; + .oss*) DIST_PACKAGING_DIR=${PACKAGING_DIR}/opensuse ;; + .mga*|.mdk*|.pclos*) DIST_PACKAGING_DIR=${PACKAGING_DIR}/mageia ;; esac fi -SPECFILE=$(find "${PACKAGING_DIR}" -name "${PKGNAME}-${TDE_VERSION}.spec") +SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}-${TDE_VERSION}.spec") if [ ! -r "${SPECFILE}" ]; then - SPECFILE=$(find "${PACKAGING_DIR}" -name "${PKGNAME}.spec") + SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}.spec") if [ ! -r "${SPECFILE}" ]; then - SPECFILE=$(find "${PACKAGING_DIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec") + SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec") if [ ! -r "${SPECFILE}" ]; then - SPECFILE=$(find "${PACKAGING_DIR}" -name "trinity-${PKGNAME}.spec") + SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}.spec") fi fi fi -- cgit v1.2.1