Fedora: remove source installs for packaged dependencies
[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-DBD-Pg \
32         perl-Email-Send \
33         perl-Email-Simple \
34         perl-GDGraph3d \
35         perl-JSON-XS \
36         perl-LDAP \
37         perl-Library-CallNumber-LC \
38         perl-Locale-Codes \
39         perl-MARC-Charset \
40         perl-MARC-Record \
41         perl-MARC-XML \
42         perl-Module-Pluggable \
43         perl-Net-IP \
44         perl-Net-SSH2 \
45         perl-OLE-Storage_Lite \
46         perl-RPC-XML \
47         perl-SOAP-Lite \
48         perl-Spreadsheet-WriteExcel \
49         perl-Test-Warn \
50         perl-Text-Aspell \
51         perl-Text-CSV \
52         perl-Text-CSV_XS \
53         perl-UUID-Tiny \
54         perl-XML-Writer \
55         postgresql-devel \
56         readline-devel \
57         tcp_wrappers-devel \
58         wget \
59         yaz
60
61 export CPAN_MODULES = \
62         Net::Z3950::ZOOM \
63         Net::Z3950::Simple2ZOOM \
64         Template::Plugin::POSIX \
65         SRU \
66         Rose::URI
67
68 export CPAN_MODULES_FORCE = \
69         Class::DBI::Frozen::301 \
70         Business::OnlinePayment \
71         Business::OnlinePayment::AuthorizeNet \
72         Business::OnlinePayment::PayPal
73
74 PGSQL_FEDORA_RPMS = \
75         postgresql \
76         postgresql-contrib \
77         postgresql-libs \
78         postgresql-plperl \
79         postgresql-server
80
81 all: install_fedora_rpms install_js_sm
82         make -f $(DIR)/Makefile.common install_net_z3950_simpleserver
83         make -f $(DIR)/Makefile.common install_cpan
84         make -f $(DIR)/Makefile.common install_cpan_force
85
86 install_postgres_server:
87         yum -y install $(PGSQL_FEDORA_RPMS)
88
89 install_fedora_rpms:
90         yum -y update
91         yum -y install $(FEDORA_RPMS)
92
93 install_js_sm: install_libjs install_spidermonkey
94
95 install_libjs: 
96         if [ ! -f $(LIBJS).tar.gz ]; then wget $(LIBJS_URL); fi;
97         tar -zxf $(LIBJS).tar.gz
98         cd js/src/ && JS_DIST=/usr make -f Makefile.ref
99         mkdir -p $(JS_INSTALL_PREFIX)/include/js/
100         cp js/src/*.h $(JS_INSTALL_PREFIX)/include/js/
101         cp js/src/*.tbl $(JS_INSTALL_PREFIX)/include/js/
102         if [ ! -z $(FEDORA_64) ]; then \
103                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib64/ && \
104                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib64/; \
105         else \
106                 cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib/ && \
107                 cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib/; \
108         fi;
109         ldconfig
110
111 install_spidermonkey:
112         if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi;
113         tar -zxf $(LIBJS_PERL).tar.gz
114         if [ ! -z $(FEDORA_64) ]; then \
115                 sed -i -e 's/"\/usr\/lib"/"\/usr\/lib64"/' $(LIBJS_PERL)/Makefile.PL ; \
116         fi;
117         if [ ! -z $(FEDORA) ]; then \
118                 sed -i -e 's/js32.dll/libjs.so/' $(LIBJS_PERL)/Makefile.PL ; \
119         fi;
120         cd $(LIBJS_PERL) && perl Makefile.PL -E4X && make && make test && make install
121
122
123 clean:
124         make -f $(DIR)/Makefile.common clean
125
126 # vim:noet:sw=4:ts=4: