summaryrefslogtreecommitdiffstats
path: root/redhat/build/configure_repository.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-04-15 19:43:15 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2014-04-15 19:43:15 +0200
commit41284c83ff5be87bbc957f646c0db642e93cc722 (patch)
tree8b61e4e593c0e6f94cfe83c4ea363fc62e83bcab /redhat/build/configure_repository.sh
parent062d4cb70976cec2a15349c6abe70a506d19f1d5 (diff)
downloadtde-packaging-41284c83ff5be87bbc957f646c0db642e93cc722.tar.gz
tde-packaging-41284c83ff5be87bbc957f646c0db642e93cc722.zip
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/configure_repository.sh')
-rwxr-xr-xredhat/build/configure_repository.sh12
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