7f380c5cbab235bf2dec99985f774060ba03fb8e
[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-Test-Output \
53         perl-Text-Aspell \
54         perl-Text-CSV \
55         perl-Text-CSV_XS \
56         perl-UUID-Tiny \
57         perl-XML-Writer \
58         postgresql-devel \
59         readline-devel \
60         tcp_wrappers-devel \
61         wget \
62         yaz
63
64 export CPAN_MODULES = \
65         Business::ISSN \
66         Net::Z3950::ZOOM \
67         Net::Z3950::Simple2ZOOM \
68         Business::Stripe \
69         Template::Plugin::POSIX \
70         SRU \
71         Rose::URI
72
73 export CPAN_MODULES_FORCE = \
74         Class::DBI::Frozen::301 \
75         Business::OnlinePayment \
76         Business::OnlinePayment::AuthorizeNet \
77         Business::OnlinePayment::PayPal
78
79 PGSQL_FEDORA_RPMS = \
80         postgresql \
81         postgresql-contrib \
82         postgresql-libs \
83         postgresql-plperl \
84         postgresql-server
85
86 all: install_fedora_rpms install_js_sm
87         make -f $(DIR)/Makefile.common install_net_z3950_simpleserver
88         make -f $(DIR)/Makefile.common install_cpan
89         make -f $(DIR)/Makefile.common install_cpan_force
90
91 install_postgres_server:
92         yum -y install $(PGSQL_FEDORA_RPMS)
93
94 install_fedora_rpms:
95         yum -y update
96         yum -y install $(FEDORA_RPMS)
97
98 install_js_sm: install_libjs install_spidermonkey
99
100 install_libjs: 
101         if [ ! -f $(LIBJS).tar.gz ]; then wget $(LIBJS_URL); fi;
102         tar -zxf $(LIBJS).tar.gz
103         cd js/src/ && JS_DIST=/usr make -f Makefile.ref
104         mkdir -p $(JS_INSTALL_PREFIX)/include/js/
105         cp js/src/*.h $(JS_INSTALL_PREFIX)/include/js/
106         cp js/src/*.tbl $(JS_INSTALL_PREFIX)/include/js/
107         if [ ! -z $(FEDORA_64) ]; then \
108                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib64/ && \
109                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib64/; \
110         else \
111                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib/ && \
112                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib/; \
113         fi;
114         ldconfig
115
116 install_spidermonkey:
117         if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi;
118         tar -zxf $(LIBJS_PERL).tar.gz
119         if [ ! -z $(FEDORA_64) ]; then \
120                 sed -i -e 's/"\/usr\/lib"/"\/usr\/lib64"/' $(LIBJS_PERL)/Makefile.PL ; \
121         fi;
122         if [ ! -z $(FEDORA) ]; then \
123                 sed -i -e 's/js32.dll/libjs.so/' $(LIBJS_PERL)/Makefile.PL ; \
124         fi;
125         cd $(LIBJS_PERL) && perl Makefile.PL -E4X && make && make test && make install
126
127
128 clean:
129         make -f $(DIR)/Makefile.common clean
130
131 # vim:noet:sw=4:ts=4: