Adding a Makefile.install target for CentOS 6.
authorChris Sharp <csharp@georgialibraries.org>
Thu, 12 Dec 2013 01:13:20 +0000 (20:13 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 23 May 2017 18:12:44 +0000 (14:12 -0400)
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
src/extras/Makefile.install

index 39d7ed4..0bac09d 100644 (file)
@@ -19,6 +19,8 @@
 #      make -f Makefile.install ubuntu-xenial
 #      - or -
 #      make -f Makefile.install fedora
+#      - or -
+#      make -f Makefile.install centos
 #
 # ---------------------------------------------------------------------
 
@@ -30,6 +32,10 @@ LBITS=$(shell getconf LONG_BIT)
 
 APT_TOOL=apt-get -yq
 
+# CentOS needs the EPEL repository
+EPEL_HOST=http://dl.fedoraproject.org/pub/epel/6/x86_64
+EPEL_PKG=epel-release-6-8.noarch.rpm
+
 # Debian dependencies
 DEBS =  \
        autoconf\
@@ -84,7 +90,7 @@ DEBS =  \
        tar\
        zlib1g-dev
 
-FEDORAS = \
+RPMS = \
        autoconf \
        automake \
        check \
@@ -185,7 +191,8 @@ jessie: install_extra_debs_jessie debian_sys_config
 wheezy: install_extra_debs_wheezy debian_sys_config
 generic_debian: install_debs
 
-fedora: install_fedora_rpms
+fedora: install_rpms
+centos: install_epel install_rpms
 
 ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
 ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods apache_perl_mod
@@ -237,8 +244,16 @@ apache_mpm_prefork_mods:
 apache_perl_mod:
        a2enmod perl
 
-# Fedora
-install_fedora_rpms:
-       yum -y install $(FEDORAS)
+# CentOS
+install_epel:
+       if [ -n "$(uname -r | grep el6)" ]; then \
+               wget $(EPEL_HOST)/$(EPEL_PKG) ; \
+               rpm -Uvh $(EPEL_PKG) ;\
+       fi;
+       yum update -y
+
+# Fedora/CentOS
+install_rpms:
+       yum -y install $(RPMS)
 
 # vim:noet:sw=4:ts=4: