diff options
Diffstat (limited to 'redhat/build/configure_repository.sh')
-rwxr-xr-x | redhat/build/configure_repository.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/redhat/build/configure_repository.sh b/redhat/build/configure_repository.sh index 2456b1a6a..22ddaf4f7 100755 --- a/redhat/build/configure_repository.sh +++ b/redhat/build/configure_repository.sh @@ -1,9 +1,10 @@ -#!/bin/bash +#!/bin/bash -x TDE_VERSION=${1:-14.0.0} -ARCH=$(uname -i) +ARCH=$(rpm -E %_target_cpu) RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION}) +# RHEL / CentOS / Fedora if [ -x /usr/bin/yum ]; then cat <<EOF >/tmp/rpmbuild-tde.repo [rpmbuild.${ARCH}] @@ -20,3 +21,10 @@ gpgcheck=0 EOF sudo mv -f /tmp/rpmbuild-tde.repo /etc/yum.repos.d/ fi + +# Mageia / Mandriva +if [ -x /usr/sbin/urpmi ]; then + sudo urpmi.removemedia -y "rpmbuild" + sudo urpmi.addmedia rpmbuild.${ARCH} ${RPMDIR}/${ARCH} + sudo urpmi.addmedia rpmbuild.noarch ${RPMDIR}/noarch +fi |