diff --git a/rpm/CentOS6.pre.build.sh b/rpm/CentOS6.pre.build.sh index bbbd39f..cd80113 100755 --- a/rpm/CentOS6.pre.build.sh +++ b/rpm/CentOS6.pre.build.sh @@ -8,7 +8,6 @@ CPWD=`pwd` cd ${CPWD} -EPELRPM=epel-release-6-8.noarch.rpm LIBEVENT_MAJOR_VERSION=2 LIBEVENT_VERSION=${LIBEVENT_MAJOR_VERSION}.0.21 LIBEVENT_DISTRO=libevent-${LIBEVENT_VERSION}-stable.tar.gz @@ -78,12 +77,12 @@ fi # EPEL (for hiredis) cd ${CPWD} -./epel.install.sh +./epel6.install.sh # Platform file echo "CentOS6.6" > ${BUILDDIR}/platform -cp ${CPWD}/epel.install.sh ${BUILDDIR}/install.sh +cp ${CPWD}/epel6.install.sh ${BUILDDIR}/install.sh cd ${CPWD} diff --git a/rpm/CentOS7.pre.build.sh b/rpm/CentOS7.pre.build.sh index 45faeba..1dda260 100755 --- a/rpm/CentOS7.pre.build.sh +++ b/rpm/CentOS7.pre.build.sh @@ -8,8 +8,6 @@ CPWD=`pwd` cd ${CPWD} -EPELRPM=epel-release-6-8.noarch.rpm - # Common packs PACKS="libevent-devel mariadb-devel sqlite sqlite-devel" @@ -24,12 +22,12 @@ fi # EPEL (for hiredis) cd ${CPWD} -./epel.install.sh +./epel7.install.sh # Platform file -echo "CentOS7" > ${BUILDDIR}/platform +echo "CentOS7.1" > ${BUILDDIR}/platform -cp ${CPWD}/epel.install.sh ${BUILDDIR}/install.sh +cp ${CPWD}/epel7.install.sh ${BUILDDIR}/install.sh cd ${CPWD} diff --git a/rpm/epel.install.sh b/rpm/epel6.install.sh similarity index 100% rename from rpm/epel.install.sh rename to rpm/epel6.install.sh diff --git a/rpm/epel7.install.sh b/rpm/epel7.install.sh new file mode 100755 index 0000000..29322c0 --- /dev/null +++ b/rpm/epel7.install.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +CPWD=`pwd` + +# Epel installation script + +EPEL=epel-release-7-5.noarch +EPELRPM=${EPEL}.rpm +BUILDDIR=~/rpmbuild +WGETOPTIONS="--no-check-certificate" +RPMOPTIONS="-ivh --force" + +mkdir -p ${BUILDDIR} +mkdir -p ${BUILDDIR}/RPMS + +sudo yum -y install wget + +cd ${BUILDDIR}/RPMS +if ! [ -f ${EPELRPM} ] ; then + wget ${WGETOPTIONS} http://download.fedoraproject.org/pub/epel/7/x86_64/e/${EPELRPM} + ER=$? + if ! [ ${ER} -eq 0 ] ; then + cd ${CPWD} + exit -1 + fi +fi + +PACK=${EPELRPM} +sudo rpm ${RPMOPTIONS} ${PACK} +ER=$? +if ! [ ${ER} -eq 0 ] ; then + echo "Cannot install package ${PACK}" + cd ${CPWD} + exit -1 +fi + +cd ${CPWD} + +