Browse Source

working on rpms

mom040267 10 years ago
parent
commit
341dbc3157
4 changed files with 44 additions and 8 deletions
  1. 2 3
      rpm/CentOS6.pre.build.sh
  2. 3 5
      rpm/CentOS7.pre.build.sh
  3. 0 0
      rpm/epel6.install.sh
  4. 39 0
      rpm/epel7.install.sh

+ 2 - 3
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}

+ 3 - 5
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}

+ 0 - 0
rpm/epel.install.sh → rpm/epel6.install.sh


+ 39 - 0
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}
+
+