Add PostgreSQL RPM repos.
authorChris Sharp <csharp@georgialibraries.org>
Fri, 20 Dec 2013 02:15:11 +0000 (21:15 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 20 Dec 2013 02:15:11 +0000 (21:15 -0500)
Evergreen requires PostgreSQL 9.1, so we add PostgreSQL's RPM repo.

Open-ILS/src/extras/install/Makefile.centos

index 0d1958a..15c05b7 100644 (file)
@@ -7,6 +7,11 @@ CENTOS=$(shell uname -r | grep "\.el[0-9]\.")
 # CentOS 64-bit?
 CENTOS_64=$(shell uname -r | grep "\.el[0-9]\.x86_64")
 
+# Postgres RPM Repos
+PGSQL_64_REPO_URL="http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64"
+PGSQL_REPO_URL="http://yum.postgresql.org/9.1/redhat/rhel-6-i386"
+PGSQL_REPO_RPM="pgdg-centos91-9.1-4.noarch.rpm"
+
 CENTOS_RPMS = \
        aspell \
        aspell-en \
@@ -48,7 +53,7 @@ CENTOS_RPMS = \
        perl-Text-CSV \
        perl-Text-CSV_XS \
        perl-XML-Writer \
-       postgresql-devel \
+       postgresql91-devel \
        readline-devel \
        tcp_wrappers-devel \
        wget \
@@ -73,17 +78,24 @@ export CPAN_MODULES_FORCE = \
        Business::OnlinePayment::PayPal
 
 PGSQL_CENTOS_RPMS = \
-       postgresql \
-       postgresql-contrib \
-       postgresql-libs \
-       postgresql-plperl \
-       postgresql-server
+       postgresql91 \
+       postgresql91-contrib \
+       postgresql91-libs \
+       postgresql91-plperl \
+       postgresql91-server
 
-all: install_centos_rpms install_js_sm
+all: add_pgsql_repo install_centos_rpms install_js_sm
        make -f $(DIR)/Makefile.common install_net_z3950_simpleserver
        make -f $(DIR)/Makefile.common install_cpan
        make -f $(DIR)/Makefile.common install_cpan_force
 
+add_pgsql_repo:
+       if [ ! -z $(CENTOS_64) ]; then \
+               wget $(PGSQL_64_REPO_URL)/$(PGSQL_REPO_RPM) ; \
+       else \
+               wget $(PGSQL_REPO_URL)/$(PGSQL_REPO_RPM) ; \
+       rpm -ivh $(PGSQL_REPO_RPM)
+               
 install_postgres_server:
        yum -y install $(PGSQL_CENTOS_RPMS)