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
40 This is a packager and installer that uses
41 ExtUtils::MakeMaker, which is fairly common
43 As well as building tar or zip files
45 it allows us to check pre-requisites
46 and generate configuration files.
50 =head2 NAME, VERSION, ABSTRACT, AUTHOR
52 Basic metadata about this software.
56 Suppress generation of META.yml file.
60 Hash of perl modules and versions required.
68 Maybe use prompt() here in future to get configuration values at installation time.
72 This is a hash of PL scripts to run after installation and
73 the files to ask them to generate.
74 Maybe use the values from CONFIGURE
75 to generate initial configuration files.
82 VERSION => strftime('2.9.%Y%m%d%H',gmtime),
83 ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
84 AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
89 'Class::Accessor' => 0.30,
90 'DBD::mysql' => 3.0008,
92 'Data::Dumper' => 2.121_08,
93 'Data::Random' => 0.05,
95 'Date::Manip' => 5.44,
96 'Digest::MD5' => 2.36,
99 'GD::Barcode::UPCE' => 1.1,
100 'Getopt::Long' => 2.35,
101 'Getopt::Std' => 1.05,
102 'HTML::Template' => 2.8,
103 'HTML::Template::Pro' => 0.65,
104 'HTML::Tree' => 3.1901,
105 'HTTP::Cookies' => 1.39,
106 'HTTP::Request::Common' => 1.26,
107 'LWP::Simple' => 1.41,
108 'LWP::UserAgent' => 2.033,
109 'Lingua::Stem' => 0.82,
110 'List::Util' => 1.18,
111 'Locale::Language' => 2.07,
112 'MARC::Charset' => 0.95,
113 'MARC::File::XML' => 0.86,
114 'MARC::Record' => 1.38,
115 'MIME::Base64' => 3.07,
116 'MIME::QuotedPrint' => 3.07,
117 'Mail::Sendmail' => 0.79,
119 'Net::Z3950::ZOOM' => 1.16,
120 'PDF::API2' => 2.000,
121 'PDF::API2::Page' => 2.000,
122 'PDF::API2::Util' => 2.000,
123 'PDF::Reuse' => 0.33,
124 'PDF::Reuse::Barcode' => 0.05,
126 'Term::ANSIColor' => 1.10,
128 'Test::Harness' => 2.56,
129 'Test::More' => 0.62,
130 'Text::Wrap' => 2005.082401,
131 'Time::HiRes' => 1.86,
132 'Time::localtime' => 1.02,
133 'Unicode::Normalize' => 0.32,
134 'XML::LibXML' => 1.59,
135 'XML::SAX::ParserFactory' => 1.01,
136 'XML::Simple' => 2.14,
144 # # Ask for options with prompt($question,$default) calls here?
145 # return { macro => { 'export TEST' => '755' } }
148 # PL_FILES => { # generator => target
149 # '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'],
150 # 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
151 # 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
152 # 'misc/koha.sql.PL' => '$(INST_LIBDIR)/intranet/scripts/koha.sql',
153 # 'z3950/z3950-daemon-options.PL' => '$(INST_LIBDIR)/intranet/scripts/z3950daemon/z3950-daemon-options',
154 # # fake target to check permissions
155 # 'misc/chmod.PL' => '$(INST_LIBDIR)/fake-target'
157 # need to set ownerships
158 # need to load koha.sql
159 # need to link koha-httpd.conf
160 # need to start z3950-daemon
167 This function lists all files and where to install each one.
168 It returns a hash reference suitable for PM.
177 C4/*.pm is copied to perl's lib namespace.
180 foreach my $src (glob("C4/*.pm")) {
181 $result{$src} = '$(INST_LIBDIR)/'.$src;
186 CGIs are copied to koha/cgi-bin
187 and other scripts to koha/examples.
190 # Misc scripts to koha/examples
191 foreach my $src (glob("*.pl"),glob("*/*.pl"),glob("installer/*.pm"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
192 if ($src =~ /(misc|updater|rss)\//) {
193 $result{$src} = '$(INST_LIBDIR)/koha/scripts/'.$src;
195 $result{$src} = '$(INST_LIBDIR)/koha/cgi-bin/'.$src;
201 Templates are copied to koha/templates,
204 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/*/*/*/*/*")) {
208 excluding non-files, CVS files and whitespace in filenames.
211 if ((-f $src) && ($src !~ /(\/CVS\/|\s)/)) {
212 $result{$src} = '$(INST_LIBDIR)/koha/templates/'.$src;
224 ExtUtils::MakeMaker(3)