From: dbs Date: Wed, 10 Dec 2008 04:43:18 +0000 (+0000) Subject: Backport EG-specific prerequisites Makefile from trunk; use more distro packages... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b2233cfaf2e1746ea0d2f8adce2847a415f5ceba;p=Evergreen.git Backport EG-specific prerequisites Makefile from trunk; use more distro packages where available git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11494 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 6d743b3c0a..b43e65ae48 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -3,14 +3,20 @@ # # Makefile to install prerequisites for OpenSRF and Evergreen # -# Currently supports Debian (etch), Ubuntu (gutsy), and Gentoo. +# Currently supports Debian (etch/lenny), Ubuntu (gutsy/hardy/intrepid), and Gentoo. # Working towards support of CentOS 5 / RHEL 5. # Installs Perl prereqs, libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz # # usage: -# make -f Makefile.install debian +# make -f Makefile.install debian-etch # - or - -# make -f Makefile.install ubuntu +# make -f Makefile.install debian-lenny +# - or - +# make -f Makefile.install ubuntu-gutsy +# - or - +# make -f Makefile.install ubuntu-hardy +# - or - +# make -f Makefile.install ubuntu-intrepid # - or - # make -f Makefile.install centos # - or - @@ -20,7 +26,8 @@ # # Notes: # -# This makefile has been tested much more with Debian than CentOS, Gentoo, or RHEL. +# This makefile has been tested much more with Debian and Ubuntu than +# CentOS, Gentoo, or RHEL. # # Gentoo (especially amd64) requires a good bit of masked package # mangling for some packages. These are not documented here because @@ -34,8 +41,11 @@ SHELL=/bin/bash # XXX # Gentoo needs explicit versions on many of these packages # to simulate a "blessed" set of packages +# # Also, I (think) Gentoo has a javascript::spidermonkey package that does # not require fetching the sources externally ... needs testing/updating in here +# +# Intrepid has libmozjs-dev and spidermonkey-bin - might work LIBJS=js-1.7.0 LIBJS_PERL=JavaScript-SpiderMonkey-0.19 @@ -51,127 +61,53 @@ LIBDBI=libdbi-0.8.3 LIBDBI_DRIVERS=libdbi-drivers-0.8.3 LIBDBI_HOST=http://open-ils.org/~denials/evergreen -# Some people are firewalled out of indexdata.dk -YAZ=yaz-3.0.36 -YAZ_HOST=http://evergreen-ils.org/~denials/yaz - -# ejabberd is not packaged on CentOS/RHEL, so we have to -# download the installable package from the source -EJABBERD_VER=2.0.1 -EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin -EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd - -# libmemcache is not packaged on CentOS/RHEL -LIBMEMCACHE=libmemcache-1.4.0.rc2 -LIBMEMCACHE_HOST=http://people.freebsd.org/~seanc/libmemcache/ +# We need a recent version of Yaz +# Debian Lenny and Ubuntu 8.10 come with 3.0.34 +YAZ=yaz-3.0.38 +YAZ_HOST=http://ftp.indexdata.dk/pub/yaz # Business::OnlinePayment is not packaged on CentOS/RHEL PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/ - -# XML::LibXSLT fails due to old libxslt -XSLT=libxslt-1.1.22 -XSLT_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1 - -# libxslt depends on a newer version of libxml2: -XML2=libxml2-2.6.30.tar.gz -XML2_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6 - APT_TOOL=aptitude # Debian dependencies DEBS = \ - apache2-mpm-prefork\ - apache2-prefork-dev\ aspell\ aspell-en\ - autoconf\ - automake\ - build-essential\ - ejabberd\ - less\ - libapache2-mod-perl2\ libbusiness-creditcard-perl\ libbusiness-onlinepayment-authorizenet-perl\ libbusiness-onlinepayment-perl\ - libcache-memcached-perl\ - libclass-dbi-abstractsearch-perl\ libclass-dbi-pg-perl\ - libclass-dbi-sqlite-perl\ libdatetime-format-builder-perl\ libdatetime-format-mail-perl\ libdatetime-perl\ libdatetime-timezone-perl\ libemail-send-perl\ - liberror-perl\ - libexpat1-dev\ - libfile-find-rule-perl\ - libfreezethaw-perl\ libgd-graph3d-perl\ - liblog-log4perl-perl\ libmarc-record-perl\ - libmemcache-dev\ - libmodule-build-perl\ - libnet-jabber-perl\ libole-storage-lite-perl\ - libperl-dev\ libpq-dev\ - libreadline5-dev\ - librpc-xml-perl\ libspreadsheet-writeexcel-perl\ - libtemplate-perl\ - libtest-pod-perl\ libtext-aspell-perl\ libtext-csv-perl\ - libtext-csv-perl\ - libtie-ixhash-perl\ - libtool\ - libuniversal-require-perl\ - libunix-syslog-perl\ - libwww-perl\ - libxml2-dev\ - libxml-libxml-perl\ - libxml-libxslt-perl\ - libxml-simple-perl\ - libxslt1-dev\ - memcached\ - ntpdate\ - psmisc\ - python-dev\ - python-setuptools + libtext-csv-perl + +# Debian Lenny and Ubuntu Intrepid bundle recent versions of yaz +EXTRA_DEBS = \ + libmarc-charset-perl \ + libmarc-xml-perl \ + libnet-z3950-zoom-perl \ + libyaz-dev \ + yaz CENTOS = \ - apr-util-devel \ aspell \ aspell-devel \ aspell-en \ - autoconf \ - automake \ - gcc \ gd-devel \ - gdbm-devel \ - httpd-devel \ - less \ - libtool \ - libxml2-devel \ - libxslt-devel \ - make \ - mod_perl \ - mod_ssl \ - ncurses \ - ncurses-devel \ - ntp \ - perl-DBD-Pg \ - perl-DBI \ - perl-XML-LibXML \ - perl-XML-Simple \ - perl-libwww-perl \ - psmisc \ - python-devel \ - python-setuptools\ - readline-devel \ - wget + perl-DBD-Pg PGSQL_CENTOS = \ postgresql \ @@ -188,103 +124,68 @@ CENTOS_PERL_FORCE = \ # that are simply too painful to workaround CENTOS_PERL_NOTEST = \ Business::OnlinePayment::AuthorizeNet \ - DateTime::Format::Strptime \ - RPC::XML + DateTime::Format::Strptime # This is a developer's version, but B:OP:AuthorizeNet depends on it CENTOS_PERL_VERSION = \ IVAN/Business-OnlinePayment-3.00_08.tar.gz -CENTOS_PERL_LOCAL = \ - XML-LibXSLT - CENTOS_PERL = \ Business::CreditCard \ - Cache::Memcached \ - Class::DBI::AbstractSearch \ Class::DBI::Pg \ - Class::DBI::SQLite \ DateTime \ DateTime::TimeZone \ DateTime::Format::Builder \ - Error \ - File::Find::Rule \ - FreezeThaw \ GD::Graph3d \ - Log::Log4perl \ MARC::Record \ - Net::Jabber \ Net::Z3950::ZOOM \ Spreadsheet::WriteExcel \ - Template \ - Test::Pod \ Text::Aspell \ - Text::CSV \ - Tie::IxHash \ - Unix::Syslog \ - UNIVERSAL::require \ - XML::LibXSLT - -PGSQL_DEBIAN = \ - postgresql-8.1\ - postgresql-client-8.1\ - postgresql-contrib-8.1\ - postgresql-plperl-8.1\ + Text::CSV + +PGSQL_CLIENT_DEBS_8.1 = \ + postgresql-client-8.1 \ postgresql-server-dev-8.1 -PGSQL_UBUNTU = \ - postgresql-8.2\ - postgresql-client-8.2\ - postgresql-contrib-8.2\ - postgresql-plperl-8.2\ +PGSQL_SERVER_DEBS_8.1 = \ + postgresql-8.1 \ + postgresql-contrib-8.1 \ + postgresql-plperl-8.1 + +PGSQL_CLIENT_DEBS_82 = \ + postgresql-client \ postgresql-server-dev-8.2 +PGSQL_SERVER_DEBS_82 = \ + postgresql \ + postgresql-contrib-8.2 \ + postgresql-plperl-8.2 + +PGSQL_CLIENT_DEBS_83 = \ + postgresql-client \ + postgresql-server-dev-8.3 + +PGSQL_SERVER_DEBS_83 = \ + postgresql \ + postgresql-contrib-8.3 \ + postgresql-plperl-8.3 + GENTOOS = \ - vim\ - ntp\ - memcached\ - libmemcache\ - net-misc/telnet-bsd\ - app-portage/gentoolkit\ - gsasl\ - ejabberd\ - mod_perl\ yaz\ aspell-en\ - net-fs/nfs-utils\ - dev-libs/apr\ dev-db/libpq\ dev-db/postgresql\ dev-perl/Email-Send\ - dev-perl/Cache-Memcached\ dev-perl/DateTime\ dev-perl/DateTime-TimeZone\ - dev-perl/DBI\ dev-perl/DBD-Pg\ dev-perl/GD-Graph3d\ - dev-perl/Log-Log4perl\ dev-perl/Text-Aspell\ - dev-perl/Unix-Syslog\ - dev-perl/XML-LibXML\ - dev-perl/XML-LibXSLT\ - dev-perl/XML-Simple\ - dev-perl/Net-Jabber\ - dev-perl/libwww-perl\ dev-perl/Template-Toolkit\ - dev-perl/Error\ dev-perl/Text-CSV_XS\ - dev-perl/Spreadsheet-WriteExcel\ - dev-perl/Tie-IxHash\ - dev-perl/FreezeThaw - -GENTOO_RC = \ - ejabberd\ - memcached\ - portmap + dev-perl/Spreadsheet-WriteExcel GENTOO_PERL = \ - UNIVERSAL::require\ - Class::DBI::AbstractSearch\ MARC::Record \ Net::Z3950::ZOOM \ Text::CSV @@ -294,76 +195,58 @@ DEB_APACHE_MODS = \ include\ proxy\ proxy_http\ - rewrite\ - ssl - + rewrite + +DEB_APACHE_DISMODS = \ + deflate -# generic CPAN modules +# Chronically unpackaged CPAN modules CPAN_MODULES = \ - DateTime::Format::ISO8601 \ - RHANDOM/Net-Server-0.90.tar.gz \ - MARC::Charset MARC::File::XML \ - JSON::XS \ - SRU \ - Net::Z3950::ZOOM \ - Business::CreditCard::Object \ - XML::LibXML::XPathContext + Business::CreditCard::Object \ + SRU -# generic CPAN modules to force the install -CPAN_MODULES_FORCE = \ - TMTM/Class-DBI-0.96.tar.gz +# Intrepid and Lenny have libmarc-charset-perl, libmarc-xml-perl, libnet-z3950-zoom-perl +CPAN_MODULES_MARC = \ + MARC::Charset \ + MARC::File::XML \ + Net::Z3950::ZOOM # ---------------------------------------------------------------------------- all: @echo "please specify an OS" && exit 0 - # these should be the same for any distro -install: install_yaz install_cpan install_js_sm install_libdbi +install: install_cpan install_js_sm install_libdbi -centos: install_centos_pgsql install_centos_rpms install_ejabberd install_libmemcache install install_libxml2 install_libxslt install_centos_perl create_ld_local +centos: install_centos_pgsql install_centos_rpms install_yaz install_cpan_marc install install_centos_perl create_ld_local -debian: install_pgsql_debian install_debs install debian_sys_config +debian-etch: etch generic_debian +debian-lenny: lenny generic_debian +etch: install_pgsql_client_debs_81 install_yaz install_cpan_marc +lenny: install_pgsql_client_debs_83 install_extra_debs +generic_debian: install_debs install debian_sys_config -gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install +gentoo: install_gentoos install_gentoo_perl install rhel: centos -ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config - +ubuntu-gutsy: hardy generic_ubuntu +ubuntu-hardy: hardy generic_ubuntu +ubuntu-intrepid: intrepid generic_ubuntu +hardy: install_pgsql_client_debs_82 install_yaz install_cpan_marc +intrepid: install_pgsql_client_debs_83 install_extra_debs +generic_ubuntu: install_debs install debian_sys_config # - COMMON TARGETS --------------------------------------------------------- # Install the CPAN modules install_cpan: for m in $(CPAN_MODULES); do perl -MCPAN -e "install \"$$m\";"; done - for m in $(CPAN_MODULES_FORCE); do perl -MCPAN -e "CPAN::Shell->force(qw#install $$m#);"; done - -# Install ejabberd from official project installer binary -install_ejabberd: - if [ ! -f $(EJABBERD_PKG).gz ]; then wget $(EJABBERD_HOST)/$(EJABBERD_VER)/$(EJABBERD_PKG).gz; fi; - gunzip $(EJABBERD_PKG).gz - chmod u+x $(EJABBERD_PKG).gz - ./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen - -# Install libmemcache from the official project source -install_libmemcache: - if [ ! -d $(LIBMEMCACHE) ]; then wget $(LIBMEMCACHE_HOST)/$(LIBMEMCACHE).tar.bz2; fi; - tar xjf $(LIBMEMCACHE).tar.bz2 - cd $(LIBMEMCACHE) && ./configure && make && make install - -# Install a newer version of libxslt -install_libxslt: - if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi; - tar xzf $(XSLT).tar.gz - cd $(XSLT) && ./configure --with-libxml-prefix=/usr/local && make && make install - -# Install a newer version of libxml2 -install_libxml2: - if [ ! -d $(XML2) ]; then wget $(XML2_HOST)/$(XML2).tar.gz; fi; - tar xzf $(XML2).tar.gz - cd $(XML2) && ./configure && make && make install + +# Install the CPAN modules for MARC functionality +install_cpan_marc: + for m in $(CPAN_MODULES_MARC); do perl -MCPAN -e "install \"$$m\";"; done # Install a known working version of YAZ install_yaz: @@ -401,8 +284,6 @@ clean: make -C $(LIBDBI) clean make -C $(LIBDBI_DRIVERS) clean make -C $(LIBJS_PERL) clean - make -C $(XML2) clean - make -C $(XSLT) clean make -f Makefile.ref -C js/src/ clean @@ -412,22 +293,39 @@ clean: debian_sys_config: # link the apache modules in for m in $(DEB_APACHE_MODS); do a2enmod $$m; done; - - # adds a placeholder module so apxs will be happy - if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \ - echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \ - >> /etc/apache2/httpd.conf; \ - fi; + # keep the bad apache modules away + for m in $(DEB_APACHE_DISMODS); do a2dismod $$m; done; + # refresh the dynamic library cache + ldconfig # Install the debian-specific dependencies install_debs: $(APT_TOOL) install $(DEBS) -install_pgsql_debian: - $(APT_TOOL) install $(PGSQL_DEBIAN) +install_pgsql_client_debs_83: + $(APT_TOOL) install $(PGSQL_CLIENT_DEBS_83) + +install_pgsql_server_debs_83: + $(APT_TOOL) install $(PGSQL_SERVER_DEBS_83) + +install_pgsql_client_debs_82: + $(APT_TOOL) install $(PGSQL_CLIENT_DEBS_82) + +install_pgsql_server_debs_82: + $(APT_TOOL) install $(PGSQL_SERVER_DEBS_82) + +# Etch requires an explicit version to avoid PostgreSQL 7.4 +install_pgsql_client_debs_81: + $(APT_TOOL) install $(PGSQL_CLIENT_DEBS_81) + +# Etch requires an explicit version to avoid PostgreSQL 7.4 +install_pgsql_server_debs_81: + $(APT_TOOL) install $(PGSQL_SERVER_DEBS_81) + +# Install the debian-specific dependencies for more modern distros +install_extra_debs: + $(APT_TOOL) install $(EXTRA_DEBS) -install_pgsql_ubuntu: - $(APT_TOOL) install $(PGSQL_UBUNTU) # ------------------------------------------------------------------ # - GENTOO --------------------------------------------------------- @@ -435,9 +333,6 @@ install_pgsql_ubuntu: install_gentoos: emerge -n $(GENTOOS) -install_gentoo_rc: - for m in $(GENTOO_RC); do rc-update add $$m default; done; - install_gentoo_perl: for m in $(GENTOO_PERL); do perl -MCPAN -e "install \"$$m\";"; done @@ -456,13 +351,12 @@ install_centos_perl: for m in $(CENTOS_PERL); do perl -MCPAN -e "install \"$$m\";"; done for m in $(CENTOS_PERL_VERSION); do perl -MCPAN -e "CPAN::Shell->install \"$$m\";"; done for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done - for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done # We need to add /usr/local/lib to the ldconfig list of directories on CentOS, # if it is not already there create_ld_local: if [ "$$(ldconfig -v 2> /dev/null | grep '^/usr/local/lib' | wc -l)" -eq 0 ]; then \ - echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ + echo '/usr/local/lib' >> /etc/ld.so.conf.d/local.conf; \ ldconfig; \ fi;