diff options
author | François Andriot <albator78@libertysurf.fr> | 2014-04-04 21:17:27 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2014-04-04 21:17:27 +0200 |
commit | 7b26da834f79b8b6eb2d8e99a1467ffea2791380 (patch) | |
tree | f26773747d20d14d82fe43fd5c245d2f9e803eee /redhat/build/get_rpm_package_name.sh | |
parent | 61c9cb24d0d3319c8c800fabf1af8153dcabce2c (diff) | |
download | tde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.tar.gz tde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.zip |
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/get_rpm_package_name.sh')
-rwxr-xr-x | redhat/build/get_rpm_package_name.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/redhat/build/get_rpm_package_name.sh b/redhat/build/get_rpm_package_name.sh new file mode 100755 index 000000000..14a32f2d7 --- /dev/null +++ b/redhat/build/get_rpm_package_name.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Gets the RPM package name from the component name. +# This is useful because some RPM packages do not have prefix "trinity" +# while others do. +# +# E.g : +# trinity-qt3 => qt3 +# trinity-tdelibs => trinity-tdelibs + + +PKGCATEGORY="${1%%/*}" +PKGNAME="${1##*/}" +DEVEL="$2" + +# Language package: install only French language package +case "${PKGNAME}" in + "k3b-i18n"|"koffice-i18n"|"tde-i18n") PKGNAME="${PKGNAME}-French";; + "koffice") PKGNAME="${PKGNAME}-suite";; +esac + +# Use the Trinity Prefix, or not. +case "${PKGNAME}" in + "trinity-"*|"qt3"|"python-qt3"|"esound") PREFIX="";; + "gnuchess"|"htdig"|"imlib1"|"libotr3"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks"|"wv2") PREFIX="";; + "curl") PREFIX="trinity-lib";; + *) PREFIX="trinity-";; +esac + +echo "${PREFIX}${PKGNAME}" + +if [ -n "${DEVEL}" ]; then + # Check if development package is required. + # Applications do NOT have development packages + case "${PKGCATEGORY}" in + "applications") if [ "${PKGNAME}" != "k3b" ]; then exit 0; fi;; + esac + # Other packags NOT having development package + case "${PKGNAME}" in + "hal-info"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks") exit 0;; + "tqca-tls"|"tdeadmin"|"tdetoys"|"tde-i18n"*|"tdeaddons"|"tdeartwork"|"libtqt-perl") exit 0;; + esac + + echo "${PREFIX}${PKGNAME}-devel" +fi + |