Makefile.PL - Koha packager and installer
perl Makefile.PL make make test sudo make install
NOTE: This option is only available if koha-install-log exists. perl Makefile.PL --prev-install-log /path/to/koha-install-log make make test sudo make upgrade
make manifest tardist make manifest zipdist
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 with the above commands, it allows us to check pre-requisites and generate configuration files.
Basic metadata about this software.
Suppress generation of META.yml file.
Hash of perl modules and versions required.
Hash of file mappings
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 in future.
This is a hash mapping directories and files in the source tree to installation target directories. The rules for this mapping are:
$target_maphash as minimal as possible.
The permitted installation targets are:
CGI scripts for intranet (staff) interface.
HTML templates for the intranet interface.
HTML files, images, etc. for DocumentRoot for the intranet interface.
CGI scripts for OPAC (public) interface.
HTML templates for the OPAC interface.
HTML files, images, etc. for DocumentRoot for the OPAC interface.
Perl modules (at present just the C4 modules) that are intimately tied to Koha. Depending on the installation options, these may or may not be installed one of the standard directories in Perl's default @LIB.
Directory for Koha configuration files.
Directory for Zebra configuration files.
Directory for Zebra's lock files.
Directory for Zebra's data files.
Directory for Zebra's UNIX-domain sockets.
Directory for for miscellaenous scripts, among other things the translation toolkit and RSS feed tools.
Directory for command-line scripts and daemons to be set up all for installation modes.
Directory for command-line scripts that should be installed in the same directory as the SCRIPT_DIR target except 'dev' installs.
Directory for man pages created from POD -- will mostly contain information of interest to Koha developers.
Directory for Koha documentation accessed from the command-line, e.g., READMEs.
Directory for Apache and Zebra logs produced by Koha.
Directory for backup files produced by Koha.
Directory for PazPar2 configuration files.
This is a dummy target used to explicitly state that a given file or directory is not to be installed. This is used either for parts of the installer itself or for development tools that are not applicable to a production installation.
The following configuration options are used by the installer.
Specifies whether installation will be FHS-compliant (default, assumes user has root), put everything under a single directory (for users installing on a web host that allows CGI scripts and a MySQL database but not root access), or development (for a developer who wants to run Koha from a git clone with no fuss).
Directory under which most components will go. Default value will vary depending on INSTALL_MODE.
Type of DBMS (e.g., mysql or Pg).
Name of DBMS server.
Port that DBMS server is listening on.
Name of the DBMS database for Koha.
Name of DBMS user account for Koha's database.
Pasword of DMBS user account for Koha's database.
Whether to install Zebra configuration files and data directories.
Specifies format of MARC records to be indexed by Zebra.
Specifies primary language of records that will be indexed by Zebra.
Internal Zebra user account for the index.
Internal Zebra user account's password.
System user account that will own Koha's files.
System group that will own Koha's files.
This function recurses through the directory structure and builds a hash of hashes containing the structure with arrays holding filenames. This directory hashing routine was taken from BrowserUK @ http://www.perlmonks.org/?node_id=219919
This function combines the target_map and file hash to map each source file to its destination relative to the set of installation targets.
Output will be a hash mapping from each source file to its destination value, like this:
'mainpage.pl' => '$(INTRANET_CGI_DIR)/mainpage.pl'
Reads value from the Koha install log specified by --prev-install-log
This prompts the user for various configuration options.
Creates a hash mapping from symbols for installation target directories to actual directory paths.
Also returns a hash indicating targets for which files need not be copied -- this is used for the 'dev' mode installation, where some files are installed in place.
Map a directory target to the corresponding path for the test suite.
Attempt to find Zebra - check user's PATH and a few other directories for zebrasrv and zebraidx.
FIXME: doesn't handle Win32
Add an installation target for updating Zebra's configuration files.
MJ Ray mjr at phonecoop.coop Galen Charlton galen.charlton at liblime.com