#
# Current maintainer MJR http://mjr.towers.org.uk/
# See http://www.koha.org/wiki/?page=KohaInstaller
-
+#
+# 2007-11-05 Corrected CGI copy to include entire 'installer' subdir structure. -fbcit
use ExtUtils::MakeMaker;
use POSIX;
=head1 SYNOPSIS
+=head2 BASIC INSTALLATION
+
perl Makefile.PL
make
sudo make install
+
+=head2 PACKAGING RELEASE TARBALLS
+
make manifest tardist
make manifest zipdist
+=head2 CLEANING UP
+
+ make clean
+
=head1 DESCRIPTION
This is a packager and installer that uses
ExtUtils::MakeMaker, which is fairly common
on perl systems.
As well as building tar or zip files
-and installing,
+and installing with the above commands,
it allows us to check pre-requisites
and generate configuration files.
=head1 VARIABLES
-=head2 NAME, VERSION, ABSTRACT, AUTHOR
+=head2 NAME, VERSION_FROM, ABSTRACT, AUTHOR
Basic metadata about this software.
=head2 CONFIGURE
-Maybe use prompt() here in future to get configuration values at installation time.
+Maybe use prompt() here in future to get configuration values
+interactively at installation time.
=head2 PL_FILES
This is a hash of PL scripts to run after installation and
the files to ask them to generate.
Maybe use the values from CONFIGURE
-to generate initial configuration files.
+to generate initial configuration files in future.
=cut
WriteMakefile(
NAME => 'koha',
- VERSION => strftime('2.9.%Y%m%d%H',gmtime),
+ #VERSION => strftime('2.9.%Y%m%d%H',gmtime),
+ VERSION_FROM => 'C4/Context.pm',
ABSTRACT => 'Award-winning integrated library system (ILS) and Web OPAC',
AUTHOR => 'Koha Developers <koha-devel@nongnu.org>',
NO_META => 1,
PREREQ_PM => {
+'Biblio::EndnoteStyle' => 0.05,
'CGI' => 3.15,
'CGI::Carp' => 1.29,
+'CGI::Session' => '4.10',
+'Class::Factory::Util' => 1.7,
'Class::Accessor' => 0.30,
'DBD::mysql' => 3.0008,
'DBI' => 1.53,
'Data::Dumper' => 2.121_08,
-'Data::Random' => 0.05,
'Date::Calc' => 5.4,
'Date::Manip' => 5.44,
'Digest::MD5' => 2.36,
-'Event' => 1.06,
'File::Temp' => 0.16,
'GD::Barcode::UPCE' => 1.1,
'Getopt::Long' => 2.35,
'Getopt::Std' => 1.05,
-'HTML::Template' => 2.8,
'HTML::Template::Pro' => 0.65,
-'HTML::Tree' => 3.1901,
'HTTP::Cookies' => 1.39,
'HTTP::Request::Common' => 1.26,
'LWP::Simple' => 1.41,
'List::Util' => 1.18,
'Locale::Language' => 2.07,
'MARC::Charset' => 0.95,
+'MARC::Crosswalk::DublinCore' => 0.03,
'MARC::File::XML' => 0.86,
'MARC::Record' => 1.38,
+'MARC::Crosswalk::DublinCore' => 0.02,
'MIME::Base64' => 3.07,
'MIME::QuotedPrint' => 3.07,
'Mail::Sendmail' => 0.79,
-'Net::Z3950' => 0,
'Net::Z3950::ZOOM' => 1.16,
'PDF::API2' => 2.000,
'PDF::API2::Page' => 2.000,
'PDF::Reuse' => 0.33,
'PDF::Reuse::Barcode' => 0.05,
'POSIX' => 1.09,
+'Schedule::At' => 1.06,
'Term::ANSIColor' => 1.10,
'Test' => 1.25,
'Test::Harness' => 2.56,
'Test::More' => 0.62,
+'Text::CSV' => 0.01,
'Text::Wrap' => 2005.082401,
'Time::HiRes' => 1.86,
'Time::localtime' => 1.02,
'Unicode::Normalize' => 0.32,
+'XML::Dumper' => 0.81,
'XML::LibXML' => 1.59,
+'XML::LibXSLT' => 1.63,
'XML::SAX::ParserFactory' => 1.01,
'XML::Simple' => 2.14,
'XML::RSS' => 1.31,
-'ZOOM' => 0,
},
# File tree mapping
PM => map_tree(),
+ # disable tests
+ 'test' => {TESTS => 't/dummy.t'},
+
# CONFIGURE => sub {
# # Ask for options with prompt($question,$default) calls here?
# return { macro => { 'export TEST' => '755' } }
# },
-# PL_FILES => { # generator => target
+ PL_FILES => { # generator => target(s)
+ 'rewrite-config.PL' => [
+ '$(PREFIX)/share/koha/etc/koha-conf.xml',
+ '$(PREFIX)/share/koha/etc/koha-httpd.conf',
+ '$(PREFIX)/share/koha/etc/zebradb/etc/passwd',
+ '$(PREFIX)/share/koha/etc/zebradb/zebra-biblios.cfg',
+ '$(PREFIX)/share/koha/etc/zebradb/zebra-authorities.cfg'
+ ]
+ }
# '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'],
# 'misc/koha.conf.PL' => '$(INST_LIBDIR)/../etc/koha.conf',
# 'misc/apache-koha.conf.PL' => '$(INST_LIBDIR)/../etc/apache-koha.conf',
=head2 map_tree
This function lists all files and where to install each one.
-It returns a hash reference suitable for PM.
+It returns a hash reference suitable for the PM variable above.
=cut
=pod
-CGIs are copied to koha/cgi-bin
-and other scripts to koha/examples.
+CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/
+and other scripts to koha/
=cut
- # Misc scripts to koha/examples
- foreach my $src (glob("*.pl"),glob("*/*.pl"),glob("installer/*.pm"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
+ foreach my $src ("mainpage.pl","help.pl","kohaversion.pl",glob("*/*.pl"),glob("installer/*"),glob("installer/*/*/*/*"),glob("*/*/*.pl"),glob("*/*/*/*.pl")) {
if ($src =~ /(misc|updater|rss)\//) {
- $result{$src} = '$(INST_LIBDIR)/koha/scripts/'.$src;
+ $result{$src} = '$(INST_LIBDIR)/koha/'.$src;
} else {
- $result{$src} = '$(INST_LIBDIR)/koha/cgi-bin/'.$src;
+ $result{$src} = '$(PREFIX)/lib/cgi-bin/koha/'.$src;
}
}
=pod
-excluding non-files, CVS files and whitespace in filenames.
+excluding non-files and whitespace in filenames.
=cut
- if ((-f $src) && ($src !~ /(\/CVS\/|\s)/)) {
+ if ((-f $src) && ($src !~ /(\s)/)) {
$result{$src} = '$(INST_LIBDIR)/koha/templates/'.$src;
}
}
+=pod
+
+etc files are copied to /usr/share/koha/etc/
+
+=cut
+ # Misc etc to koha/etc
+ foreach my $src (glob("etc/zebradb/*/*/*"),glob("etc/zebradb/*/*"),glob("etc/zebradb/*"),glob("etc/*")) {
+ if (-f $src) {
+ $result{$src} = '$(PREFIX)/share/koha/'.$src;
+ }
+ }
+
return \%result;
}
ExtUtils::MakeMaker(3)
+=head1 AUTHOR
+
+MJ Ray mjr at phonecoop.coop
+
=cut