0149387eb4fc75f06cc000381a229515aa5c60be
[working/Evergreen.git] / Open-ILS / src / extras / install / Makefile.fedora
1 # install files for Fedora
2
3 DIR = $(dir $(lastword $(MAKEFILE_LIST)))
4
5 # Fedora?
6 FEDORA=$(shell uname -r | grep "\.fc[0-9][0-9]\.")
7 # Fedora 64-bit?
8 FEDORA_64=$(shell uname -r | grep "\.fc[0-9][0-9]\.x86_64")
9
10 FEDORA_RPMS = \
11         aspell \
12         aspell-en \
13         bzip2-devel \
14         check \
15         check-devel \
16         libdbi \
17         libdbi-dbd-pgsql \
18         libdbi-devel \
19         libssh2-devel \
20         libyaz \
21         libyaz-devel \
22         mingw32-nsiswrapper \
23         mod_ssl \
24         ncurses-devel \
25         ncurses-libs \
26         perl-parent \
27         perl-Business-CreditCard \
28         perl-Business-ISBN \
29         perl-Business-ISBN-Data \
30         perl-CPAN \
31         perl-Crypt-SSLeay \
32         perl-DBD-Pg \
33         perl-Email-Send \
34         perl-Email-Simple \
35         perl-GDGraph3d \
36         perl-JSON-XS \
37         perl-LDAP \
38         perl-Library-CallNumber-LC \
39         perl-Locale-Codes \
40         perl-Locale-Maketext-Lexicon \
41         perl-MARC-Charset \
42         perl-MARC-Record \
43         perl-MARC-XML \
44         perl-Module-Pluggable \
45         perl-Net-IP \
46         perl-Net-SSH2 \
47         perl-OLE-Storage_Lite \
48         perl-RPC-XML \
49         perl-SOAP-Lite \
50         perl-Spreadsheet-WriteExcel \
51         perl-Test-Warn \
52         perl-Text-Aspell \
53         perl-Text-CSV \
54         perl-Text-CSV_XS \
55         perl-UUID-Tiny \
56         perl-XML-Writer \
57         postgresql-devel \
58         readline-devel \
59         tcp_wrappers-devel \
60         wget \
61         yaz
62
63 export CPAN_MODULES = \
64         Business::ISSN \
65         Net::Z3950::ZOOM \
66         Net::Z3950::Simple2ZOOM \
67         Business::Stripe \
68         Template::Plugin::POSIX \
69         SRU \
70         Rose::URI
71
72 export CPAN_MODULES_FORCE = \
73         Class::DBI::Frozen::301 \
74         Business::OnlinePayment \
75         Business::OnlinePayment::AuthorizeNet \
76         Business::OnlinePayment::PayPal
77
78 PGSQL_FEDORA_RPMS = \
79         postgresql \
80         postgresql-contrib \
81         postgresql-libs \
82         postgresql-plperl \
83         postgresql-server
84
85 all: install_fedora_rpms install_js_sm
86         make -f $(DIR)/Makefile.common install_net_z3950_simpleserver
87         make -f $(DIR)/Makefile.common install_cpan
88         make -f $(DIR)/Makefile.common install_cpan_force
89
90 install_postgres_server:
91         yum -y install $(PGSQL_FEDORA_RPMS)
92
93 install_fedora_rpms:
94         yum -y update
95         yum -y install $(FEDORA_RPMS)
96
97 install_js_sm: install_libjs install_spidermonkey
98
99 install_libjs: 
100         if [ ! -f $(LIBJS).tar.gz ]; then wget $(LIBJS_URL); fi;
101         tar -zxf $(LIBJS).tar.gz
102         cd js/src/ && JS_DIST=/usr make -f Makefile.ref
103         mkdir -p $(JS_INSTALL_PREFIX)/include/js/
104         cp js/src/*.h $(JS_INSTALL_PREFIX)/include/js/
105         cp js/src/*.tbl $(JS_INSTALL_PREFIX)/include/js/
106         if [ ! -z $(FEDORA_64) ]; then \
107                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib64/ && \
108                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib64/; \
109         else \
110                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib/ && \
111                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib/; \
112         fi;
113         ldconfig
114
115 install_spidermonkey:
116         if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi;
117         tar -zxf $(LIBJS_PERL).tar.gz
118         if [ ! -z $(FEDORA_64) ]; then \
119                 sed -i -e 's/"\/usr\/lib"/"\/usr\/lib64"/' $(LIBJS_PERL)/Makefile.PL ; \
120         fi;
121         if [ ! -z $(FEDORA) ]; then \
122                 sed -i -e 's/js32.dll/libjs.so/' $(LIBJS_PERL)/Makefile.PL ; \
123         fi;
124         cd $(LIBJS_PERL) && perl Makefile.PL -E4X && make && make test && make install
125
126
127 clean:
128         make -f $(DIR)/Makefile.common clean
129
130 # vim:noet:sw=4:ts=4: