You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
850 B
30 lines
850 B
11 years ago
|
#!/bin/bash
|
||
|
|
||
|
PKGNAME="${1##*/}"
|
||
|
TDE_VERSION="${2:-14.0.0}"
|
||
|
|
||
|
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
|
||
|
|
||
|
[ -d "${TDE_SPECDIR}" ] || TDE_SPECDIR=~/tde/tde-packaging/redhat
|
||
|
|
||
|
# Special case for QT3
|
||
|
if [ "${PKGNAME}" = "qt3" ]; then
|
||
|
case "$(rpmdist.sh --dist)" in
|
||
|
.oss*) TDE_SPECDIR=~/tde/tde-packaging/opensuse ;;
|
||
|
.mga*|.mdk*|.pclos*) TDE_SPECDIR=~/tde/tde-packaging/mageia ;;
|
||
|
esac
|
||
|
fi
|
||
|
|
||
|
SPECFILE=$(find "${TDE_SPECDIR}" -name "${PKGNAME}-${TDE_VERSION}.spec")
|
||
|
if [ ! -r "${SPECFILE}" ]; then
|
||
|
SPECFILE=$(find "${TDE_SPECDIR}" -name "${PKGNAME}.spec")
|
||
|
if [ ! -r "${SPECFILE}" ]; then
|
||
|
SPECFILE=$(find "${TDE_SPECDIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec")
|
||
|
if [ ! -r "${SPECFILE}" ]; then
|
||
|
SPECFILE=$(find "${TDE_SPECDIR}" -name "trinity-${PKGNAME}.spec")
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
echo ${SPECFILE}
|