summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-10-01 20:09:15 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2014-10-01 20:09:15 +0200
commitcfd456389ac55465fc25f250d7bb9d2f8987402d (patch)
tree1ec7d8bf97c1d2fac9d24128115f196d020c067f /redhat/build
parentcd987458557f4163072c33effd4df34e7e8a4288 (diff)
downloadtde-packaging-cfd456389ac55465fc25f250d7bb9d2f8987402d.tar.gz
tde-packaging-cfd456389ac55465fc25f250d7bb9d2f8987402d.zip
RPM Packaging: updates
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/get_latest_tarball_filename.sh10
-rwxr-xr-xredhat/build/get_specfile.sh15
2 files changed, 15 insertions, 10 deletions
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