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
--prev-install-log Read configuration from previous installation --install_mode Installation mode (dev, standard, single) --db_type Database (mysql, Pg) --db_host Database host (e.g. localhost) --db_port Database port (e.g. 3306) --db_name Database name (e.g. koha) --db_user Database user (e.g. kohaadmin) --db_pass Database password (e.g. katikoan) --zebra_marc_format Zebra MARC format (marc21, normarc, unimarc) --zebra_language Zebra language (e.g. en) --zebra_tokenizer Zebra tokenizer (chr, icu) --zebra_user Zebra user (e.g. kohauser) --zebra_pass Zebra password (e.g. zebrastripes) --zebra_sru_host Zebra SRU servername (e.g. localhost) --zebra_sru_biblios_port Zebra SRU biblios port (e.g. 9998) --zebra_sru_authorities_port Zebra SRU biblios port (e.g. 9999) --koha_user Koha Unix user (e.g. koha) --koha_group Koha Unix group (e.g. koha) --install_sru Install the SRU server (yes, no) --install_pazpar2 Install PazPar2 (yes, no) --use_memcached Use Memcached (yes, no) --font_dir Location of fonts (e.g. /usr/share/fonts/truetype/dejavu) --run_database_tests Run database dependent tests (yes, no) --install_base Base directory of installation (e.g. /usr/share/koha) --template-cache-dir Specify a template cache directory (e.g. /var/cache/koha) --help Display this help message
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. This includes subdirs for authorities, biblios, and the zebra rebuild function. Any activity to reindex zebra from koha should interlock here with rebuild_zebra.pl.
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 external Koha plugins.
Directory for PazPar2 configuration files.
Directory where DejaVu fonts are installed.
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.
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 values provided on cli for configuration values
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.
Add an installation target for updating Zebra's configuration files.
MJ Ray mjr at phonecoop.coop Galen Charlton galen.charlton at liblime.com