blob: 22ddaf4f7e7ec8484d662ea51f22c4b37efc0ae3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash -x
TDE_VERSION=${1:-14.0.0}
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}]
name=rpmbuild.${ARCH}
baseurl=file://${RPMDIR}/${ARCH}
enabled=1
gpgcheck=0
[rpmbuild.noarch]
name=rpmbuild.noarch
baseurl=file://${RPMDIR}/noarch
enabled=1
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
|