From de3d6fb5b8107db6b138a9fba77ba92577f94cf4 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 24 Jun 2010 03:29:02 +0000 Subject: [PATCH] First stab at Fedora 13 support in prerequisite installer Of possible concern: the use of -JS_THREADSAFE in JavaScript::SpiderMonkey. Need to test this change on other distros - but it enabled me to avoid the libperl.so linking hacks used on RHEL and CentOS. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16798 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/Makefile.install | 115 +++++++++++++++++++++++++++-------- 1 file changed, 88 insertions(+), 27 deletions(-) diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 495503b70..558b014dd 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -4,7 +4,7 @@ # Makefile to install prerequisites for OpenSRF and Evergreen # # Currently supports Debian (etch/lenny), Ubuntu (hardy/karmic), and Gentoo. -# Working towards support of CentOS 5 / RHEL 5. +# Working towards support of CentOS 5 / RHEL 5 / Fedora 13. # Installs Perl prereqs, libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz # # usage: @@ -16,6 +16,8 @@ # - or - # make -f Makefile.install ubuntu-karmic # - or - +# make -f Makefile.install fedora-13 +# - or - # make -f Makefile.install centos # - or - # make -f Makefile.install rhel @@ -25,7 +27,7 @@ # Notes: # # This makefile has been tested much more with Debian and Ubuntu than -# CentOS, Gentoo, or RHEL. +# Fedora, CentOS, Gentoo, or RHEL. # # Gentoo (especially amd64) requires a good bit of masked package # mangling for some packages. These are not documented here because @@ -42,17 +44,14 @@ SHELL=/bin/bash # # 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 +LIBJS_PERL=JavaScript-SpiderMonkey-0.20 LIBJS_URL=ftp://ftp.mozilla.org/pub/mozilla.org/js/$(LIBJS).tar.gz LIBJS_PERL_URL=ftp://mirror.datapipe.net/pub/CPAN/authors/id/T/TB/TBUSCH/$(LIBJS_PERL).tar.gz # used for installing libjs lib and header files JS_INSTALL_PREFIX=/usr/ - # The libdbi sources can be fetched from sourceforge.net. They are stored on # the open-ils.org site now for ease of direct linking LIBDBI=libdbi-0.8.3 @@ -73,6 +72,9 @@ APT_TOOL=aptitude -yq # 64 or 32 bit os? LBITS=$(shell getconf LONG_BIT) +# Fedora 64-bit? +FEDORA_64=$(shell uname -r | grep "fc[0-9][0-9].x86_64") + #RHEL/Centos PGSQL PGSQL_HOST=http://yum.pgsqlrpms.org/reporpms/8.4 PGSQL_CENTOS=pgdg-centos-8.4-2.noarch.rpm @@ -80,7 +82,7 @@ PGSQL_REDHAT=pgdg-redhat-8.4-2.noarch.rpm # Debian dependencies DEBS = \ - apache2-prefork-dev\ + apache2-prefork-dev\ aspell\ aspell-en\ libbusiness-creditcard-perl\ @@ -106,7 +108,6 @@ DEBS = \ libssh2-1-dev\ libtext-aspell-perl\ libtext-csv-perl\ - libtext-csv-perl\ libuniversal-require-perl\ libunix-syslog-perl @@ -145,13 +146,6 @@ CENTOS = \ perl-Text-Aspell \ perl-Text-CSV -PGSQL_84_RPMS = \ - postgresql-8.4* \ - postgresql-contrib-8.4* \ - postgresql-devel-8.4* \ - postgresql-plp*-8.4* \ - postgresql-server-8.4* - CENTOS_PERL = \ Class::DBI \ Class::DBI::Pg \ @@ -163,6 +157,47 @@ CENTOS_PERL = \ Net::XMPP \ Net::Z3950::ZOOM +FEDORA_13_RPMS = \ + aspell \ + aspell-en \ + js-devel \ + libdbi \ + libdbi-dbd-pgsql \ + libssh2-devel \ + libyaz \ + libyaz-devel \ + ncurses-devel \ + ncurses-libs \ + perl-Business-CreditCard \ + perl-Class-DBI-Pg \ + perl-Email-Send \ + perl-GDGraph3d \ + perl-MARC-Record \ + perl-Net-SSH2 \ + perl-OLE-Storage_Lite \ + perl-Spreadsheet-WriteExcel \ + perl-Text-Aspell \ + perl-Text-CSV \ + perl-Text-CSV_XS \ + perl-XML-Writer \ + postgresql-devel \ + readline-devel \ + tcp_wrappers-devel \ + yaz + +# Note: B:O:AuthorizeNet 3.21 fails with https://rt.cpan.org/Public/Bug/Display.html?id=55172 +# Should be fixed in 3.22 +FEDORA_13_CPAN = \ + Business::OnlinePayment \ + Business::OnlinePayment::AuthorizeNet + +PGSQL_84_RPMS = \ + postgresql-8.4* \ + postgresql-contrib-8.4* \ + postgresql-devel-8.4* \ + postgresql-plp*-8.4* \ + postgresql-server-8.4* + PGSQL_CLIENT_DEBS_81 = \ postgresql-client-8.1 @@ -236,10 +271,13 @@ CPAN_MODULES = \ Net::uFTP \ Net::Z3950::Simple2ZOOM \ UUID::Tiny \ - SRU \ - Safe + SRU + +# Are we sure most distros don't come with an acceptable version of Safe.pm? +CPAN_MODULES_SAFE = \ + Safe -# Intrepid and Lenny have libmarc-charset-perl, libmarc-xml-perl, libnet-z3950-zoom-perl +# Recent Debian/Ubuntus have libmarc-charset-perl, libmarc-xml-perl, libnet-z3950-zoom-perl CPAN_MODULES_MARC = \ MARC::Charset \ MARC::File::XML \ @@ -253,14 +291,16 @@ all: # these should be the same for any distro install: install_cpan install_js_sm install_libdbi -centos: install_centos_pgsql install_centos_rpms install_yaz install_cpan_marc install install_centos_perl create_ld_local -rhel: install_redhat_pgsql install_centos_rpms install_yaz install_cpan_marc install 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 install_cpan_safe +rhel: install_redhat_pgsql install_centos_rpms install_yaz install_cpan_marc install install_centos_perl create_ld_local install_cpan_safe + +fedora-13: install_fedora_13_rpms install_cpan install_cpan_marc install_cpan_fedora install_spidermonkey debian-etch: etch generic_debian debian-lenny: lenny generic_debian etch: install_pgsql_client_debs_81 install_yaz install_cpan_marc install_extra_encode lenny: install_pgsql_client_debs_83 install_extra_debs -generic_debian: install_debs install debian_sys_config +generic_debian: install_debs install debian_sys_config install_cpan_safe gentoo: install_gentoos install_gentoo_perl install @@ -268,7 +308,7 @@ ubuntu-hardy: hardy generic_ubuntu ubuntu-karmic: karmic generic_ubuntu hardy: install_pgsql_client_debs_82 install_yaz install_cpan_marc install_extra_encode karmic: install_pgsql_client_debs_84 install_extra_debs -generic_ubuntu: install_debs install debian_sys_config +generic_ubuntu: install_debs install debian_sys_config install_cpan_safe # - COMMON TARGETS --------------------------------------------------------- @@ -280,6 +320,15 @@ install_cpan: install_cpan_marc: for m in $(CPAN_MODULES_MARC); do perl -MCPAN -e "install \"$$m\";"; done +# Install the Safe Perl module +# Is this really unpackaged everywhere except for Fedora? +install_cpan_safe: + for m in $(CPAN_MODULES_SAFE); do perl -MCPAN -e "install \"$$m\";"; done + +# Install the CPAN modules for Fedora 13 +install_cpan_fedora: + for m in $(FEDORA_13_CPAN); do perl -MCPAN -e "install \"$$m\";"; done + # Install a known working version of YAZ install_yaz: if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi; @@ -287,18 +336,26 @@ install_yaz: cd $(YAZ) && ./configure && make && make install && ldconfig # Install the custom spidermonkey libs and JavaScript-SpiderMonkey Perl modules -install_js_sm: +install_js_sm: install_libjs install_spidermonkey + +install_libjs: if [ ! -f $(LIBJS).tar.gz ]; then wget $(LIBJS_URL); fi; - if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi; tar -zxf $(LIBJS).tar.gz - tar -zxf $(LIBJS_PERL).tar.gz cd js/src/ && make -f Makefile.ref mkdir -p $(JS_INSTALL_PREFIX)/include/js/ cp js/src/*.h $(JS_INSTALL_PREFIX)/include/js/ cp js/src/*.tbl $(JS_INSTALL_PREFIX)/include/js/ cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib/ cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib/ - cd $(LIBJS_PERL) && perl Makefile.PL -E4X && make && make test && make install + +install_spidermonkey: + if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi; + tar -zxf $(LIBJS_PERL).tar.gz + if [ ! -z $(FEDORA_64) ]; then \ + sed -i -e 's/"\/usr\/lib"/"\/usr\/lib64"/' $(LIBJS_PERL)/Makefile.PL ; \ + sed -i -e 's/js32.dll/libjs.so/' $(LIBJS_PERL)/Makefile.PL ; \ + fi; + cd $(LIBJS_PERL) && perl Makefile.PL -E4X -JS_THREADSAFE && make && make test && make install # Install libdbi and the postgres drivers @@ -379,7 +436,11 @@ install_gentoo_perl: for m in $(GENTOO_PERL); do perl -MCPAN -e "install \"$$m\";"; done # ------------------------------------------------------------------ - + +# FEDORA 13 +install_fedora_13_rpms: + yum -y update + yum -y install $(FEDORA_13_RPMS) # CENTOS install_centos_rpms: -- 2.11.0