1 # Copyright 2007 MJ Ray
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
18 # Current maintainer MJR http://mjr.towers.org.uk/
19 # See http://www.koha.org/wiki/?page=KohaInstaller
21 use ExtUtils::MakeMaker;
24 die "perl 5.6.1 or later required" unless ($] >= 5.006001);
28 Makefile.PL - Koha packager and installer
37 This is a packager and installer that uses
38 ExtUtils::MakeMaker, which is fairly common
40 As well as building tar or zip files
42 it allows us to check pre-requisites
43 and generate configuration files.
47 =head2 NAME, VERSION, ABSTRACT, AUTHOR
49 Basic metadata about this software.
53 Suppress generation of META.yml file.
57 Hash of perl modules and versions required.
65 Maybe use prompt() here in future to get configuration values at installation time.
69 This is a hash of PL scripts to run after installation and
70 the files to ask them to generate.
71 Maybe use the values from CONFIGURE
72 to generate initial configuration files.
79 VERSION => strftime('2.9.%Y%m%d%H'),
80 ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
81 AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
87 'Data::Dumper' => 2.121_08,
88 'Data::Random' => 0.05,
90 'Date::Manip' => 5.44,
91 'Digest::MD5' => 2.36,
93 'GD::Barcode::UPCE' => 1.1,
94 'Getopt::Long' => 2.35,
95 'Getopt::Std' => 1.05,
96 'HTML::Template::Pro' => 0.65,
97 'HTML::Tree' => 3.1901,
98 'HTTP::Cookies' => 1.39,
99 'HTTP::Request::Common' => 1.26,
100 'LWP::Simple' => 1.41,
101 'LWP::UserAgent' => 2.033,
102 'Lingua::Stem' => 0.82,
103 'List::Util' => 1.18,
104 'Locale::Language' => 2.07,
105 'MARC::Charset' => 0.95,
106 'MARC::File::XML' => 0.86,
107 'MARC::Record' => 1.38,
108 'MIME::Base64' => 3.07,
109 'MIME::QuotedPrint' => 3.07,
110 'Mail::Sendmail' => 0.79,
111 'PDF::API2' => 2.000,
112 'PDF::API2::Page' => 2.000,
113 'PDF::API2::Util' => 2.000,
114 'PDF::Reuse' => 0.33,
115 'PDF::Reuse::Barcode' => 0.05,
117 'Term::ANSIColor' => 1.10,
119 'Test::Harness' => 2.56,
120 'Test::More' => 0.62,
121 'Text::Wrap' => 2005.082401,
122 'Time::HiRes' => 1.86,
123 'Time::localtime' => 1.02,
124 'Unicode::Normalize' => 0.32,
125 'XML::LibXML' => 1.59,
126 'XML::SAX::ParserFactory' => 1.01,
127 'XML::Simple' => 2.14,
135 # # Ask for options with prompt($question,$default) calls here?
136 # return { macro => { 'export TEST' => '755' } }
139 # PL_FILES => { # generator => target
140 # 'opac/getfromintranet.PL' => ['$(INST_LIBDIR)/opac/cgi-bin/detail.pl','$(INST_LIBDIR)/opac/cgi-bin/moredetail.pl','$(INST_LIBDIR)/opac/cgi-bin/search.pl','$(INST_LIBDIR)/opac/cgi-bin/subjectsearch.pl','$(INST_LIBDIR)/opac/cgi-bin/logout.pl'],
141 # 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
142 # 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
143 # 'misc/koha.sql.PL' => '$(INST_LIBDIR)/intranet/scripts/koha.sql',
144 # 'z3950/z3950-daemon-options.PL' => '$(INST_LIBDIR)/intranet/scripts/z3950daemon/z3950-daemon-options',
145 # # fake target to check permissions
146 # 'misc/chmod.PL' => '$(INST_LIBDIR)/fake-target'
148 # need to set ownerships
149 # need to load koha.sql
150 # need to link koha-httpd.conf
151 # need to start z3950-daemon
158 This function lists all files and where to install each one.
159 It returns a hash reference suitable for PM.
168 C4/*.pm is copied to perl's lib namespace.
171 foreach my $src (glob("C4/*.pm")) {
172 $result{$src} = '$(INST_LIBDIR)/'.$src;
177 CGIs are copied to koha/cgi-bin
178 and other scripts to koha/examples.
181 # Misc scripts to koha/examples
182 foreach my $src (glob("*.pl"),glob("*/*.pl"),glob("installer/*.pm"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
183 if ($src =~ /(misc|updater|rss)\//) {
184 $result{$src} = '$(INST_LIBDIR)/koha/scripts/'.$src;
186 $result{$src} = '$(INST_LIBDIR)/koha/cgi-bin/'.$src;
192 Templates are copied to koha/templates,
195 foreach my $src (glob("koha-tmpl/*"),glob("koha-tmpl/intranet-tmpl/*/*/*"),glob("koha-tmpl/intranet-tmpl/*/*/*/*"),glob("koha-tmpl/intranet-tmpl/*/*/*/*/*"),glob("koha-tmpl/opac-tmpl/*/*/*"),glob("koha-tmpl/opac-tmpl/*/*/*/*"),glob("koha-tmpl/opac-tmpl/*/*/*/*/*")) {
199 excluding non-files, CVS files and whitespace in filenames.
202 if ((-f $src) && ($src !~ /(\/CVS\/|\s)/)) {
203 $result{$src} = '$(INST_LIBDIR)/koha/templates/'.$src;
215 ExtUtils::MakeMaker(3)