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 # 2007-11-05 Corrected CGI copy to include entire 'installer' subdir structure. -fbcit
22 use ExtUtils::MakeMaker;
25 die "perl 5.6.1 or later required" unless ($] >= 5.006001);
29 Makefile.PL - Koha packager and installer
33 =head2 BASIC INSTALLATION
39 =head2 PACKAGING RELEASE TARBALLS
50 This is a packager and installer that uses
51 ExtUtils::MakeMaker, which is fairly common
53 As well as building tar or zip files
54 and installing with the above commands,
55 it allows us to check pre-requisites
56 and generate configuration files.
60 =head2 NAME, VERSION_FROM, ABSTRACT, AUTHOR
62 Basic metadata about this software.
66 Suppress generation of META.yml file.
70 Hash of perl modules and versions required.
78 Maybe use prompt() here in future to get configuration values
79 interactively at installation time.
83 This is a hash of PL scripts to run after installation and
84 the files to ask them to generate.
85 Maybe use the values from CONFIGURE
86 to generate initial configuration files in future.
93 #VERSION => strftime('2.9.%Y%m%d%H',gmtime),
94 VERSION_FROM => 'C4/Context.pm',
95 ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
96 AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
101 'CGI::Session' => '4.10',
102 'Class::Factory::Util' => 1.7,
103 'Class::Accessor' => 0.30,
104 'DBD::mysql' => 3.0008,
106 'Data::Dumper' => 2.121_08,
108 'Date::Manip' => 5.44,
109 'Digest::MD5' => 2.36,
110 'File::Temp' => 0.16,
111 'GD::Barcode::UPCE' => 1.1,
112 'Getopt::Long' => 2.35,
113 'Getopt::Std' => 1.05,
114 'HTML::Template::Pro' => 0.65,
115 'HTTP::Cookies' => 1.39,
116 'HTTP::Request::Common' => 1.26,
117 'LWP::Simple' => 1.41,
118 'LWP::UserAgent' => 2.033,
119 'Lingua::Stem' => 0.82,
120 'List::Util' => 1.18,
121 'Locale::Language' => 2.07,
122 'MARC::Charset' => 0.95,
123 'MARC::File::XML' => 0.86,
124 'MARC::Record' => 1.38,
125 'MARC::Crosswalk::DublinCore' => 0.02,
126 'MIME::Base64' => 3.07,
127 'MIME::QuotedPrint' => 3.07,
128 'Mail::Sendmail' => 0.79,
129 'PDF::API2' => 2.000,
130 'PDF::API2::Page' => 2.000,
131 'PDF::API2::Util' => 2.000,
132 'PDF::Reuse' => 0.33,
133 'PDF::Reuse::Barcode' => 0.05,
135 'Schedule::At' => 1.06,
136 'Term::ANSIColor' => 1.10,
138 'Test::Harness' => 2.56,
139 'Test::More' => 0.62,
141 'Text::Wrap' => 2005.082401,
142 'Time::HiRes' => 1.86,
143 'Time::localtime' => 1.02,
144 'Unicode::Normalize' => 0.32,
145 'XML::Dumper' => 0.81,
146 'XML::LibXML' => 1.59,
147 'XML::SAX::ParserFactory' => 1.01,
148 'XML::Simple' => 2.14,
157 'test' => {TESTS => 't/dummy.t'},
160 # # Ask for options with prompt($question,$default) calls here?
161 # return { macro => { 'export TEST' => '755' } }
164 PL_FILES => { # generator => target(s)
165 'rewrite-config.PL' => [
166 '$(PREFIX)/share/koha/etc/koha-conf.xml',
167 '$(PREFIX)/share/koha/etc/koha-httpd.conf',
168 '$(PREFIX)/share/koha/etc/zebradb/etc/passwd',
169 '$(PREFIX)/share/koha/etc/zebradb/zebra-biblios.cfg',
170 '$(PREFIX)/share/koha/etc/zebradb/zebra-authorities.cfg'
173 # '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'],
174 # 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
175 # 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
176 # 'misc/koha.sql.PL' => '$(INST_LIBDIR)/intranet/scripts/koha.sql',
177 # 'z3950/z3950-daemon-options.PL' => '$(INST_LIBDIR)/intranet/scripts/z3950daemon/z3950-daemon-options',
178 # # fake target to check permissions
179 # 'misc/chmod.PL' => '$(INST_LIBDIR)/fake-target'
181 # need to set ownerships
182 # need to load koha.sql
183 # need to link koha-httpd.conf
184 # need to start z3950-daemon
191 This function lists all files and where to install each one.
192 It returns a hash reference suitable for the PM variable above.
201 C4/*.pm is copied to perl's lib namespace.
204 foreach my $src (glob("C4/*.pm")) {
205 $result{$src} = '$(INST_LIBDIR)/'.$src;
210 CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/
211 and other scripts to koha/
214 foreach my $src ("mainpage.pl","help.pl","kohaversion.pl",glob("*/*.pl"),glob("installer/*"),glob("installer/*/*/*/*"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
215 if ($src =~ /(misc|updater|rss)\//) {
216 $result{$src} = '$(INST_LIBDIR)/koha/'.$src;
218 $result{$src} = '$(PREFIX)/lib/cgi-bin/koha/'.$src;
224 Templates are copied to koha/templates,
227 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/*/*/*/*/*")) {
231 excluding non-files and whitespace in filenames.
234 if ((-f $src) && ($src !~ /(\s)/)) {
235 $result{$src} = '$(INST_LIBDIR)/koha/templates/'.$src;
240 etc files are copied to /usr/share/koha/etc/
243 # Misc etc to koha/etc
244 foreach my $src (glob("etc/zebradb/*/*/*"),glob("etc/zebradb/*/*"),glob("etc/zebradb/*"),glob("etc/*")) {
246 $result{$src} = '$(PREFIX)/share/koha/'.$src;
259 ExtUtils::MakeMaker(3)
263 MJ Ray mjr at phonecoop.coop