summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/get_specfile.sh28
-rwxr-xr-xredhat/build/install_rpm_package.sh4
-rwxr-xr-xredhat/build/update_repository.sh4
3 files changed, 22 insertions, 14 deletions
diff --git a/redhat/build/get_specfile.sh b/redhat/build/get_specfile.sh
index 54094064b..fcc0b64c5 100755
--- a/redhat/build/get_specfile.sh
+++ b/redhat/build/get_specfile.sh
@@ -11,20 +11,24 @@ TDE_VERSION="${2:-14.0.0}"
# Special case for QT3
if [ "${PKGNAME}" = "qt3" ]; then
case "$(rpmdist.sh --dist)" in
- .oss*) DIST_PACKAGING_DIR=${TDE_PACKAGING_DIR}/opensuse ;;
- .mga*|.mdk*|.pclos*) DIST_PACKAGING_DIR=${TDE_PACKAGING_DIR}/mageia ;;
+ .oss*) DIST_PACKAGING_DIR="${TDE_PACKAGING_DIR}/opensuse" ;;
+ .mga*|.mdk*|.pclos*) DIST_PACKAGING_DIR="${TDE_PACKAGING_DIR}/mageia" ;;
esac
fi
-SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}-${TDE_VERSION}.spec")
-if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}.spec")
- if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec")
- if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}.spec")
- fi
+for filename in \
+ "${PKGNAME}-${TDE_VERSION}.spec" \
+ "${PKGNAME}-14.0.0.spec" \
+ "${PKGNAME}.spec" \
+ "trinity-${PKGNAME}-${TDE_VERSION}.spec" \
+ "trinity-${PKGNAME}-14.0.0.spec" \
+ "trinity-${PKGNAME}.spec" \
+; do
+ SPECFILE="$(find "${DIST_PACKAGING_DIR}" -name "${filename}")"
+ if [ -r "${SPECFILE}" ]; then
+ echo "${SPECFILE}"
+ exit 0
fi
-fi
+done
-echo ${SPECFILE}
+exit 1
diff --git a/redhat/build/install_rpm_package.sh b/redhat/build/install_rpm_package.sh
index 93e2b5036..6b1319f90 100755
--- a/redhat/build/install_rpm_package.sh
+++ b/redhat/build/install_rpm_package.sh
@@ -8,7 +8,9 @@ done
PKGNAME="${1}"
-if [ -x /usr/sbin/urpmi ]; then
+if [ -x /usr/bin/dnf ]; then
+ PKGINST="sudo dnf install -y --refresh"
+elif [ -x /usr/sbin/urpmi ]; then
PKGINST='sudo urpmi --auto --no-verify-rpm'
elif [ -x /usr/bin/zypper ]; then
PKGINST="sudo zypper install -y"
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh
index 1694f34f4..72a142db9 100755
--- a/redhat/build/update_repository.sh
+++ b/redhat/build/update_repository.sh
@@ -15,7 +15,9 @@ RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})
[ -d "${RPMDIR}/noarch" ] || mkdir -p "${RPMDIR}/noarch"
[ -d "${RPMDIR}/${ARCH}" ] || mkdir -p "${RPMDIR}/${ARCH}"
-if [ -x /usr/sbin/urpmi ]; then
+if [ -x /usr/bin/dnf ]; then
+ REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo dnf clean all --disablerepo="*" --enablerepo="rpmbuild*")'
+elif [ -x /usr/sbin/urpmi ]; then
REPOUPDATE='(cd ${RPMDIR}; genhdlist2 --clean --allow-empty noarch & genhdlist2 --clean --allow-empty ${ARCH} & wait; sudo urpmi.update rpmbuild.${ARCH} rpmbuild.noarch)'
elif [ -x /usr/bin/zypper ]; then
REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)'