summaryrefslogtreecommitdiffstats
path: root/redhat/build/configure_repository.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2018-11-27 21:34:48 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2018-11-27 21:34:48 +0100
commita615d19df88eb2e989316b480519161945dbc7dc (patch)
tree369970b98042998b86c11024598155e037b76fec /redhat/build/configure_repository.sh
parent76a93e0011ade1583a1ec672f33411dfd35454f3 (diff)
downloadtde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.tar.gz
tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.zip
RPM: merge redhat directory with master branch
Diffstat (limited to 'redhat/build/configure_repository.sh')
-rwxr-xr-xredhat/build/configure_repository.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/redhat/build/configure_repository.sh b/redhat/build/configure_repository.sh
index 18c91eb1a..d280319f0 100755
--- a/redhat/build/configure_repository.sh
+++ b/redhat/build/configure_repository.sh
@@ -4,6 +4,9 @@ TDE_VERSION=${1:-14.0.0}
ARCH=$(rpm -E %_target_cpu)
RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})
+[ -d "${RPMDIR}/noarch" ] || mkdir -p "${RPMDIR}/noarch"
+[ -d "${RPMDIR}/${ARCH}" ] || mkdir -p "${RPMDIR}/${ARCH}"
+
# RHEL / CentOS / Fedora
if [ -x /usr/bin/yum ]; then
cat <<EOF >/tmp/rpmbuild-tde.repo
@@ -23,14 +26,22 @@ EOF
fi
# Mageia / Mandriva
-if [ -x /usr/sbin/urpmi ]; then
+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
+ sudo urpmi.addmedia "rpmbuild.${ARCH}" "${RPMDIR}/${ARCH}"
+ sudo urpmi.addmedia "rpmbuild.noarch" "${RPMDIR}/noarch"
fi
# openSUSE
if [ -x /usr/bin/zypper ]; then
- sudo zypper ar -G ${RPMDIR}/${ARCH} rpmbuild.${ARCH}
- sudo zypper ar -G ${RPMDIR}/noarch rpmbuild.noarch
+ sudo rm -f "/etc/zypp/repos.d/rpmbuild"*
+ sudo zypper ar -G "${RPMDIR}/${ARCH}" "rpmbuild.${ARCH}"
+ sudo zypper ar -G "${RPMDIR}/noarch" "rpmbuild.noarch"
+fi
+
+# PCLOS
+if [ -x "/usr/bin/apt-get" ]; then
+ [ ! -L "${RPMDIR}/RPMS.${ARCH}" ] && ln -sf "${ARCH}" "${RPMDIR}/RPMS.${ARCH}"
+ [ ! -L "${RPMDIR}/RPMS.noarch" ] && ln -sf "noarch" "${RPMDIR}/RPMS.noarch"
+ echo "rpm file:${RPMDIR%/*} ${RPMDIR##*/} ${ARCH} noarch" | sudo tee "/etc/apt/sources.list.d/rpmbuild.list"
fi