Compare commits
2 Commits
upstream/0
...
upstream/0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56a986c0ba | ||
|
|
a6b4158f1f |
38
.gitignore
vendored
38
.gitignore
vendored
@@ -1,38 +0,0 @@
|
|||||||
autom4te.cache
|
|
||||||
subst
|
|
||||||
summary
|
|
||||||
*Makefile
|
|
||||||
config.log
|
|
||||||
config.status
|
|
||||||
scripts/rc.npcd
|
|
||||||
scripts/rc.pnp_gearman_worker
|
|
||||||
scripts/check_pnp_rrds.pl
|
|
||||||
scripts/process_perfdata.pl
|
|
||||||
scripts/rrd_modify.pl
|
|
||||||
src/*.o
|
|
||||||
src/npcd
|
|
||||||
include/config.h
|
|
||||||
*~
|
|
||||||
|
|
||||||
sample-config/pnp/config.php
|
|
||||||
sample-config/pnp/pnp4nagios_release
|
|
||||||
sample-config/pnp/process_perfdata.cfg-sample
|
|
||||||
sample-config/pnp/npcd.cfg-sample
|
|
||||||
sample-config/misccommands.cfg-sample
|
|
||||||
sample-config/nagios.cfg-sample
|
|
||||||
|
|
||||||
share/pnp/application/config/config.php
|
|
||||||
share/pnp/index.php
|
|
||||||
share/pnp/install.php
|
|
||||||
sample-config/httpd.conf
|
|
||||||
share/pnp/application/logs/*
|
|
||||||
contrib/ssi/status-header.ssi
|
|
||||||
helpers/w2h.pl
|
|
||||||
scripts/verify_pnp_config.pl
|
|
||||||
sample-config/lighttpd.pnp4nagios.conf
|
|
||||||
sample-config/nginx.pnp4nagios.conf
|
|
||||||
share/pnp/media/js/basket.js
|
|
||||||
scripts/rrd_convert.pl
|
|
||||||
scripts/rrd_converter.pl
|
|
||||||
|
|
||||||
man/npcd.8
|
|
||||||
4
AUTHORS
4
AUTHORS
@@ -1,3 +1,3 @@
|
|||||||
Authors:
|
Authors:
|
||||||
Jörg Linge pitchfork@pnp4nagios.org
|
Jörg Linge <pitchfork@pnp4nagios.org>
|
||||||
Hendrik Bäcker andurin@process-zero.de
|
Hendrik Bäcker <andurin@process-zero.de>
|
||||||
|
|||||||
28
ChangeLog
28
ChangeLog
@@ -1,4 +1,30 @@
|
|||||||
**pnp-0.6.?? ??/??/2015**
|
**pnp-0.6.27-4 09/12/2023**
|
||||||
|
* update URLs and related text
|
||||||
|
* clean up autoconf stuff
|
||||||
|
* add scripts/config4rpm_path.sh to test existing rpm installation (tjyang)
|
||||||
|
|
||||||
|
**pnp-0.6.27 08/18/2023**
|
||||||
|
* many php 8.2 fixes to remove 'deprecated' errors:
|
||||||
|
pre-defining class variables (instead of dynamic),
|
||||||
|
explicitly re-creating arrays as needed
|
||||||
|
converting utf8_encode to mbstring
|
||||||
|
|
||||||
|
**pnp-0.6.26-2 09/18/2022
|
||||||
|
* various php8 fixes
|
||||||
|
* rrdtools needs env XDG_CACHE_HOME for fontconfig
|
||||||
|
* fix so that 'bucket' display works
|
||||||
|
* fix so that pdf generation works
|
||||||
|
|
||||||
|
**pnp-0.6.?? ??/??/2017**
|
||||||
|
* Bugfix: Fix for CVE-2017-16834
|
||||||
|
|
||||||
|
**pnp-0.6.26 08/21/2017**
|
||||||
|
* Bugfix: Use complete option arguments for compatibility with rrdtool 1.6.0 (sbraz)
|
||||||
|
* Bugfix: Zoom on a special template not possbile (stinnux)
|
||||||
|
* Update: Update for FPDF (1.81) and FPDI (1.6.1) (Jan T. Bein )
|
||||||
|
* Bugfix: address behaviour of rrdtool1.5+ tp not export timestamp by default
|
||||||
|
* Feature: Template for icinga2's built-in icinga check (Tontonitch)
|
||||||
|
* Bugfix: fix non well formed numeric value encountered (sni)
|
||||||
|
|
||||||
**pnp-0.6.25 01/03/2015**
|
**pnp-0.6.25 01/03/2015**
|
||||||
* Update: FPDF Update to Version 1.7
|
* Update: FPDF Update to Version 1.7
|
||||||
|
|||||||
159
Makefile.in
Normal file → Executable file
159
Makefile.in
Normal file → Executable file
@@ -1,11 +1,13 @@
|
|||||||
###############################
|
###############################
|
||||||
# Makefile for PNP
|
# Makefile for PNP
|
||||||
#
|
#
|
||||||
# Last Modified: 12-10-2006
|
# Last Modified: 11-13-2023
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
|
VERSION=@PACKAGE_VERSION@
|
||||||
|
|
||||||
# Source code directories
|
# Source code directories
|
||||||
|
srcdir=@srcdir@
|
||||||
SRC_BASE=@srcdir@/src
|
SRC_BASE=@srcdir@/src
|
||||||
SRC_SHARE=@srcdir@/share
|
SRC_SHARE=@srcdir@/share
|
||||||
SRC_LIB=@srcdir@/lib
|
SRC_LIB=@srcdir@/lib
|
||||||
@@ -22,48 +24,81 @@ LDFLAGS=@LDFLAGS@ @LIBS@
|
|||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
LOGDIR=@localstatedir@
|
LOGDIR=@localstatedir@
|
||||||
CFGDIR=@sysconfdir@
|
|
||||||
BINDIR=@bindir@
|
BINDIR=@bindir@
|
||||||
LIBEXECDIR=@libexecdir@
|
LIBEXECDIR=@libexecdir@
|
||||||
LIBDIR=@libdir@
|
|
||||||
KOHANA=@KOHANA@
|
KOHANA=@KOHANA@
|
||||||
CGIDIR=@sbindir@
|
CGIDIR=@sbindir@
|
||||||
INSTALL=@INSTALL@
|
INSTALL=@INSTALL@
|
||||||
INSTALL_OPTS=@INSTALL_OPTS@
|
INSTALL_OPTS=@INSTALL_OPTS@
|
||||||
|
HTTP_INSTALL_OPTS=@HTTP_INSTALL_OPTS@
|
||||||
DATAROOTDIR=@datarootdir@
|
DATAROOTDIR=@datarootdir@
|
||||||
|
NAGIOS_VERSION=@NAGIOS_VER@
|
||||||
|
CACHE_DIR=@CACHE_DIR@
|
||||||
|
|
||||||
|
SELINUX=@SELINUX@
|
||||||
|
SELINUX_DEVELDIR=@SELINUX_DEVELDIR@
|
||||||
|
|
||||||
CP=@CP@
|
CP=@CP@
|
||||||
PERL=@PERL@
|
PERL=@PERL@
|
||||||
|
|
||||||
|
.PHONY: clean rpm dist distclean devclean
|
||||||
|
|
||||||
none:
|
none:
|
||||||
@echo "Please supply a command line argument (i.e. 'make all'). Other targets are:"
|
@echo "Please supply a command line argument (i.e. 'make all'). Other targets are:"
|
||||||
@echo " clean"
|
@echo " clean distclean dist"
|
||||||
@echo " install install-init install-config install-processperfdata install-html fullinstall"
|
@echo " install install-init install-selinux fullinstall"
|
||||||
@echo " install-plugins"
|
|
||||||
|
|
||||||
all:
|
all:
|
||||||
cd $(SRC_BASE) && $(MAKE)
|
cd $(SRC_BASE) && $(MAKE) $@
|
||||||
cd $(SRC_SHARE) && $(MAKE)
|
cd $(SRC_SHARE) && $(MAKE) $@
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE)
|
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
||||||
|
cd $(SRC_CONFIG) && $(MAKE) $@
|
||||||
chmod a+r $(SRC_CONTRIB)/ssi/status-header.ssi
|
chmod a+r $(SRC_CONTRIB)/ssi/status-header.ssi
|
||||||
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "*** Compile finished ***"
|
@echo "*** Compile finished ***"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " make install"
|
@echo " make install"
|
||||||
@echo " - This installs the main program and HTML files"
|
@echo " - This installs directories, binaries and php files"
|
||||||
|
@echo ""
|
||||||
|
@echo " make install-selinux"
|
||||||
|
@echo " - This installs the selinux setup (if you are using selinux)"
|
||||||
|
@echo ""
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " make fullinstall"
|
@echo " make fullinstall"
|
||||||
@echo " - This installs the main program, runlevel scripts, config and HTML files"
|
@echo " - install everything "
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Enjoy."
|
@echo "Enjoy."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
# this section from autoconf doc suggestions
|
||||||
|
# reautoconf if config changed
|
||||||
|
configure: configure.ac
|
||||||
|
autoconf
|
||||||
|
|
||||||
|
# autoheader might not change config.h.in, so touch a stamp file.
|
||||||
|
include/config.h.in: include/stamp-h.in ;
|
||||||
|
include/stamp-h.in: configure.ac
|
||||||
|
autoheader
|
||||||
|
date -Is > 'include/stamp-h.in'
|
||||||
|
|
||||||
|
include/config.h: include/stamp-h ;
|
||||||
|
include/stamp-h: include/config.h.in config.status
|
||||||
|
./config.status
|
||||||
|
|
||||||
|
Makefile: Makefile.in config.status
|
||||||
|
./config.status
|
||||||
|
|
||||||
|
config.status: configure
|
||||||
|
./config.status --recheck
|
||||||
|
|
||||||
|
|
||||||
scripts:
|
scripts:
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE)
|
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
||||||
|
|
||||||
share:
|
share:
|
||||||
cd $(SRC_SHARE) && $(MAKE)
|
cd $(SRC_SHARE) && $(MAKE) $@
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd $(SRC_BASE) && $(MAKE) $@
|
cd $(SRC_BASE) && $(MAKE) $@
|
||||||
@@ -75,6 +110,8 @@ clean:
|
|||||||
-rm -f *.cfg core
|
-rm -f *.cfg core
|
||||||
-rm -f *~ *.*~ */*~ */*.*~
|
-rm -f *~ *.*~ */*~ */*.*~
|
||||||
-rm -f config.log config.status config.cache
|
-rm -f config.log config.status config.cache
|
||||||
|
@SE@ rm -f pnp4nagios.fc
|
||||||
|
@SE@ rm -f pnp4nagios.if pnp4nagios.pp* tmp
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
cd $(SRC_BASE) && $(MAKE) $@
|
cd $(SRC_BASE) && $(MAKE) $@
|
||||||
@@ -89,56 +126,16 @@ distclean:
|
|||||||
rm -f Makefile include/stamp-h1 include/config.h config.status config.log
|
rm -f Makefile include/stamp-h1 include/config.h config.status config.log
|
||||||
rm -f subst summary
|
rm -f subst summary
|
||||||
rm -f $(SRC_CONTRIB)/ssi/status-header.ssi
|
rm -f $(SRC_CONTRIB)/ssi/status-header.ssi
|
||||||
|
rm -f $(SRC_CONTRIB)/fedora/pnp4nagios.logrotate.conf
|
||||||
|
rm -f $(SRC_CONTRIB)/fedora/logwatch/conf/logfiles/pnp4nagios.conf
|
||||||
|
@SE@ rm -f pnp4nagios.fc pnp4nagios.if pnp4nagios.pp* tmp
|
||||||
|
|
||||||
devclean: distclean
|
devclean: distclean
|
||||||
|
|
||||||
install-html:
|
|
||||||
cd $(SRC_SHARE) && $(MAKE) install
|
|
||||||
|
|
||||||
install-base:
|
|
||||||
cd $(SRC_BASE) && $(MAKE) install
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
cd $(SRC_MAN) && $(MAKE) install
|
|
||||||
|
|
||||||
install-processperfdata:
|
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE) install
|
|
||||||
|
|
||||||
install-init:
|
install-init:
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
||||||
|
|
||||||
install-config:
|
|
||||||
cd $(SRC_CONFIG) && $(MAKE) $@
|
|
||||||
|
|
||||||
@echo ""
|
|
||||||
@echo "*** PNP4Nagios sample config files installed ***"
|
|
||||||
@echo ""
|
|
||||||
@echo "Please run 'make install-init' if you want to use"
|
|
||||||
@echo "BULK Mode with NPCD"
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
install-webconf:
|
|
||||||
cd $(SRC_CONFIG) && $(MAKE) $@
|
|
||||||
|
|
||||||
|
|
||||||
@echo ""
|
|
||||||
@echo "*** Apache config file installed ***"
|
|
||||||
@echo ""
|
|
||||||
@echo "Restart your apache webserver to activete your changes."
|
|
||||||
@echo ""
|
|
||||||
@echo "Please run 'make install-config' to install sample"
|
|
||||||
@echo "configuration files"
|
|
||||||
@echo ""
|
|
||||||
@echo "Please run 'make install-init' if you want to use"
|
|
||||||
@echo "BULK Mode with NPCD"
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
install-plugins:
|
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cd $(SRC_BASE) && $(MAKE) $@
|
cd $(SRC_BASE) && $(MAKE) $@
|
||||||
@@ -147,37 +144,63 @@ install:
|
|||||||
if [ x$(KOHANA) = xyes ]; then \
|
if [ x$(KOHANA) = xyes ]; then \
|
||||||
cd $(SRC_LIB) && $(MAKE) $@; \
|
cd $(SRC_LIB) && $(MAKE) $@; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
||||||
cd $(SRC_CONFIG) && $(MAKE) $@
|
cd $(SRC_CONFIG) && $(MAKE) $@
|
||||||
|
$(INSTALL) $(HTTP_INSTALL_OPTS) -d $(DESTDIR)$(CACHE_DIR)
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "*** Main program, Scripts and HTML files installed ***"
|
@echo "*** Main program, Scripts and HTML files installed ***"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Please run 'make install-webconf' to install the"
|
|
||||||
@echo "web configuration file"
|
|
||||||
@echo ""
|
|
||||||
@echo "Please run 'make install-config' to install sample"
|
|
||||||
@echo "configuration files"
|
|
||||||
@echo ""
|
|
||||||
@echo "Please run 'make install-init' if you want to use"
|
|
||||||
@echo "BULK Mode with NPCD"
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
# Nagios might have some pnp4nagios selinux entries
|
||||||
|
# so mask out duplicates.
|
||||||
|
|
||||||
|
install-selinux:
|
||||||
|
@SE@ -rm nagios.pp
|
||||||
|
@SE@ -semodule -E nagios 2>/dev/null >/dev/null
|
||||||
|
@SE@ if [ -e nagios.pp ] ; then \
|
||||||
|
@SE@ semodule_unpackage nagios.pp nagios.mod nagios.fc ; \
|
||||||
|
@SE@ for pnpdir in /etc/pnp4nagios /var/log/pnp4nagios /var/lib/pnp4nagios /usr/lib/pnp4nagios ; \
|
||||||
|
@SE@ do \
|
||||||
|
@SE@ if grep -q "^$pnpdir" nagios.fc ; \
|
||||||
|
@SE@ then \
|
||||||
|
@SE@ sed -i "\\|^$pnpdir|s/^/#/" pnp4nagios.fc ; \
|
||||||
|
@SE@ fi \
|
||||||
|
@SE@ done \
|
||||||
|
@SE@ fi
|
||||||
|
@SE@ $(MAKE) -f $(SELINUX_DEVELDIR)/Makefile load
|
||||||
|
@SE@ fixfiles restore @datadir@ @pkgsysconfdir@
|
||||||
|
@SE@ fixfiles restore @PERFDATA_DIR@ @logdir@
|
||||||
|
@SE@ fixfiles restore @PERFDATA_SPOOL_DIR@ @piddir@
|
||||||
|
|
||||||
|
|
||||||
install-unstripped:
|
install-unstripped:
|
||||||
cd $(SRC_BASE) && $(MAKE) $@
|
cd $(SRC_BASE) && $(MAKE) $@
|
||||||
cd $(SRC_SHARE) && $(MAKE) $@
|
cd $(SRC_SHARE) && $(MAKE) $@
|
||||||
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
cd $(SRC_SCRIPTS) && $(MAKE) $@
|
||||||
$(MAKE) install-basic
|
$(MAKE) install-basic
|
||||||
|
|
||||||
fullinstall: install install-webconf install-config install-init
|
|
||||||
|
|
||||||
|
fullinstall:
|
||||||
|
$(MAKE) install
|
||||||
|
$(MAKE) install-selinux
|
||||||
$(PERL) summary fullinstall
|
$(PERL) summary fullinstall
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "*** Main program, Scripts and HTML files installed ***"
|
@echo "*** Main program, Scripts and HTML files installed ***"
|
||||||
|
@echo "Config files in: @pkgsysconfdir@ might need updating."
|
||||||
|
@echo ""
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Enjoy."
|
@echo "Enjoy."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
|
||||||
|
dist:
|
||||||
|
ci/maketar.sh $(VERSION)
|
||||||
|
mv ci/pnp4nagios*.tgz .
|
||||||
|
mv ci/pnp4nagios*.zip .
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
README
10
README
@@ -1,10 +0,0 @@
|
|||||||
#########################
|
|
||||||
# #
|
|
||||||
# README #
|
|
||||||
# #
|
|
||||||
#########################
|
|
||||||
|
|
||||||
See our online documentation at:
|
|
||||||
|
|
||||||
http://pnp4nagios.sourceforge.net or:
|
|
||||||
http://docs.pnp4nagios.org/
|
|
||||||
67
README.md
Normal file
67
README.md
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# PNP4Nagios
|
||||||
|
|
||||||
|
The new/current place for the pnp4nagios organization is
|
||||||
|
https://github.com/pnp4nagios
|
||||||
|
With this *particular* version residing in
|
||||||
|
https://github.com/pnp4nagios/pnp4nagios
|
||||||
|
|
||||||
|
|
||||||
|
This is a fork of [@lingej's original pnp4nagios package](https://github.com/lingej/pnp4nagios).
|
||||||
|
|
||||||
|
As a long-time user of `pnpnagios`, I am trying to give the project a
|
||||||
|
good home as we work to further develop and enhance this project. Please
|
||||||
|
contact me if you would like to help.
|
||||||
|
|
||||||
|
The original source was retired on commit 5e09f538373ac4310a13355746bb3d3a10eb7bef
|
||||||
|
(Version pnp-0.6.?? ??/??/2017 on 2022/Jan/16). Many thanks to Joerg Linge and his
|
||||||
|
awesome contributors for what we have, now!
|
||||||
|
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
For now, I'm advocating installing from source (**my** source), as we move
|
||||||
|
forward into further developing this project.
|
||||||
|
|
||||||
|
Instructions can be found in
|
||||||
|
[this gist](https://gist.github.com/russellvt/051fa43592778a41e53cb423b791bab6).
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
The old site for documentation at https://docs.pnp4nagios.org is no longer
|
||||||
|
up; the replacement is https://github.com/pnp4nagios/docs
|
||||||
|
It's possible that there are still some references to the old site scattered
|
||||||
|
here and there.
|
||||||
|
|
||||||
|
|
||||||
|
## About Me
|
||||||
|
|
||||||
|
I am a long time Nagios/Icinga/Monitoring/Devops Professional. I've been
|
||||||
|
"the toolsguy" long from "devops" was even a "new" term.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## build RPM from git
|
||||||
|
|
||||||
|
The spec file is in the "ci" subdirectory. Install git-build-rpm (it's on
|
||||||
|
github, surprise!) and, as an example:
|
||||||
|
|
||||||
|
HERE=(main directory of this git package; where this README.md file is located)
|
||||||
|
cd $HERE
|
||||||
|
autoconf # builds 'configure'
|
||||||
|
./configure # builds 'ci/pnp4nagios.spec'
|
||||||
|
git build-rpm --rpm-dir /home/local/lane/rpmbuild --spec ci/pnp4nagios.spec --dist .fc35
|
||||||
|
|
||||||
|
The --rpm-dir option is to keep the .srpm file from the build (it will be
|
||||||
|
in your usual SRPMS subdirectory in your rpmbuild tree), the
|
||||||
|
--dist option is to avoid the longwinded "-%{version}-%{release}%{timestamp}.%{dist}..." package name. The rpms will get copied from the rpmbuild tree to
|
||||||
|
$HERE.
|
||||||
|
|
||||||
|
You can also just get the source code, do a
|
||||||
|
autoconf
|
||||||
|
./configure
|
||||||
|
then
|
||||||
|
make all
|
||||||
|
etc....but some of us (me) prefers to have a software package, to organize
|
||||||
|
software installation/update/removal.
|
||||||
|
|
||||||
2
THANKS
2
THANKS
@@ -2,6 +2,8 @@
|
|||||||
# PNP Thanks #
|
# PNP Thanks #
|
||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
|
Russell M. Van Tassell - Taking over from 0.6.26+CVE-2017-16384
|
||||||
|
|
||||||
Olivier PLATHEY - For providing FPDF
|
Olivier PLATHEY - For providing FPDF
|
||||||
Sven Nierlein - For providing mod_gearman
|
Sven Nierlein - For providing mod_gearman
|
||||||
Michal Wojciechowski - For providing imgAreaSelect
|
Michal Wojciechowski - For providing imgAreaSelect
|
||||||
|
|||||||
54
aclocal.m4
vendored
Executable file
54
aclocal.m4
vendored
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
|
# -------------------------------------
|
||||||
|
# Define a conditional.
|
||||||
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
|
[AC_PREREQ([2.52])dnl
|
||||||
|
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
|
AC_SUBST([$1_TRUE])dnl
|
||||||
|
AC_SUBST([$1_FALSE])dnl
|
||||||
|
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||||
|
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||||
|
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||||
|
if $2; then
|
||||||
|
$1_TRUE=
|
||||||
|
$1_FALSE='#'
|
||||||
|
else
|
||||||
|
$1_TRUE='#'
|
||||||
|
$1_FALSE=
|
||||||
|
fi
|
||||||
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||||
|
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
|
fi])])
|
||||||
|
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||||
|
# ---------------------------
|
||||||
|
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||||
|
# This macro is traced by Automake.
|
||||||
|
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||||
|
|
||||||
|
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||||
|
# --------------------------
|
||||||
|
# Public sister of _AM_SUBST_NOTMAKE.
|
||||||
|
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||||
|
|
||||||
|
m4_include([autoconf-macros/ax_nagios_get_os])
|
||||||
|
m4_include([autoconf-macros/ax_nagios_get_distrib])
|
||||||
|
m4_include([autoconf-macros/ax_nagios_get_init])
|
||||||
|
m4_include([autoconf-macros/ax_nagios_get_paths])
|
||||||
|
m4_include([autoconf-macros/ax_nagios_get_files])
|
||||||
1
autoconf-macros/.gitignore
vendored
Normal file
1
autoconf-macros/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nbproject/
|
||||||
7
autoconf-macros/CHANGELOG.md
Normal file
7
autoconf-macros/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
1.0.1
|
||||||
|
-----
|
||||||
|
* Fix bug determining inetd,xinetd if neither are running (Bryan Heden)
|
||||||
|
|
||||||
|
1.0.0
|
||||||
|
-----
|
||||||
|
* Initial Release (John Frickson)
|
||||||
264
autoconf-macros/LICENSE
Normal file
264
autoconf-macros/LICENSE
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
The GNU General Public License, Version 2, June 1991 (GPLv2)
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
--------
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your freedom to share
|
||||||
|
and change it. By contrast, the GNU General Public License is intended to
|
||||||
|
guarantee your freedom to share and change free software--to make sure the
|
||||||
|
software is free for all its users. This General Public License applies to most
|
||||||
|
of the Free Software Foundation's software and to any other program whose
|
||||||
|
authors commit to using it. (Some other Free Software Foundation software is
|
||||||
|
covered by the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not price. Our
|
||||||
|
General Public Licenses are designed to make sure that you have the freedom to
|
||||||
|
distribute copies of free software (and charge for this service if you wish),
|
||||||
|
that you receive source code or can get it if you want it, that you can change
|
||||||
|
the software or use pieces of it in new free programs; and that you know you can
|
||||||
|
do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||||
|
you these rights or to ask you to surrender the rights. These restrictions
|
||||||
|
translate to certain responsibilities for you if you distribute copies of the
|
||||||
|
software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether gratis or for a
|
||||||
|
fee, you must give the recipients all the rights that you have. You must make
|
||||||
|
sure that they, too, receive or can get the source code. And you must show them
|
||||||
|
these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and (2) offer
|
||||||
|
you this license which gives you legal permission to copy, distribute and/or
|
||||||
|
modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain that
|
||||||
|
everyone understands that there is no warranty for this free software. If the
|
||||||
|
software is modified by someone else and passed on, we want its recipients to
|
||||||
|
know that what they have is not the original, so that any problems introduced by
|
||||||
|
others will not reflect on the original authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software patents. We wish
|
||||||
|
to avoid the danger that redistributors of a free program will individually
|
||||||
|
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||||
|
this, we have made it clear that any patent must be licensed for everyone's free
|
||||||
|
use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification
|
||||||
|
follow.
|
||||||
|
|
||||||
|
|
||||||
|
Terms And Conditions For Copying, Distribution And Modification
|
||||||
|
---------------------------------------------------------------
|
||||||
|
|
||||||
|
**0.** This License applies to any program or other work which contains a notice
|
||||||
|
placed by the copyright holder saying it may be distributed under the terms of
|
||||||
|
this General Public License. The "Program", below, refers to any such program or
|
||||||
|
work, and a "work based on the Program" means either the Program or any
|
||||||
|
derivative work under copyright law: that is to say, a work containing the
|
||||||
|
Program or a portion of it, either verbatim or with modifications and/or
|
||||||
|
translated into another language. (Hereinafter, translation is included without
|
||||||
|
limitation in the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not covered by
|
||||||
|
this License; they are outside its scope. The act of running the Program is not
|
||||||
|
restricted, and the output from the Program is covered only if its contents
|
||||||
|
constitute a work based on the Program (independent of having been made by
|
||||||
|
running the Program). Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
**1.** You may copy and distribute verbatim copies of the Program's source code
|
||||||
|
as you receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice and
|
||||||
|
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||||
|
and to the absence of any warranty; and give any other recipients of the Program
|
||||||
|
a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and you may at
|
||||||
|
your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
**2.** You may modify your copy or copies of the Program or any portion of it,
|
||||||
|
thus forming a work based on the Program, and copy and distribute such
|
||||||
|
modifications or work under the terms of Section 1 above, provided that you also
|
||||||
|
meet all of these conditions:
|
||||||
|
|
||||||
|
* **a)** You must cause the modified files to carry prominent notices stating
|
||||||
|
that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
* **b)** You must cause any work that you distribute or publish, that in whole
|
||||||
|
or in part contains or is derived from the Program or any part thereof, to
|
||||||
|
be licensed as a whole at no charge to all third parties under the terms of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
* **c)** If the modified program normally reads commands interactively when
|
||||||
|
run, you must cause it, when started running for such interactive use in the
|
||||||
|
most ordinary way, to print or display an announcement including an
|
||||||
|
appropriate copyright notice and a notice that there is no warranty (or
|
||||||
|
else, saying that you provide a warranty) and that users may redistribute
|
||||||
|
the program under these conditions, and telling the user how to view a copy
|
||||||
|
of this License. (Exception: if the Program itself is interactive but does
|
||||||
|
not normally print such an announcement, your work based on the Program is
|
||||||
|
not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If identifiable
|
||||||
|
sections of that work are not derived from the Program, and can be reasonably
|
||||||
|
considered independent and separate works in themselves, then this License, and
|
||||||
|
its terms, do not apply to those sections when you distribute them as separate
|
||||||
|
works. But when you distribute the same sections as part of a whole which is a
|
||||||
|
work based on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the entire whole,
|
||||||
|
and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest your
|
||||||
|
rights to work written entirely by you; rather, the intent is to exercise the
|
||||||
|
right to control the distribution of derivative or collective works based on the
|
||||||
|
Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program with the
|
||||||
|
Program (or with a work based on the Program) on a volume of a storage or
|
||||||
|
distribution medium does not bring the other work under the scope of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
**3.** You may copy and distribute the Program (or a work based on it, under
|
||||||
|
Section 2) in object code or executable form under the terms of Sections 1 and 2
|
||||||
|
above provided that you also do one of the following:
|
||||||
|
|
||||||
|
* **a)** Accompany it with the complete corresponding machine-readable source
|
||||||
|
code, which must be distributed under the terms of Sections 1 and 2 above on
|
||||||
|
a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
* **b)** Accompany it with a written offer, valid for at least three years, to
|
||||||
|
give any third party, for a charge no more than your cost of physically
|
||||||
|
performing source distribution, a complete machine-readable copy of the
|
||||||
|
corresponding source code, to be distributed under the terms of Sections 1
|
||||||
|
and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
* **c)** Accompany it with the information you received as to the offer to
|
||||||
|
distribute corresponding source code. (This alternative is allowed only for
|
||||||
|
noncommercial distribution and only if you received the program in object
|
||||||
|
code or executable form with such an offer, in accord with Subsection b
|
||||||
|
above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for making
|
||||||
|
modifications to it. For an executable work, complete source code means all the
|
||||||
|
source code for all modules it contains, plus any associated interface
|
||||||
|
definition files, plus the scripts used to control compilation and installation
|
||||||
|
of the executable. However, as a special exception, the source code distributed
|
||||||
|
need not include anything that is normally distributed (in either source or
|
||||||
|
binary form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component itself
|
||||||
|
accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the source code
|
||||||
|
from the same place counts as distribution of the source code, even though third
|
||||||
|
parties are not compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
**4.** You may not copy, modify, sublicense, or distribute the Program except as
|
||||||
|
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||||
|
sublicense or distribute the Program is void, and will automatically terminate
|
||||||
|
your rights under this License. However, parties who have received copies, or
|
||||||
|
rights, from you under this License will not have their licenses terminated so
|
||||||
|
long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
**5.** You are not required to accept this License, since you have not signed
|
||||||
|
it. However, nothing else grants you permission to modify or distribute the
|
||||||
|
Program or its derivative works. These actions are prohibited by law if you do
|
||||||
|
not accept this License. Therefore, by modifying or distributing the Program (or
|
||||||
|
any work based on the Program), you indicate your acceptance of this License to
|
||||||
|
do so, and all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
**6.** Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the original
|
||||||
|
licensor to copy, distribute or modify the Program subject to these terms and
|
||||||
|
conditions. You may not impose any further restrictions on the recipients'
|
||||||
|
exercise of the rights granted herein. You are not responsible for enforcing
|
||||||
|
compliance by third parties to this License.
|
||||||
|
|
||||||
|
**7.** If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues), conditions
|
||||||
|
are imposed on you (whether by court order, agreement or otherwise) that
|
||||||
|
contradict the conditions of this License, they do not excuse you from the
|
||||||
|
conditions of this License. If you cannot distribute so as to satisfy
|
||||||
|
simultaneously your obligations under this License and any other pertinent
|
||||||
|
obligations, then as a consequence you may not distribute the Program at all.
|
||||||
|
For example, if a patent license would not permit royalty-free redistribution of
|
||||||
|
the Program by all those who receive copies directly or indirectly through you,
|
||||||
|
then the only way you could satisfy both it and this License would be to refrain
|
||||||
|
entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply and the
|
||||||
|
section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any patents or
|
||||||
|
other property right claims or to contest validity of any such claims; this
|
||||||
|
section has the sole purpose of protecting the integrity of the free software
|
||||||
|
distribution system, which is implemented by public license practices. Many
|
||||||
|
people have made generous contributions to the wide range of software
|
||||||
|
distributed through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing to
|
||||||
|
distribute software through any other system and a licensee cannot impose that
|
||||||
|
choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to be a
|
||||||
|
consequence of the rest of this License.
|
||||||
|
|
||||||
|
**8.** If the distribution and/or use of the Program is restricted in certain
|
||||||
|
countries either by patents or by copyrighted interfaces, the original copyright
|
||||||
|
holder who places the Program under this License may add an explicit
|
||||||
|
geographical distribution limitation excluding those countries, so that
|
||||||
|
distribution is permitted only in or among countries not thus excluded. In such
|
||||||
|
case, this License incorporates the limitation as if written in the body of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
**9.** The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the General Public License from time to time. Such new versions will be similar
|
||||||
|
in spirit to the present version, but may differ in detail to address new
|
||||||
|
problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies
|
||||||
|
a version number of this License which applies to it and "any later version",
|
||||||
|
you have the option of following the terms and conditions either of that version
|
||||||
|
or of any later version published by the Free Software Foundation. If the
|
||||||
|
Program does not specify a version number of this License, you may choose any
|
||||||
|
version ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
**10.** If you wish to incorporate parts of the Program into other free programs
|
||||||
|
whose distribution conditions are different, write to the author to ask for
|
||||||
|
permission. For software which is copyrighted by the Free Software Foundation,
|
||||||
|
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||||
|
Our decision will be guided by the two goals of preserving the free status of
|
||||||
|
all derivatives of our free software and of promoting the sharing and reuse of
|
||||||
|
software generally.
|
||||||
|
|
||||||
|
|
||||||
|
No Warranty
|
||||||
|
-----------
|
||||||
|
|
||||||
|
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||||
|
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||||
|
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||||
|
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||||
|
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||||
|
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||||
|
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||||
|
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
264
autoconf-macros/LICENSE.md
Normal file
264
autoconf-macros/LICENSE.md
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
The GNU General Public License, Version 2, June 1991 (GPLv2)
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
--------
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your freedom to share
|
||||||
|
and change it. By contrast, the GNU General Public License is intended to
|
||||||
|
guarantee your freedom to share and change free software--to make sure the
|
||||||
|
software is free for all its users. This General Public License applies to most
|
||||||
|
of the Free Software Foundation's software and to any other program whose
|
||||||
|
authors commit to using it. (Some other Free Software Foundation software is
|
||||||
|
covered by the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not price. Our
|
||||||
|
General Public Licenses are designed to make sure that you have the freedom to
|
||||||
|
distribute copies of free software (and charge for this service if you wish),
|
||||||
|
that you receive source code or can get it if you want it, that you can change
|
||||||
|
the software or use pieces of it in new free programs; and that you know you can
|
||||||
|
do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||||
|
you these rights or to ask you to surrender the rights. These restrictions
|
||||||
|
translate to certain responsibilities for you if you distribute copies of the
|
||||||
|
software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether gratis or for a
|
||||||
|
fee, you must give the recipients all the rights that you have. You must make
|
||||||
|
sure that they, too, receive or can get the source code. And you must show them
|
||||||
|
these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and (2) offer
|
||||||
|
you this license which gives you legal permission to copy, distribute and/or
|
||||||
|
modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain that
|
||||||
|
everyone understands that there is no warranty for this free software. If the
|
||||||
|
software is modified by someone else and passed on, we want its recipients to
|
||||||
|
know that what they have is not the original, so that any problems introduced by
|
||||||
|
others will not reflect on the original authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software patents. We wish
|
||||||
|
to avoid the danger that redistributors of a free program will individually
|
||||||
|
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||||
|
this, we have made it clear that any patent must be licensed for everyone's free
|
||||||
|
use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification
|
||||||
|
follow.
|
||||||
|
|
||||||
|
|
||||||
|
Terms And Conditions For Copying, Distribution And Modification
|
||||||
|
---------------------------------------------------------------
|
||||||
|
|
||||||
|
**0.** This License applies to any program or other work which contains a notice
|
||||||
|
placed by the copyright holder saying it may be distributed under the terms of
|
||||||
|
this General Public License. The "Program", below, refers to any such program or
|
||||||
|
work, and a "work based on the Program" means either the Program or any
|
||||||
|
derivative work under copyright law: that is to say, a work containing the
|
||||||
|
Program or a portion of it, either verbatim or with modifications and/or
|
||||||
|
translated into another language. (Hereinafter, translation is included without
|
||||||
|
limitation in the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not covered by
|
||||||
|
this License; they are outside its scope. The act of running the Program is not
|
||||||
|
restricted, and the output from the Program is covered only if its contents
|
||||||
|
constitute a work based on the Program (independent of having been made by
|
||||||
|
running the Program). Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
**1.** You may copy and distribute verbatim copies of the Program's source code
|
||||||
|
as you receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice and
|
||||||
|
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||||
|
and to the absence of any warranty; and give any other recipients of the Program
|
||||||
|
a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and you may at
|
||||||
|
your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
**2.** You may modify your copy or copies of the Program or any portion of it,
|
||||||
|
thus forming a work based on the Program, and copy and distribute such
|
||||||
|
modifications or work under the terms of Section 1 above, provided that you also
|
||||||
|
meet all of these conditions:
|
||||||
|
|
||||||
|
* **a)** You must cause the modified files to carry prominent notices stating
|
||||||
|
that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
* **b)** You must cause any work that you distribute or publish, that in whole
|
||||||
|
or in part contains or is derived from the Program or any part thereof, to
|
||||||
|
be licensed as a whole at no charge to all third parties under the terms of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
* **c)** If the modified program normally reads commands interactively when
|
||||||
|
run, you must cause it, when started running for such interactive use in the
|
||||||
|
most ordinary way, to print or display an announcement including an
|
||||||
|
appropriate copyright notice and a notice that there is no warranty (or
|
||||||
|
else, saying that you provide a warranty) and that users may redistribute
|
||||||
|
the program under these conditions, and telling the user how to view a copy
|
||||||
|
of this License. (Exception: if the Program itself is interactive but does
|
||||||
|
not normally print such an announcement, your work based on the Program is
|
||||||
|
not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If identifiable
|
||||||
|
sections of that work are not derived from the Program, and can be reasonably
|
||||||
|
considered independent and separate works in themselves, then this License, and
|
||||||
|
its terms, do not apply to those sections when you distribute them as separate
|
||||||
|
works. But when you distribute the same sections as part of a whole which is a
|
||||||
|
work based on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the entire whole,
|
||||||
|
and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest your
|
||||||
|
rights to work written entirely by you; rather, the intent is to exercise the
|
||||||
|
right to control the distribution of derivative or collective works based on the
|
||||||
|
Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program with the
|
||||||
|
Program (or with a work based on the Program) on a volume of a storage or
|
||||||
|
distribution medium does not bring the other work under the scope of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
**3.** You may copy and distribute the Program (or a work based on it, under
|
||||||
|
Section 2) in object code or executable form under the terms of Sections 1 and 2
|
||||||
|
above provided that you also do one of the following:
|
||||||
|
|
||||||
|
* **a)** Accompany it with the complete corresponding machine-readable source
|
||||||
|
code, which must be distributed under the terms of Sections 1 and 2 above on
|
||||||
|
a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
* **b)** Accompany it with a written offer, valid for at least three years, to
|
||||||
|
give any third party, for a charge no more than your cost of physically
|
||||||
|
performing source distribution, a complete machine-readable copy of the
|
||||||
|
corresponding source code, to be distributed under the terms of Sections 1
|
||||||
|
and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
* **c)** Accompany it with the information you received as to the offer to
|
||||||
|
distribute corresponding source code. (This alternative is allowed only for
|
||||||
|
noncommercial distribution and only if you received the program in object
|
||||||
|
code or executable form with such an offer, in accord with Subsection b
|
||||||
|
above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for making
|
||||||
|
modifications to it. For an executable work, complete source code means all the
|
||||||
|
source code for all modules it contains, plus any associated interface
|
||||||
|
definition files, plus the scripts used to control compilation and installation
|
||||||
|
of the executable. However, as a special exception, the source code distributed
|
||||||
|
need not include anything that is normally distributed (in either source or
|
||||||
|
binary form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component itself
|
||||||
|
accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the source code
|
||||||
|
from the same place counts as distribution of the source code, even though third
|
||||||
|
parties are not compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
**4.** You may not copy, modify, sublicense, or distribute the Program except as
|
||||||
|
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||||
|
sublicense or distribute the Program is void, and will automatically terminate
|
||||||
|
your rights under this License. However, parties who have received copies, or
|
||||||
|
rights, from you under this License will not have their licenses terminated so
|
||||||
|
long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
**5.** You are not required to accept this License, since you have not signed
|
||||||
|
it. However, nothing else grants you permission to modify or distribute the
|
||||||
|
Program or its derivative works. These actions are prohibited by law if you do
|
||||||
|
not accept this License. Therefore, by modifying or distributing the Program (or
|
||||||
|
any work based on the Program), you indicate your acceptance of this License to
|
||||||
|
do so, and all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
**6.** Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the original
|
||||||
|
licensor to copy, distribute or modify the Program subject to these terms and
|
||||||
|
conditions. You may not impose any further restrictions on the recipients'
|
||||||
|
exercise of the rights granted herein. You are not responsible for enforcing
|
||||||
|
compliance by third parties to this License.
|
||||||
|
|
||||||
|
**7.** If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues), conditions
|
||||||
|
are imposed on you (whether by court order, agreement or otherwise) that
|
||||||
|
contradict the conditions of this License, they do not excuse you from the
|
||||||
|
conditions of this License. If you cannot distribute so as to satisfy
|
||||||
|
simultaneously your obligations under this License and any other pertinent
|
||||||
|
obligations, then as a consequence you may not distribute the Program at all.
|
||||||
|
For example, if a patent license would not permit royalty-free redistribution of
|
||||||
|
the Program by all those who receive copies directly or indirectly through you,
|
||||||
|
then the only way you could satisfy both it and this License would be to refrain
|
||||||
|
entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply and the
|
||||||
|
section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any patents or
|
||||||
|
other property right claims or to contest validity of any such claims; this
|
||||||
|
section has the sole purpose of protecting the integrity of the free software
|
||||||
|
distribution system, which is implemented by public license practices. Many
|
||||||
|
people have made generous contributions to the wide range of software
|
||||||
|
distributed through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing to
|
||||||
|
distribute software through any other system and a licensee cannot impose that
|
||||||
|
choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to be a
|
||||||
|
consequence of the rest of this License.
|
||||||
|
|
||||||
|
**8.** If the distribution and/or use of the Program is restricted in certain
|
||||||
|
countries either by patents or by copyrighted interfaces, the original copyright
|
||||||
|
holder who places the Program under this License may add an explicit
|
||||||
|
geographical distribution limitation excluding those countries, so that
|
||||||
|
distribution is permitted only in or among countries not thus excluded. In such
|
||||||
|
case, this License incorporates the limitation as if written in the body of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
**9.** The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the General Public License from time to time. Such new versions will be similar
|
||||||
|
in spirit to the present version, but may differ in detail to address new
|
||||||
|
problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies
|
||||||
|
a version number of this License which applies to it and "any later version",
|
||||||
|
you have the option of following the terms and conditions either of that version
|
||||||
|
or of any later version published by the Free Software Foundation. If the
|
||||||
|
Program does not specify a version number of this License, you may choose any
|
||||||
|
version ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
**10.** If you wish to incorporate parts of the Program into other free programs
|
||||||
|
whose distribution conditions are different, write to the author to ask for
|
||||||
|
permission. For software which is copyrighted by the Free Software Foundation,
|
||||||
|
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||||
|
Our decision will be guided by the two goals of preserving the free status of
|
||||||
|
all derivatives of our free software and of promoting the sharing and reuse of
|
||||||
|
software generally.
|
||||||
|
|
||||||
|
|
||||||
|
No Warranty
|
||||||
|
-----------
|
||||||
|
|
||||||
|
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||||
|
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||||
|
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
||||||
|
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||||
|
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||||
|
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||||
|
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||||
|
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
199
autoconf-macros/README.md
Normal file
199
autoconf-macros/README.md
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
autoconf-macros
|
||||||
|
===============
|
||||||
|
|
||||||
|
The purpose of Nagios autoconf-macros is to have a central place for
|
||||||
|
autoconf macros that can be maintained in one place, but be used by any
|
||||||
|
of the Nagios software. It is intended to be used as a git subtree.
|
||||||
|
See the [Usage](#usage) and [References](#references) sections below.
|
||||||
|
|
||||||
|
Since this project will be included in several parent projects, any
|
||||||
|
changes must be as project-neutral as possible.
|
||||||
|
|
||||||
|
Make sure to check out the [CHANGELOG](CHANGELOG.md) for relevant
|
||||||
|
information, as well.
|
||||||
|
|
||||||
|
|
||||||
|
Contents
|
||||||
|
--------
|
||||||
|
|
||||||
|
The collection consists of the following macros:
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_OS alias AC_NAGIOS_GET_OS
|
||||||
|
|
||||||
|
> Output Variable : `opsys`
|
||||||
|
|
||||||
|
This macro detects the operating system, and transforms it into a generic
|
||||||
|
label. The most common OS's that use Nagios software are recognized and
|
||||||
|
used in subsequent macros.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_DISTRIB_TYPE alias AC_NAGIOS_GET_DISTRIB_TYPE
|
||||||
|
|
||||||
|
> Output Variables : `dist_type`, `dist_ver`
|
||||||
|
|
||||||
|
This macro detects the distribution type. For Linux, this would be rh
|
||||||
|
(for Red Hat and derivatives), suse (OpenSUSE, SLES, derivatives), gentoo
|
||||||
|
(Gentoo and derivatives), debian (Debian and derivatives), and so on.
|
||||||
|
For BSD, this would be openbsd, netbsd, freebsd, dragonfly, etc. It can
|
||||||
|
also be aix, solaris, osx, and so on for Unix operating systems.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_INIT alias AC_NAGIOS_GET_INIT
|
||||||
|
|
||||||
|
> Output Variable : `init_type`
|
||||||
|
|
||||||
|
This macro detects what software is used to start daemons on bootup
|
||||||
|
or on request, generally knows as the "init system". The init_type
|
||||||
|
will generally be one of sysv (many), bsd (Slackware), newbsd (*BSD),
|
||||||
|
launchd (OS X), smf10 or smf11 (Solaris), systemd (newer Linux),
|
||||||
|
gentoo (older Gentoo), upstart (several), or unknown.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_INETD alias AC_NAGIOS_GET_INETD
|
||||||
|
|
||||||
|
> Output Variable : `inetd_type`
|
||||||
|
|
||||||
|
This macro detects what software is used to start daemons or services
|
||||||
|
on demand, which historically has been "inetd". The inetd_type
|
||||||
|
will generally be one of inetd, xinetd, launchd (OS X), smf10 or smf11
|
||||||
|
(Solaris), systemd (newer Linux), upstart (several), or unknown.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_PATHS alias AC_NAGIOS_GET_PATHS
|
||||||
|
|
||||||
|
> Output Variables : **many!**
|
||||||
|
|
||||||
|
This macro determines the installation paths for binaries, config files,
|
||||||
|
PID files, and so on. For a "standard" install of Nagios, NRPE, NDO Utils,
|
||||||
|
etc., most will be in the /usr/local/nagios hierarchy with startup files
|
||||||
|
located in /etc. For distributions or software repositories, the
|
||||||
|
"--enable-install-method=os" option can be used. This will determine the
|
||||||
|
O/S dependent directories, such as /usr/bin, /usr/sbin, /var/lib/nagios,
|
||||||
|
/usr/lib/nagios, etc. or for OS X, /Library/LaunchDaemons.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_FILES alias AC_NAGIOS_GET_FILES
|
||||||
|
|
||||||
|
> Output Variables : `src_init`, `src_inetd`, `src_tmpfile`
|
||||||
|
|
||||||
|
Each Nagios project will have a top-level directory named "/startup/".
|
||||||
|
In that directory will be "*.in" files for the various "init_type" and
|
||||||
|
"inetd_type" systems. This macro will determine which file(s) from
|
||||||
|
that directory will be needed.
|
||||||
|
|
||||||
|
### AX_NAGIOS_GET_SSL alias AC_NAGIOS_GET_SSL
|
||||||
|
|
||||||
|
> Output Variables : `HAVE_KRB5_H`, `HAVE_SSL`, `SSL_INC_DIR`, `SSL_LIB_DIR`, `CFLAGS`, `LDFLAGS`, `LIBS`
|
||||||
|
|
||||||
|
This macro checks various directories for SSL libraries and header files.
|
||||||
|
The searches are based on known install locations on various operating
|
||||||
|
systems and distributions, for openssl, gnutls-openssl, and nss_compat_ossl.
|
||||||
|
If it finds the headers and libraries, it will then do an `AC_LINK_IFELSE`
|
||||||
|
on a simple program to make sure a compile and link will work correctly.
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
This repo is intended to be used as a git subtree, so changes will
|
||||||
|
automatically propagate, and still be reasonably easy to use.
|
||||||
|
|
||||||
|
* First, Create, checkout, clone, or branch your project. If you do an
|
||||||
|
`ls -AF` it might look something like this:
|
||||||
|
|
||||||
|
.git/ .gitignore ChangeLog LICENSE Makefile.in
|
||||||
|
README configure.ac include/ src/
|
||||||
|
|
||||||
|
* Then make a reference to _this_ project inside your project.
|
||||||
|
|
||||||
|
git remote add autoconf-macros git@github.com:NagiosEnterprises/autoconf-macros
|
||||||
|
git subtree add --prefix=macros/ autoconf-macros master
|
||||||
|
|
||||||
|
* After executing the above two commands, if you do an `ls -AF` now,
|
||||||
|
it should look like this:
|
||||||
|
|
||||||
|
.git/ .gitignore ChangeLog LICENSE Makefile.in
|
||||||
|
README configure.ac include/ macros/ src/
|
||||||
|
|
||||||
|
* The `macros/` directory has been added.
|
||||||
|
|
||||||
|
* Now do a `git push` to save everything.
|
||||||
|
|
||||||
|
* If you make any changes to autoconf-macros, commit them separately
|
||||||
|
from any parent-project changes to keep from polluting the commit
|
||||||
|
history with unrelated comments.
|
||||||
|
|
||||||
|
* To submit your changes to autoconf-macros:
|
||||||
|
|
||||||
|
git subtree push --prefix=macros autoconf-macros peters-updates
|
||||||
|
This will create a new branch called `peters-updates`. You then need to
|
||||||
|
create a _pull request_ to get your changes merged into autoconf-macros
|
||||||
|
master.
|
||||||
|
|
||||||
|
* To get the latest version of `autoconf-macros` into your parent project:
|
||||||
|
|
||||||
|
git subtgree pull --squash --prefix=macros autoconf-macros master
|
||||||
|
|
||||||
|
|
||||||
|
References
|
||||||
|
----------
|
||||||
|
|
||||||
|
Now that autoconf-macros is available to your project, you will need to
|
||||||
|
reference it.
|
||||||
|
|
||||||
|
* Create (or add these lines to) file `YourProject/aclocal.m4`
|
||||||
|
|
||||||
|
m4_include([macros/ax_nagios_get_os])
|
||||||
|
m4_include([macros/ax_nagios_get_distrib])
|
||||||
|
m4_include([macros/ax_nagios_get_init])
|
||||||
|
m4_include([macros/ax_nagios_get_inetd])
|
||||||
|
m4_include([macros/ax_nagios_get_paths])
|
||||||
|
m4_include([macros/ax_nagios_get_files])
|
||||||
|
m4_include([macros/ax_nagios_get_ssl])
|
||||||
|
|
||||||
|
* In your `YourProject/configure.ac` add the following lines. A good place
|
||||||
|
to put them would be right after any `AC_PROG_*` entries:
|
||||||
|
|
||||||
|
AC_NAGIOS_GET_OS
|
||||||
|
AC_NAGIOS_GET_DISTRIB_TYPE
|
||||||
|
AC_NAGIOS_GET_INIT
|
||||||
|
AC_NAGIOS_GET_INETD
|
||||||
|
AC_NAGIOS_GET_PATHS
|
||||||
|
AC_NAGIOS_GET_FILES
|
||||||
|
|
||||||
|
* If you need SSL functionality, add the following to `YourProject/configure.ac`
|
||||||
|
where you want to check for SSL:
|
||||||
|
|
||||||
|
AC_NAGIOS_GET_SSL
|
||||||
|
|
||||||
|
* You will now be able to reference any of the variables in `config.h.in`
|
||||||
|
and any files listed in the `AC_CONFIG_FILES` macro in `configure.ac`.
|
||||||
|
|
||||||
|
|
||||||
|
License Notice
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Copyright (c) 2016-2017 Nagios Enterprises, LLC
|
||||||
|
|
||||||
|
This work is made available to you under the terms of Version 2 of
|
||||||
|
the GNU General Public License. A copy of that license should have
|
||||||
|
been provided with this software, but in any event can be obtained
|
||||||
|
from http://www.fsf.org.
|
||||||
|
|
||||||
|
This work is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 or visit their web page on the internet at
|
||||||
|
http://www.fsf.org.
|
||||||
|
|
||||||
|
|
||||||
|
Questions?
|
||||||
|
----------
|
||||||
|
|
||||||
|
If you have questions about this addon, or problems getting things
|
||||||
|
working, first try searching the nagios-users mailing list archives.
|
||||||
|
Details on searching the list archives can be found at
|
||||||
|
http://www.nagios.org
|
||||||
|
|
||||||
|
If you don't find an answer there, post a message in the Nagios
|
||||||
|
Plugin Development forum at https://support.nagios.com/forum/viewforum.php?f=35
|
||||||
164
autoconf-macros/add_group_user
Executable file
164
autoconf-macros/add_group_user
Executable file
@@ -0,0 +1,164 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#----------------------
|
||||||
|
# Initialize variables
|
||||||
|
#----------------------
|
||||||
|
dist="$1"
|
||||||
|
uid="$2"
|
||||||
|
gid="$3"
|
||||||
|
rc=0
|
||||||
|
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
# Determine if the user should be created with a shell environment
|
||||||
|
# 0 = no shell (more secure)
|
||||||
|
# 1 = shell (less secure but sometimes required)
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
shell=0
|
||||||
|
if [ $# -eq 4 ]; then
|
||||||
|
if [ x$4 = x1 ]; then
|
||||||
|
shell=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#-------------------------------------
|
||||||
|
# Check if the specified group exists
|
||||||
|
#-------------------------------------
|
||||||
|
group_exists(){
|
||||||
|
case $dist in
|
||||||
|
osx) rc=`dscl . -read /Groups/$gid >/dev/null 2>&1; echo $?` ;;
|
||||||
|
hpux) rc=`grget -n $gid >/dev/null 2>&1; echo $?` ;;
|
||||||
|
aix) rc=`lsgroup -a $gid >/dev/null 2>&1; echo $?` ;;
|
||||||
|
*) rc=`getent group $gid > /dev/null 2>&1; echo $?` ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------
|
||||||
|
# Add the specified user
|
||||||
|
#------------------------
|
||||||
|
add_user(){
|
||||||
|
rc=`id "$uid" > /dev/null 2>&1; echo $?`
|
||||||
|
if test $rc -eq 0; then
|
||||||
|
echo "User $uid already exists" > /dev/stderr
|
||||||
|
echo 0
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $dist in
|
||||||
|
aix)
|
||||||
|
echo useradd -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -g $gid $uid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
hpux)
|
||||||
|
echo useradd -m -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -m -g $gid $uid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
solaris)
|
||||||
|
echo useradd -m -d /export/home/$uid -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -m -d /export/home/$uid -g $gid $uid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
osx)
|
||||||
|
newid=`dscl . -list /Users UniqueID | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1`
|
||||||
|
newid=`expr 1 + $newid`
|
||||||
|
echo dscl . -create /Users/$uid > /dev/stderr
|
||||||
|
dscl . -create /Users/$uid
|
||||||
|
echo dscl . -create /Users/$uid UniqueID $newid > /dev/stderr
|
||||||
|
dscl . -create /Users/$uid UniqueID $newid
|
||||||
|
if [ $shell = 0 ]; then
|
||||||
|
echo dscl . -create /Users/$uid UserShell /usr/bin/false > /dev/stderr
|
||||||
|
dscl . -create /Users/$uid UserShell /usr/bin/false
|
||||||
|
fi
|
||||||
|
echo dscl . -create /Users/$uid PrimaryGroupID 20 > /dev/stderr
|
||||||
|
dscl . -create /Users/$uid PrimaryGroupID 20
|
||||||
|
echo dscl . -append /Groups/$gid GroupMembership $uid > /dev/stderr
|
||||||
|
rc=`dscl . -append /Groups/$gid GroupMembership $uid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
freebsd)
|
||||||
|
if [ $shell = 0 ]; then
|
||||||
|
echo pw add user $uid -g $gid -s /usr/bin/false > /dev/stderr
|
||||||
|
rc=`pw add user $uid -g $gid -s /usr/bin/false; echo $?`
|
||||||
|
else
|
||||||
|
echo pw add user $uid -g $gid > /dev/stderr
|
||||||
|
rc=`pw add user $uid -g $gid; echo $?`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
netbsd|openbsd)
|
||||||
|
echo useradd -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -g $gid $uid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if [ $shell = 0 ]; then
|
||||||
|
echo useradd -r -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -r -g $gid $uid; echo $?`
|
||||||
|
else
|
||||||
|
echo useradd -g $gid $uid > /dev/stderr
|
||||||
|
rc=`useradd -g $gid $uid; echo $?`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------
|
||||||
|
# Add the specified group
|
||||||
|
#-------------------------
|
||||||
|
add_group(){
|
||||||
|
rc=`group_exists`
|
||||||
|
if test $rc -eq 0; then
|
||||||
|
echo "Group $gid already exists" > /dev/stderr
|
||||||
|
echo 0
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $dist in
|
||||||
|
aix)
|
||||||
|
echo mkgroup $gid > /dev/stderr
|
||||||
|
rc=`mkgroup "$gid"; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
hpux|solaris)
|
||||||
|
echo groupadd $gid > /dev/stderr
|
||||||
|
rc=`groupadd "$gid"; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
osx)
|
||||||
|
newid=`dscl . -list /Groups gid | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1`
|
||||||
|
newid=`expr 1 + $newid`
|
||||||
|
echo dscl . -create /Groups/$gid gid $newid > /dev/stderr
|
||||||
|
rc=`dscl . -create /Groups/$gid gid $newid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
freebsd)
|
||||||
|
echo pw add group $gid > /dev/stderr
|
||||||
|
rc=`pw add group $gid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
netbsd|openbsd)
|
||||||
|
echo groupadd $gid > /dev/stderr
|
||||||
|
rc=`groupadd $gid; echo $?`
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo groupadd -r $gid > /dev/stderr
|
||||||
|
rc=`groupadd -r $gid; echo $?`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rc=`add_group`
|
||||||
|
if test $rc -ne 0; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
rc=`add_user`
|
||||||
|
exit $rc
|
||||||
160
autoconf-macros/ax_nagios_get_distrib
Normal file
160
autoconf-macros/ax_nagios_get_distrib
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_NAGIOS_GET_DISTRIB_TYPE
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro determines the O/S distribution of the computer it is run on.
|
||||||
|
# $dist_type will be set and will be one of:
|
||||||
|
# unknown (could not be determined)
|
||||||
|
# freebsd, netbsd, openbsd, dragonfly, etc (The BSDs)
|
||||||
|
# suse, rh, debian, gentoo (and possibly their descendants)
|
||||||
|
# Other major Linux distributions (and possibly their descendants)
|
||||||
|
# The O/S name for the rest
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Nagios Core Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
# ===========================================================================
|
||||||
|
|
||||||
|
AU_ALIAS([AC_NAGIOS_GET_DISTRIB_TYPE], [AX_NAGIOS_GET_DISTRIB_TYPE])
|
||||||
|
AC_DEFUN([AX_NAGIOS_GET_DISTRIB_TYPE],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_SUBST(dist_type)
|
||||||
|
AC_SUBST(dist_ver)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Get user hints for possible cross-compile
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING(what the distribution type is )
|
||||||
|
AC_ARG_WITH(dist-type, AS_HELP_STRING([--with-dist-type=type],
|
||||||
|
[specify distribution type (suse, rh, debian, etc.)]),
|
||||||
|
[
|
||||||
|
#
|
||||||
|
# Run this if --with was specified
|
||||||
|
#
|
||||||
|
if test "x$withval" = x -o x$withval = xno; then
|
||||||
|
dist_type_wanted=yes
|
||||||
|
else
|
||||||
|
dist_type_wanted=no
|
||||||
|
dist_type="$withval"
|
||||||
|
dist_ver="unknown"
|
||||||
|
AC_MSG_RESULT($dist_type)
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
#
|
||||||
|
# Run this if --with was not specified
|
||||||
|
#
|
||||||
|
dist_type_wanted=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
if test x$dist_type = xno; then
|
||||||
|
dist_type_wanted=yes
|
||||||
|
elif test x$dist_type = xyes; then
|
||||||
|
AC_MSG_ERROR([you must enter a distribution type if '--with-dist-type' is specified])
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine distribution type if it wasn't supplied
|
||||||
|
#
|
||||||
|
dist_ver="unknown"
|
||||||
|
|
||||||
|
if test $dist_type_wanted=yes; then
|
||||||
|
dist_type="unknown"
|
||||||
|
|
||||||
|
if test "$opsys" != "linux"; then
|
||||||
|
dist_type="$opsys"
|
||||||
|
AS_CASE([$opsys],
|
||||||
|
[bsd],
|
||||||
|
dist_type=`uname -s | tr ["[A-Z]" "[a-z]"]`
|
||||||
|
dist_ver=`uname -r`,
|
||||||
|
[aix],
|
||||||
|
dist_ver="`uname -v`.`uname -r`",
|
||||||
|
[hp-ux],
|
||||||
|
dist_ver=`uname -r | cut -d'.' -f1-3`,
|
||||||
|
[solaris],
|
||||||
|
dist_ver=`uname -r | cut -d'.' -f2`,
|
||||||
|
[*],
|
||||||
|
dist_ver=$OSTYPE
|
||||||
|
)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
if test -r "/etc/gentoo-release"; then
|
||||||
|
dist_type="gentoo"
|
||||||
|
dist_ver=`cat /etc/gentoo-release`
|
||||||
|
|
||||||
|
elif test -r "/etc/os-release"; then
|
||||||
|
. /etc/os-release
|
||||||
|
if test x"$ID_LIKE" != x; then
|
||||||
|
dist_type=`echo $ID_LIKE | cut -d' ' -f1 | tr ["[A-Z]" "[a-z]"]`
|
||||||
|
elif test x"$ID" = xol; then
|
||||||
|
dist_type=rh
|
||||||
|
else
|
||||||
|
dist_type=`echo $ID | tr ["[A-Z]" "[a-z]"]`
|
||||||
|
fi
|
||||||
|
if test x"$dist_type" = sles; then
|
||||||
|
dist_type=suse
|
||||||
|
fi
|
||||||
|
if test x"$VERSION_ID" != x; then
|
||||||
|
dist_ver=$VERSION_ID
|
||||||
|
elif test x"$VERSION" != x; then
|
||||||
|
dist_ver=`echo $VERSION | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]`
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif test -r "/etc/redhat-release"; then
|
||||||
|
dist_type=rh
|
||||||
|
dist_ver=`cat /etc/redhat-release`
|
||||||
|
|
||||||
|
elif test -r "/etc/debian_version"; then
|
||||||
|
dist_type="debian"
|
||||||
|
if test -r "/etc/lsb-release"; then
|
||||||
|
. /etc/lsb-release
|
||||||
|
dist_ver=`echo "$DISTRIB_RELEASE"`
|
||||||
|
else
|
||||||
|
dist_ver=`cat /etc/debian_version`
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif test -r "/etc/SuSE-release"; then
|
||||||
|
dist_type=suse
|
||||||
|
dist_ver=`grep VERSION /etc/SuSE-release`
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$dist_ver" != "unknown"; then
|
||||||
|
dist_ver=`echo "$dist_ver" | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT($dist_type)
|
||||||
|
])
|
||||||
131
autoconf-macros/ax_nagios_get_files
Normal file
131
autoconf-macros/ax_nagios_get_files
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_NAGIOS_GET_FILES
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro figures out which init and/or inetd files to use based
|
||||||
|
# on the results of the AX_NAGIOS_GET_OS, AX_NAGIOS_GET_DISTRIB_TYPE,
|
||||||
|
# AX_NAGIOS_GET_INIT and AX_NAGIOS_GET_INETD macros. It will select
|
||||||
|
# the appropriate files(s) from the 'startup' directory and copy it.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Nagios Core Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
# ===========================================================================
|
||||||
|
|
||||||
|
AU_ALIAS([AC_NAGIOS_GET_FILES], [AX_NAGIOS_GET_FILES])
|
||||||
|
AC_DEFUN([AX_NAGIOS_GET_FILES],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_SUBST(src_init)
|
||||||
|
AC_SUBST(src_inetd)
|
||||||
|
AC_SUBST(src_tmpfile)
|
||||||
|
AC_SUBST(bsd_enable)
|
||||||
|
|
||||||
|
src_inetd=""
|
||||||
|
src_init=""
|
||||||
|
bsd_enable=""
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for which init file to use )
|
||||||
|
|
||||||
|
AS_CASE([$init_type],
|
||||||
|
|
||||||
|
[sysv],
|
||||||
|
src_init=default-init,
|
||||||
|
|
||||||
|
[systemd],
|
||||||
|
src_tmpfile=tmpfile.conf
|
||||||
|
src_init=default-service,
|
||||||
|
|
||||||
|
[bsd],
|
||||||
|
src_init=bsd-init,
|
||||||
|
|
||||||
|
[newbsd],
|
||||||
|
if test $dist_type = freebsd ; then
|
||||||
|
bsd_enable="_enable"
|
||||||
|
src_init=default-init
|
||||||
|
elif test $dist_type = openbsd ; then
|
||||||
|
bsd_enable="_flags"
|
||||||
|
src_init=openbsd-init
|
||||||
|
elif test $dist_type = netbsd ; then
|
||||||
|
bsd_enable=""
|
||||||
|
src_init=newbsd-init
|
||||||
|
fi,
|
||||||
|
|
||||||
|
# [gentoo],
|
||||||
|
|
||||||
|
[openrc],
|
||||||
|
src_init=openrc-init,
|
||||||
|
|
||||||
|
[smf*],
|
||||||
|
src_init="solaris-init.xml"
|
||||||
|
src_inetd="solaris-inetd.xml",
|
||||||
|
|
||||||
|
[upstart],
|
||||||
|
if test $dist_type = rh ; then
|
||||||
|
src_init=rh-upstart-init
|
||||||
|
else
|
||||||
|
src_init=upstart-init
|
||||||
|
fi,
|
||||||
|
|
||||||
|
[launchd],
|
||||||
|
src_init="mac-init.plist",
|
||||||
|
|
||||||
|
[*],
|
||||||
|
src_init="unknown"
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($src_init)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for which inetd files to use )
|
||||||
|
|
||||||
|
if test x$src_inetd = x; then
|
||||||
|
|
||||||
|
AS_CASE([$inetd_type],
|
||||||
|
[inetd*],
|
||||||
|
src_inetd=default-inetd,
|
||||||
|
|
||||||
|
[xinetd],
|
||||||
|
src_inetd=default-xinetd,
|
||||||
|
|
||||||
|
[systemd],
|
||||||
|
src_inetd=default-socket,
|
||||||
|
|
||||||
|
[launchd],
|
||||||
|
src_inetd="mac-inetd.plist",
|
||||||
|
|
||||||
|
[*],
|
||||||
|
src_inetd="unknown"
|
||||||
|
)
|
||||||
|
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($src_inetd)
|
||||||
|
|
||||||
|
])
|
||||||
200
autoconf-macros/ax_nagios_get_init
Normal file
200
autoconf-macros/ax_nagios_get_init
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_NAGIOS_GET_INIT
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro determines the O/S distribution of the computer it is run on.
|
||||||
|
# $init_type will be set and will be one of:
|
||||||
|
# unknown (could not be determined)
|
||||||
|
# launchd (Mac OS X)
|
||||||
|
# bsd (Slackware Linux)
|
||||||
|
# newbsd (FreeBSD, OpenBSD, NetBSD, Dragonfly, etc)
|
||||||
|
# smf10 (Solaris)
|
||||||
|
# smf11 (Solaris)
|
||||||
|
# systemd (Linux SystemD)
|
||||||
|
# gentoo (Older Gentoo)
|
||||||
|
# openrc (Recent Gentoo and some others)
|
||||||
|
# upstart (Older Debian)
|
||||||
|
# sysv (The rest)
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Nagios Core Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
# ===========================================================================
|
||||||
|
|
||||||
|
AU_ALIAS([AC_NAGIOS_GET_INIT], [AX_NAGIOS_GET_INIT])
|
||||||
|
AC_DEFUN([AX_NAGIOS_GET_INIT],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_SUBST(init_type)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Get user hints for possible cross-compile
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING(what init system is being used )
|
||||||
|
AC_ARG_WITH(init_type,AS_HELP_STRING([--with-init-type=type],
|
||||||
|
[specify init type (bsd, sysv, systemd, launchd, smf10, smf11, upstart,
|
||||||
|
openrc, etc.)]),
|
||||||
|
[
|
||||||
|
#
|
||||||
|
# Run this if --with was specified
|
||||||
|
#
|
||||||
|
if test "x$withval" = x -o x$withval = xno; then
|
||||||
|
init_type_wanted=yes
|
||||||
|
else
|
||||||
|
init_type_wanted=no
|
||||||
|
init_type="$withval"
|
||||||
|
AC_MSG_RESULT($init_type)
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
#
|
||||||
|
# Run this if --with was not specified
|
||||||
|
#
|
||||||
|
init_type_wanted=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
if test x$init_type = xno; then
|
||||||
|
init_type_wanted=yes
|
||||||
|
elif test x$init_type = xyes; then
|
||||||
|
AC_MSG_ERROR([you must enter an init type if '--with-init-type' is specified])
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine init type if it wasn't supplied
|
||||||
|
#
|
||||||
|
if test $init_type_wanted = yes; then
|
||||||
|
init_type=""
|
||||||
|
|
||||||
|
if test x"$opsys" = x; then
|
||||||
|
init_type="unknown"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test x"$dist_type" = x; then
|
||||||
|
init_type="unknown"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test "$opsys" = "osx"; then
|
||||||
|
init_type="launchd"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test "$opsys" = "bsd"; then
|
||||||
|
init_type="newbsd"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test "$dist_type" = "solaris"; then
|
||||||
|
if test -d "/lib/svc/manifest"; then
|
||||||
|
init_type="smf11"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test -d "/lib/svc/monitor"; then
|
||||||
|
init_type="smf10"
|
||||||
|
init_type_wanted=no
|
||||||
|
else
|
||||||
|
init_type="sysv"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
elif test "$dist_type" = "slackware"; then
|
||||||
|
init_type="bsd"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test "$dist_type" = "aix"; then
|
||||||
|
init_type="bsd"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test "$dist_type" = "hp-ux"; then
|
||||||
|
init_type="unknown"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
PSCMD="ps -p1 -o args"
|
||||||
|
if test $dist_type = solaris; then
|
||||||
|
PSCMD="env UNIX95=1; ps -p1 -o args"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$init_type_wanted" = yes; then
|
||||||
|
pid1=`$PSCMD | grep -vi COMMAND | cut -d' ' -f1`
|
||||||
|
if test x"$pid1" = "x"; then
|
||||||
|
init_type="unknown"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
if `echo $pid1 | grep "systemd" > /dev/null`; then
|
||||||
|
init_type="systemd"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$init_type_wanted" = yes; then
|
||||||
|
if test "$pid1" = "init"; then
|
||||||
|
if test -e "/sbin/init"; then
|
||||||
|
pid1="/sbin/init";
|
||||||
|
elif test -e "/usr/sbin/init"; then
|
||||||
|
pid1="/usr/sbin/init"
|
||||||
|
else
|
||||||
|
init_type="unknown"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -L "$pid1"; then
|
||||||
|
pid1=`readlink "$pid1"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$init_type_wanted" = yes; then
|
||||||
|
if `echo $pid1 | grep "systemd" > /dev/null`; then
|
||||||
|
init_type="systemd"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test -f "/sbin/rc"; then
|
||||||
|
if test -f /sbin/runscript; then
|
||||||
|
init_type_wanted=no
|
||||||
|
if `/sbin/start-stop-daemon -V | grep "OpenRC" > /dev/null`; then
|
||||||
|
init_type="openrc"
|
||||||
|
else
|
||||||
|
init_type="gentoo"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$init_type_wanted" = yes; then
|
||||||
|
if test "$pid1" = "/sbin/init" -o "$pid1" = "/usr/sbin/init"; then
|
||||||
|
if `$pid1 --version 2>/dev/null | grep "upstart" >/dev/null`; then
|
||||||
|
init_type="upstart"
|
||||||
|
init_type_wanted=no
|
||||||
|
elif test -f "/etc/rc" -a ! -L "/etc/rc"; then
|
||||||
|
init_type="newbsd"
|
||||||
|
init_type_wanted=no
|
||||||
|
else
|
||||||
|
init_type="sysv"
|
||||||
|
init_type_wanted=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$init_type_wanted" = yes; then
|
||||||
|
init_type="unknown"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT($init_type)
|
||||||
|
])
|
||||||
101
autoconf-macros/ax_nagios_get_os
Normal file
101
autoconf-macros/ax_nagios_get_os
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_NAGIOS_GET_OS
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro determines the operating system of the computer it is run on.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Nagios Core Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
# ===========================================================================
|
||||||
|
|
||||||
|
AU_ALIAS([AC_NAGIOS_GET_OS], [AX_NAGIOS_GET_OS])
|
||||||
|
AC_DEFUN([AX_NAGIOS_GET_OS],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_SUBST(opsys)
|
||||||
|
AC_SUBST(arch)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Get user hints
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING(what the operating system is )
|
||||||
|
AC_ARG_WITH(opsys, AS_HELP_STRING([--with-opsys=OS],
|
||||||
|
[specify operating system (linux, osx, bsd, solaris, irix, cygwin,
|
||||||
|
aix, hp-ux, etc.)]),
|
||||||
|
[
|
||||||
|
#
|
||||||
|
# Run this if --with was specified
|
||||||
|
#
|
||||||
|
if test "x$withval" = x -o x$withval = xno; then
|
||||||
|
opsys_wanted=yes
|
||||||
|
else
|
||||||
|
opsys_wanted=no
|
||||||
|
opsys="$withval"
|
||||||
|
AC_MSG_RESULT($opsys)
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
#
|
||||||
|
# Run this if --with was not specified
|
||||||
|
#
|
||||||
|
opsys_wanted=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
if test x$opsys = xno; then
|
||||||
|
opsys=""
|
||||||
|
opsys_wanted=yes
|
||||||
|
elif test x$opsys = xyes; then
|
||||||
|
AC_MSG_ERROR([you must enter an O/S type if '--with-opsys' is specified])
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determine operating system if it wasn't supplied
|
||||||
|
#
|
||||||
|
if test $opsys_wanted=yes; then
|
||||||
|
opsys=`uname -s | tr ["[A-Z]" "[a-z]"]`
|
||||||
|
if test x"$opsys" = "x"; then opsys="unknown"; fi
|
||||||
|
AS_CASE([$opsys],
|
||||||
|
[darwin*], opsys="osx",
|
||||||
|
[*bsd*], opsys="bsd",
|
||||||
|
[dragonfly], opsys="bsd",
|
||||||
|
[sunos], opsys="solaris",
|
||||||
|
[gnu/hurd], opsys="linux",
|
||||||
|
[irix*], opsys="irix",
|
||||||
|
[cygwin*], opsys="cygwin",
|
||||||
|
[mingw*], opsys="mingw",
|
||||||
|
[msys*], opsys="msys")
|
||||||
|
fi
|
||||||
|
|
||||||
|
arch=`uname -m | tr ["[A-Z]" "[a-z]"]`
|
||||||
|
|
||||||
|
AC_MSG_RESULT($opsys)
|
||||||
|
])
|
||||||
783
autoconf-macros/ax_nagios_get_paths
Normal file
783
autoconf-macros/ax_nagios_get_paths
Normal file
@@ -0,0 +1,783 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_NAGIOS_GET_PATHS
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro figures out the installation & run paths for various systems
|
||||||
|
# The argument are:
|
||||||
|
# the O/S determined by the AX_NAGIOS_GET_OS macro.
|
||||||
|
# the distribution type as determined by AX_NAGIOS_GET_DISTRIB_TYPE
|
||||||
|
# the init type as determined by AX_NAGIOS_GET_INIT
|
||||||
|
# the inetd type as determined by AX_NAGIOS_GET_INETD
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Nagios Core Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
# ===========================================================================
|
||||||
|
|
||||||
|
AU_ALIAS([AC_NAGIOS_GET_PATHS], [AX_NAGIOS_GET_PATHS])
|
||||||
|
AC_DEFUN([AX_NAGIOS_GET_PATHS],
|
||||||
|
[
|
||||||
|
|
||||||
|
AC_SUBST(pkgsysconfdir)
|
||||||
|
AC_SUBST(objsysconfdir)
|
||||||
|
AC_SUBST(initname)
|
||||||
|
AC_SUBST(inetdname)
|
||||||
|
AC_SUBST(pluginsdir)
|
||||||
|
AC_SUBST(brokersdir)
|
||||||
|
AC_SUBST(cgibindir)
|
||||||
|
AC_SUBST(webdir)
|
||||||
|
AC_SUBST(privatesysconfdir)
|
||||||
|
AC_SUBST(pkglocalstatedir)
|
||||||
|
AC_SUBST(logdir)
|
||||||
|
AC_SUBST(piddir)
|
||||||
|
AC_SUBST(pipedir)
|
||||||
|
AC_SUBST(spooldir)
|
||||||
|
AC_SUBST(initdir)
|
||||||
|
AC_SUBST(initdiroverridden)
|
||||||
|
AC_SUBST(inetddir)
|
||||||
|
AC_SUBST(tmpfilesd)
|
||||||
|
AC_SUBST(subsyslockdir)
|
||||||
|
AC_SUBST(subsyslockfile)
|
||||||
|
|
||||||
|
if test x$DBG_PATHS != x; then
|
||||||
|
echo
|
||||||
|
echo Incoming paths:
|
||||||
|
echo " prefix $prefix"
|
||||||
|
echo " exec_prefix $exec_prefix"
|
||||||
|
echo " bindir $bindir"
|
||||||
|
echo " libexecdir $libexecdir"
|
||||||
|
echo " sysconfdir $sysconfdir"
|
||||||
|
echo " localstatedir $localstatedir"
|
||||||
|
echo " datarootdir $datarootdir"
|
||||||
|
echo " datadir $datadir"
|
||||||
|
echo " localedir $localedir"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for which paths to use )
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(install_method,
|
||||||
|
AS_HELP_STRING([--enable-install-method=<method>],
|
||||||
|
[sets the install method to use: 'default' (the default) will install to
|
||||||
|
/usr/local/nagios, 'os' will try to determine which method to use based
|
||||||
|
on OS type and distribution. Fine tuning using the '--bindir', etc.
|
||||||
|
overrides above will still work]),
|
||||||
|
install_method=$enableval,
|
||||||
|
install_method=default
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(showdirs_only,
|
||||||
|
AS_HELP_STRING([--enable-showdirs-only=yes],
|
||||||
|
[This option will cause 'configure' to stop after determining the install
|
||||||
|
locations based on '--enable-install-method', so you can see the
|
||||||
|
destinations before a full './configure', 'make', 'make install'
|
||||||
|
process.]),
|
||||||
|
showdirs_only=$enableval,
|
||||||
|
showdirs_only=no
|
||||||
|
)
|
||||||
|
|
||||||
|
AS_CASE([$install_method],
|
||||||
|
[yes], install_method="os",
|
||||||
|
[no], install_method="default",
|
||||||
|
[default|os], :,
|
||||||
|
[*], echo >&6; AC_MSG_ERROR(['--enable-install-method=$install_method' is invalid])
|
||||||
|
)
|
||||||
|
|
||||||
|
if test $showdirs_only != "no"; then showdirs_only="yes"; fi
|
||||||
|
|
||||||
|
AS_CASE([$dist_type],
|
||||||
|
[*solaris*|*hp-ux*|*aix*|*osx*], opsys=unix)
|
||||||
|
|
||||||
|
|
||||||
|
# Does this package need to know:
|
||||||
|
need_cgi=no # where the cgi-bin directory is
|
||||||
|
need_web=no # where the website directory is
|
||||||
|
need_brk=no # where the event broker modules directory is
|
||||||
|
need_plg=no # where the plugins directory is
|
||||||
|
need_pipe=no # where the pipe directory is
|
||||||
|
need_spl=no # where the spool directory is
|
||||||
|
need_loc=no # where the locale directory is
|
||||||
|
need_log_subdir=no # where the loc sub-directory is
|
||||||
|
need_etc_subdir=no # where the etc sub-directory is
|
||||||
|
need_pls_dir=no # where the package locate state directory is
|
||||||
|
|
||||||
|
if test x"$INIT_PROG" = x; then
|
||||||
|
INIT_PROG="$PKG_NAME"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AS_CASE([$PKG_NAME],
|
||||||
|
[nagios],
|
||||||
|
need_log_subdir=yes
|
||||||
|
need_etc_subdir=yes
|
||||||
|
need_pls_dir=yes
|
||||||
|
need_brk=yes
|
||||||
|
need_pipe=yes
|
||||||
|
need_spl=yes
|
||||||
|
need_loc=yes
|
||||||
|
need_cgi=yes
|
||||||
|
need_web=yes,
|
||||||
|
|
||||||
|
[ndoutils],
|
||||||
|
need_brk=yes
|
||||||
|
need_spl=yes,
|
||||||
|
|
||||||
|
[nrpe],
|
||||||
|
need_plg=yes,
|
||||||
|
|
||||||
|
[nsca],
|
||||||
|
need_cgi=no,
|
||||||
|
|
||||||
|
[plugins],
|
||||||
|
need_loc=yes
|
||||||
|
need_plg=yes
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_ARG_WITH(pkgsysconfdir, AS_HELP_STRING([--with-pkgsysconfdir=DIR],
|
||||||
|
[where configuration files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
pkgsysconfdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(objsysconfdir, AS_HELP_STRING([--with-objsysconfdir=DIR],
|
||||||
|
[where object configuration files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
objsysconfdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(privatesysconfdir, AS_HELP_STRING([--with-privatesysconfdir=DIR],
|
||||||
|
[where private configuration files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
privatesysconfdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(webdir, AS_HELP_STRING([--with-webdir=DIR],
|
||||||
|
[where the website files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
webdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(pluginsdir, AS_HELP_STRING([--with-pluginsdir=DIR],
|
||||||
|
[where the plugins should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
pluginsdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(brokersdir, AS_HELP_STRING([--with-brokersdir=DIR],
|
||||||
|
[where the broker modules should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
brokersdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(cgibindir, AS_HELP_STRING([--with-cgibindir=DIR],
|
||||||
|
[where the CGI programs should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
cgibindir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(logdir, AS_HELP_STRING([--with-logdir=DIR],
|
||||||
|
[where log files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
logdir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(piddir, AS_HELP_STRING([--with-piddir=DIR],
|
||||||
|
[where the PID file should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
piddir="$withval"
|
||||||
|
fi)
|
||||||
|
AC_ARG_WITH(pipedir, AS_HELP_STRING([--with-pipedir=DIR],
|
||||||
|
[where socket and pipe files should be placed]),
|
||||||
|
if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
|
||||||
|
pipedir="$withval"
|
||||||
|
fi)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Setup the base directory
|
||||||
|
#
|
||||||
|
|
||||||
|
if test $install_method = "default"; then
|
||||||
|
if test $opsys = "unix"; then
|
||||||
|
if test x"$prefix" = "xNONE"; then prefix="/usr/local/nagios"; fi
|
||||||
|
else
|
||||||
|
if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi
|
||||||
|
fi
|
||||||
|
datarootdir=${datarootdir="$prefix"}
|
||||||
|
|
||||||
|
else
|
||||||
|
if test x"$datadir" = x'${datarootdir}'; then AS_UNSET(datadir); fi
|
||||||
|
if test x"$sysconfdir" = x'${prefix}/etc'; then AS_UNSET(sysconfdir); fi
|
||||||
|
|
||||||
|
if test x"$prefix" = "xNONE"; then
|
||||||
|
if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then
|
||||||
|
prefix="/usr/local"
|
||||||
|
elif test $dist_type = netbsd; then
|
||||||
|
prefix="/usr/pkg"
|
||||||
|
else
|
||||||
|
prefix="/usr"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi
|
||||||
|
if test x"$localstatedir" = x'${prefix}/var'; then
|
||||||
|
if test $dist_type = "osx"; then
|
||||||
|
localstatedir="/private/var"
|
||||||
|
else
|
||||||
|
localstatedir="/var"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $opsys = "unix"; then
|
||||||
|
if test x"$datarootdir" = x'${prefix}/share'; then
|
||||||
|
if test $dist_type = "hp-ux"; then
|
||||||
|
datarootdir="/usr/local/share"
|
||||||
|
if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir="/usr/nagios"
|
||||||
|
fi
|
||||||
|
elif test $dist_type = "osx"; then
|
||||||
|
datarootdir="/usr/local/share"
|
||||||
|
if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir="/usr/local/nagios"
|
||||||
|
fi
|
||||||
|
elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir="/usr/lib/nagios"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test $dist_type = "osx"; then
|
||||||
|
if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir="/usr/local/libexec/nagios"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif test $opsys = "bsd"; then
|
||||||
|
if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir=${exec_prefix}/libexec/nagios;
|
||||||
|
fi
|
||||||
|
elif test x"$libexecdir" = x'${exec_prefix}/lib'; then
|
||||||
|
libexecdir=${libexecdir}/nagios;
|
||||||
|
elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
|
||||||
|
libexecdir=${exec_prefix}/lib/nagios;
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi
|
||||||
|
|
||||||
|
tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"}
|
||||||
|
if test ! -d "$tmpfilesd"; then
|
||||||
|
tmpfilesd="N/A"
|
||||||
|
else
|
||||||
|
tmpfilesd="$tmpfilesd/$INIT_PROG.conf"
|
||||||
|
fi
|
||||||
|
subsyslockdir=${subsyslockdir="/run"}
|
||||||
|
if test ! -d "$subsyslockdir"; then
|
||||||
|
subsyslockdir="N/A"
|
||||||
|
subsyslockfile="N/A"
|
||||||
|
else
|
||||||
|
subsyslockfile="$subsyslockdir/$INIT_PROG.lock"
|
||||||
|
fi
|
||||||
|
if test "$need_loc" = no; then
|
||||||
|
localedir="N/A"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $install_method = "default" ; then
|
||||||
|
#
|
||||||
|
# Do the default setup
|
||||||
|
#
|
||||||
|
datadir=${datadir="$datarootdir"}
|
||||||
|
if test $need_web = yes; then
|
||||||
|
webdir=${webdir="$datadir"}
|
||||||
|
else
|
||||||
|
webdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $opsys = "unix"; then
|
||||||
|
sysconfdir=${sysconfdir="/etc/opt"}
|
||||||
|
fi
|
||||||
|
pkgsysconfdir=${pkgsysconfdir="$sysconfdir"}
|
||||||
|
if test $need_etc_subdir = yes; then
|
||||||
|
objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
|
||||||
|
else
|
||||||
|
objsysconfdir="N/A"
|
||||||
|
fi
|
||||||
|
privatesysconfdir=${privatesysconfdir="$pkgsysconfdir"}
|
||||||
|
logdir=${logdir="$localstatedir"}
|
||||||
|
piddir=${piddir="$localstatedir"}
|
||||||
|
if test "$need_pipe" = yes; then
|
||||||
|
pipedir=${pipedir="$localstatedir/rw"}
|
||||||
|
else
|
||||||
|
pipedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_pls_dir" = yes; then
|
||||||
|
pkglocalstatedir=${pkglocalstatedir="$localstatedir"}
|
||||||
|
else
|
||||||
|
pkglocalstatedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_spl" = yes; then
|
||||||
|
spooldir=${spooldir="$localstatedir/var"}
|
||||||
|
else
|
||||||
|
spooldir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_brk = yes; then
|
||||||
|
brokersdir=${brokersdir="$bindir"}
|
||||||
|
else
|
||||||
|
brokersdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_plg = yes; then
|
||||||
|
pluginsdir=${pluginsdir="$libexecdir"}
|
||||||
|
else
|
||||||
|
pluginsdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_cgi = yes; then
|
||||||
|
cgibindir=${cgibindir="$prefix/sbin"}
|
||||||
|
else
|
||||||
|
cgibindir="N/A"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif test $opsys = "linux"; then
|
||||||
|
|
||||||
|
#
|
||||||
|
# Linux "Standard" install
|
||||||
|
#
|
||||||
|
install_method="$install_method : FHS"
|
||||||
|
datadir=${datadir="$datarootdir/nagios"}
|
||||||
|
if test $need_web = yes; then
|
||||||
|
webdir=${webdir="$datadir/html"}
|
||||||
|
else
|
||||||
|
webdir="N/A"
|
||||||
|
fi
|
||||||
|
sysconfdir=${sysconfdir="/etc"}
|
||||||
|
pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
|
||||||
|
if test $need_etc_subdir = yes; then
|
||||||
|
objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
|
||||||
|
else
|
||||||
|
objsysconfdir="N/A"
|
||||||
|
fi
|
||||||
|
privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
|
||||||
|
if test $need_log_subdir = yes; then
|
||||||
|
logdir=${logdir="$localstatedir/log/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
logdir=${logdir="$localstatedir/log"}
|
||||||
|
fi
|
||||||
|
piddir=${piddir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
if test "$need_pipe" = yes; then
|
||||||
|
pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
else
|
||||||
|
pipedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_pls_dir" = yes; then
|
||||||
|
pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
pkglocalstatedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_spl" = yes; then
|
||||||
|
spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
spooldir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_brk = yes; then
|
||||||
|
brokersdir=${brokersdir="$libexecdir/brokers"}
|
||||||
|
else
|
||||||
|
brokersdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_plg = yes; then
|
||||||
|
pluginsdir=${pluginsdir="$libexecdir/plugins"}
|
||||||
|
else
|
||||||
|
pluginsdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_cgi = yes; then
|
||||||
|
cgibindir=${cgibindir="$libexecdir/cgi-bin"}
|
||||||
|
else
|
||||||
|
cgibindir="N/A"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif test $opsys = "unix"; then
|
||||||
|
|
||||||
|
#
|
||||||
|
# "Standard" Unix install
|
||||||
|
#
|
||||||
|
install_method="$install_method : Unix Standard"
|
||||||
|
if test $dist_type = osx; then
|
||||||
|
install_method="$install_method : OS X Standard"
|
||||||
|
fi
|
||||||
|
datadir=${datadir="$datarootdir/nagios"}
|
||||||
|
if test $need_web = yes; then
|
||||||
|
webdir=${webdir="$datadir/html"}
|
||||||
|
else
|
||||||
|
webdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $dist_type = osx; then
|
||||||
|
sysconfdir=${sysconfdir="/private/etc"}
|
||||||
|
else
|
||||||
|
sysconfdir=${sysconfdir="/etc"}
|
||||||
|
fi
|
||||||
|
pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
|
||||||
|
if test $need_etc_subdir = yes; then
|
||||||
|
objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
|
||||||
|
else
|
||||||
|
objsysconfdir="N/A"
|
||||||
|
fi
|
||||||
|
privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
|
||||||
|
if test "$need_pls_dir" = yes; then
|
||||||
|
pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
pkglocalstatedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_loc" = yes; then
|
||||||
|
localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
|
||||||
|
fi
|
||||||
|
if test "$need_spl" = yes; then
|
||||||
|
spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
spooldir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_brk = yes; then
|
||||||
|
brokersdir=${brokersdir="$libexecdir/brokers"}
|
||||||
|
else
|
||||||
|
brokersdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_plg = yes; then
|
||||||
|
pluginsdir=${pluginsdir="$libexecdir/plugins"}
|
||||||
|
else
|
||||||
|
pluginsdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_cgi = yes; then
|
||||||
|
cgibindir=${cgibindir="$libexecdir/cgi-bin"}
|
||||||
|
else
|
||||||
|
cgibindir="N/A"
|
||||||
|
fi
|
||||||
|
AS_CASE([$dist_type],
|
||||||
|
[*hp-ux*],
|
||||||
|
piddir=${piddir="$pkgsysconfdir"}
|
||||||
|
pipedir=${pipedir="$pkglocalstatedir"}
|
||||||
|
logdir=${logdir="$pkglocalstatedir/log"},
|
||||||
|
|
||||||
|
[*],
|
||||||
|
piddir=${piddir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
if test "$need_pipe" = yes; then
|
||||||
|
pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
else
|
||||||
|
pipedir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_log_subdir = yes; then
|
||||||
|
logdir=${logdir="$localstatedir/log/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
logdir=${logdir="$localstatedir/log"}
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
elif test $opsys = "bsd"; then
|
||||||
|
|
||||||
|
#
|
||||||
|
# "Standard" BSD install
|
||||||
|
#
|
||||||
|
install_method="$install_method : BSD"
|
||||||
|
if test $dist_type = freebsd -o $dist_type = openbsd; then
|
||||||
|
prefix=${prefix="/usr/local"}
|
||||||
|
exec_prefix=${exec_prefix="/usr/local"}
|
||||||
|
if test $dist_type = freebsd; then
|
||||||
|
install_method="$install_method : FreeBSD"
|
||||||
|
else
|
||||||
|
install_method="$install_method : OpenBSD"
|
||||||
|
fi
|
||||||
|
elif test $dist_type = netbsd; then
|
||||||
|
prefix=${prefix="/usr/pkg"}
|
||||||
|
exec_prefix=${exec_prefix="/usr/pkg"}
|
||||||
|
install_method="$install_method : NetBSD"
|
||||||
|
fi
|
||||||
|
datadir=${datadir="$datarootdir/nagios"}
|
||||||
|
if test $need_web = yes -o $need_cgi = yes; then
|
||||||
|
if test $dist_type = freebsd; then
|
||||||
|
webdir=${webdir="$prefix/www/nagios"}
|
||||||
|
elif test $dist_type = netbsd; then
|
||||||
|
webdir=${webdir="$prefix/share/nagios"}
|
||||||
|
elif test $dist_type = openbsd; then
|
||||||
|
webdir=${webdir="/var/www/nagios"}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
webdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $dist_type = freebsd; then
|
||||||
|
sysconfdir=${sysconfdir="/usr/local/etc"}
|
||||||
|
else
|
||||||
|
sysconfdir=${sysconfdir="/etc"}
|
||||||
|
fi
|
||||||
|
pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
|
||||||
|
if test $need_etc_subdir = yes; then
|
||||||
|
objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
|
||||||
|
else
|
||||||
|
objsysconfdir="N/A"
|
||||||
|
fi
|
||||||
|
privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
|
||||||
|
if test "$need_pls_dir" = yes; then
|
||||||
|
pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
pkglocalstatedir="N/A"
|
||||||
|
fi
|
||||||
|
if test "$need_loc" = yes; then
|
||||||
|
localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
|
||||||
|
fi
|
||||||
|
if test "$need_spl" = yes; then
|
||||||
|
spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
spooldir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_brk = yes; then
|
||||||
|
brokersdir=${brokersdir="$libexecdir/brokers"}
|
||||||
|
else
|
||||||
|
brokersdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_plg = yes; then
|
||||||
|
pluginsdir=${pluginsdir="$libexecdir/plugins"}
|
||||||
|
else
|
||||||
|
pluginsdir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_cgi = yes; then
|
||||||
|
if test $dist_type = freebsd; then
|
||||||
|
cgibindir=${cgibindir="$webdir/cgi-bin"}
|
||||||
|
elif test $dist_type = netbsd; then
|
||||||
|
cgibindir=${pluginsdir="$libexecdir/cgi-bin"}
|
||||||
|
elif test $dist_type = openbsd; then
|
||||||
|
cgibindir=${pluginsdir="/var/www/cgi-bin/nagios"}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cgibindir="N/A"
|
||||||
|
fi
|
||||||
|
piddir=${piddir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
if test "$need_pipe" = yes; then
|
||||||
|
pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"}
|
||||||
|
else
|
||||||
|
pipedir="N/A"
|
||||||
|
fi
|
||||||
|
if test $need_log_subdir = yes; then
|
||||||
|
logdir=${logdir="$localstatedir/log/$INIT_PROG"}
|
||||||
|
else
|
||||||
|
logdir=${logdir="$localstatedir/log"}
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
#
|
||||||
|
# Unknown install
|
||||||
|
#
|
||||||
|
install_method="unknown"
|
||||||
|
webdir=unknown
|
||||||
|
pkgsysconfdir=unknown
|
||||||
|
objsysconfdir=unknown
|
||||||
|
privatesysconfdir=unknown
|
||||||
|
logdir=unknown
|
||||||
|
piddir=unknown
|
||||||
|
pipedir=unknown
|
||||||
|
pkglocalstatedir=unknown
|
||||||
|
spooldir=unknown
|
||||||
|
brokersdir=unknown
|
||||||
|
pluginsdir=unknown
|
||||||
|
cgibindir=unknown
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval prefix=$prefix
|
||||||
|
eval exec_prefix=$exec_prefix
|
||||||
|
eval bindir=$bindir
|
||||||
|
eval datarootdir=$datarootdir
|
||||||
|
eval datadir=$datadir
|
||||||
|
eval libexecdir=$libexecdir
|
||||||
|
eval brokersdir=$brokersdir
|
||||||
|
eval pluginsdir=$pluginsdir
|
||||||
|
eval cgibindir=$cgibindir
|
||||||
|
eval localstatedir=$localstatedir
|
||||||
|
eval pkglocalstatedir=$pkglocalstatedir
|
||||||
|
eval webdir=$webdir
|
||||||
|
eval localedir=$localedir
|
||||||
|
eval sysconfdir=$sysconfdir
|
||||||
|
eval pkgsysconfdir=$pkgsysconfdir
|
||||||
|
eval piddir=$piddir
|
||||||
|
|
||||||
|
|
||||||
|
# We test systemd first because in case
|
||||||
|
# someone tries to install Nagios on a
|
||||||
|
# system with a newer version, that doesn't
|
||||||
|
# have the defined versions ..we can just
|
||||||
|
# (hopefully) fall back to SysV
|
||||||
|
# And if that doesn't work, well...
|
||||||
|
AS_CASE([$init_type],
|
||||||
|
|
||||||
|
[systemd],
|
||||||
|
if test -d "/lib/systemd/system"; then
|
||||||
|
initdir=${initdir="/lib/systemd/system"}
|
||||||
|
elif test -d "/usr/lib/systemd/system"; then
|
||||||
|
initdir=${initdir="/usr/lib/systemd/system"}
|
||||||
|
elif test -d "/usr/local/lib/systemd/system"; then
|
||||||
|
initdir=${initdir="/usr/local/lib/systemd/system"}
|
||||||
|
elif test -d "/run/systemd/system"; then
|
||||||
|
initdir=${initdir="/run/systemd/system"}
|
||||||
|
elif test -d "/etc/systemd/system"; then
|
||||||
|
initdir=${initdir="/etc/systemd/system"}
|
||||||
|
elif test -d "/etc/systemd/user"; then
|
||||||
|
initdir=${initdir="/etc/systemd/user"}
|
||||||
|
elif test -d "/run/systemd/user"; then
|
||||||
|
initdir=${initdir="/run/systemd/user"}
|
||||||
|
elif test -d "/usr/lib/systemd/user"; then
|
||||||
|
initdir=${initdir="/usr/lib/systemd/user"}
|
||||||
|
elif test -d "/usr/local/lib/systemd/user"; then
|
||||||
|
initdir=${initdir="/usr/local/lib/systemd/user"}
|
||||||
|
elif test -d "/usr/share/systemd/user"; then
|
||||||
|
initdir=${initdir="/usr/share/systemd/user"}
|
||||||
|
elif test -d "/usr/local/share/systemd/user"; then
|
||||||
|
initdir=${initdir="/usr/local/share/systemd/user"}
|
||||||
|
elif test -d "$HOME/.config/systemd/user"; then
|
||||||
|
initdir=${initdir="$HOME/.config/systemd/user"}
|
||||||
|
elif test -d "$HOME/.local/share/systemd/user"; then
|
||||||
|
initdir=${initdir="$HOME/.local/share/systemd/user"}
|
||||||
|
elif test -d "$XDG_CONFIG_HOME/systemd/user/"; then
|
||||||
|
initdir=${initdir="$XDG_CONFIG_HOME/systemd/user/"}
|
||||||
|
elif test -d "$XDG_RUNTIME_DIR/systemd/user/"; then
|
||||||
|
initdir=${initdir="$XDG_RUNTIME_DIR/systemd/user/"}
|
||||||
|
elif test -d "$XDG_DATA_HOME/systemd/user/"; then
|
||||||
|
initdir=${initdir="$XDG_DATA_HOME/systemd/user/"}
|
||||||
|
else
|
||||||
|
init_type="sysv"
|
||||||
|
fi
|
||||||
|
initname=${initname="$INIT_PROG.service"},
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Init scripts/files
|
||||||
|
#
|
||||||
|
AS_CASE([$init_type],
|
||||||
|
|
||||||
|
[sysv],
|
||||||
|
if test $dist_type = "hp-ux"; then
|
||||||
|
initdir=${initdir="/sbin/init.d"}
|
||||||
|
else
|
||||||
|
initdir=${initdir="/etc/init.d"}
|
||||||
|
fi
|
||||||
|
initname=${initname="$INIT_PROG"}
|
||||||
|
initconfdir=${initconfdir="/etc/conf.d"}
|
||||||
|
initconf=${initconf="$initconfdir/$INIT_PROG"},
|
||||||
|
|
||||||
|
|
||||||
|
[bsd],
|
||||||
|
if test $dist_type = "aix"; then
|
||||||
|
initdir=${initdir="/sbin/rc.d/init.d"}
|
||||||
|
initname=${initname="$INIT_PROG"}
|
||||||
|
else
|
||||||
|
initdir=${initdir="/etc/rc.d"}
|
||||||
|
initname=${initname="rc.$INIT_PROG"}
|
||||||
|
fi,
|
||||||
|
|
||||||
|
[newbsd],
|
||||||
|
initdir=${initdir="/usr/local/etc/rc.d"}
|
||||||
|
initname=${initname="$INIT_PROG"},
|
||||||
|
|
||||||
|
[gentoo],
|
||||||
|
initdir=${initdir="/etc/init.d"}
|
||||||
|
initname=${initname="$INIT_PROG"}
|
||||||
|
initconfdir=${initconfdir="/etc/init.d"}
|
||||||
|
initconf=${initconf="$initconfdir/$INIT_PROG"},
|
||||||
|
|
||||||
|
[openrc],
|
||||||
|
initdir=${initdir="/etc/init.d"}
|
||||||
|
initname=${initname="$INIT_PROG"}
|
||||||
|
initconfdir=${initconfdir="/etc/conf.d"}
|
||||||
|
initconf=${initconf="$initconfdir/$INIT_PROG"},
|
||||||
|
|
||||||
|
[smf*],
|
||||||
|
if test $init_type = smf10; then
|
||||||
|
initdir=${initdir="/var/svc/manifest/network/nagios"}
|
||||||
|
else
|
||||||
|
initdir=${initdir="/lib/svc/manifest/network/nagios"}
|
||||||
|
fi
|
||||||
|
initname=${initname="$INIT_PROG.xml"}
|
||||||
|
initconfdir=unknown
|
||||||
|
initconf=unknown,
|
||||||
|
|
||||||
|
[upstart],
|
||||||
|
initdir=${initdir="/etc/init"}
|
||||||
|
initname=${initname="$INIT_PROG.conf"}
|
||||||
|
initconfdir=${initconfdir="/etc/default"}
|
||||||
|
initconf=${initconf="$initconfdir/$INIT_PROG"},
|
||||||
|
|
||||||
|
[launchd],
|
||||||
|
initdir=${initdir="/Library/LaunchDaemons"}
|
||||||
|
initname=${initname="org.nagios.$INIT_PROG.plist"},
|
||||||
|
# initconfdir=${initconfdir="/private/etc"}
|
||||||
|
# initconf=${initconf="$initconfdir/$INIT_PROG"},
|
||||||
|
|
||||||
|
[systemd],
|
||||||
|
init_type=systemd,
|
||||||
|
|
||||||
|
[*],
|
||||||
|
initdir=unknown
|
||||||
|
initname=unknown)
|
||||||
|
|
||||||
|
# Now see if they supplied any overwriting values
|
||||||
|
initdiroverridden=no
|
||||||
|
AC_ARG_WITH(initdir,
|
||||||
|
AS_HELP_STRING([--with-initdir=<path>],
|
||||||
|
[overrides path for initdir]),
|
||||||
|
initdir=$withval
|
||||||
|
initdiroverridden=yes,
|
||||||
|
initdir=$initdir
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Inetd (per connection) scripts/files
|
||||||
|
#
|
||||||
|
AS_CASE([$inetd_type],
|
||||||
|
[inetd*],
|
||||||
|
inetddir=${inetddir="/etc"}
|
||||||
|
inetdname=${inetdname="inetd.conf"},
|
||||||
|
|
||||||
|
[xinetd],
|
||||||
|
inetddir=${inetddir="/etc/xinetd.d"}
|
||||||
|
inetdname=${inetdname="$INIT_PROG"},
|
||||||
|
|
||||||
|
[systemd],
|
||||||
|
if test $dist_type = "debian"; then
|
||||||
|
inetddir=${inetddir="/lib/systemd/system"}
|
||||||
|
else
|
||||||
|
inetddir=${inetddir="/usr/lib/systemd/system"}
|
||||||
|
fi
|
||||||
|
netdname=${inetdname="$INIT_PROG.socket"},
|
||||||
|
|
||||||
|
[smf*],
|
||||||
|
if test $init_type = smf10; then
|
||||||
|
inetddir=${inetddir="/var/svc/manifest/network/nagios"}
|
||||||
|
else
|
||||||
|
inetddir=${inetddir="/lib/svc/manifest/network/nagios"}
|
||||||
|
fi
|
||||||
|
inetdname=${inetdname="$INIT_PROG.xml"},
|
||||||
|
|
||||||
|
# [upstart],
|
||||||
|
# inetddir=${inetddir="/etc/init.d"}
|
||||||
|
# inetdname=${inetdname="$INIT_PROG"},
|
||||||
|
|
||||||
|
[launchd],
|
||||||
|
inetddir=${inetddir="/Library/LaunchDaemons"}
|
||||||
|
inetdname=${inetdname="org.nagios.$INIT_PROG.plist"},
|
||||||
|
|
||||||
|
[*],
|
||||||
|
inetddir=${inetddir="unknown"}
|
||||||
|
inetdname=${inetdname="unknown"})
|
||||||
|
|
||||||
|
AC_MSG_RESULT($install_method)
|
||||||
|
])
|
||||||
6
ci/.gitignore
vendored
Normal file
6
ci/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
*~
|
||||||
|
\#*
|
||||||
|
#pnp4nagios.spec need for github build, dammit
|
||||||
|
outputs
|
||||||
|
*.tgz
|
||||||
|
*.zip
|
||||||
117
ci/maketar.sh
Executable file
117
ci/maketar.sh
Executable file
@@ -0,0 +1,117 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# collect up all the "base" files into a tar file
|
||||||
|
# exclude the stuff that gets created during a build
|
||||||
|
|
||||||
|
# usage: maketar.sh [version] [release] [releasedate]
|
||||||
|
# defaults from configure.ac if not provided
|
||||||
|
|
||||||
|
# also makes a zip file
|
||||||
|
|
||||||
|
startdir=$(pwd)
|
||||||
|
me=$(realpath -e -L $0)
|
||||||
|
distdir=$(dirname $me)
|
||||||
|
basedir=$(realpath -e -L $distdir/..)
|
||||||
|
#echo "distdir $distdir"
|
||||||
|
#echo "basedir $basedir"
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
CVER=$(awk -F, '/^AC_INIT/ {print $2}' $basedir/configure.ac|tr -d '[]')
|
||||||
|
if test "x${VERSION}" = "x" ;
|
||||||
|
then
|
||||||
|
VERSION=$CVER
|
||||||
|
echo "VERSION ($VERSION) from configure.ac"
|
||||||
|
elif test "${VERSION}" != "${CVER}" ;
|
||||||
|
then
|
||||||
|
echo "$0 version requested $VERSION mismatch configure.ac $CVER"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELEASE=$2
|
||||||
|
if test "x${RELEASE}" = "x" ;
|
||||||
|
then
|
||||||
|
RELEASE=$(awk -F'"' '/^PACKAGE_RELEASE=/{print $2}' $basedir/configure.ac)
|
||||||
|
echo "RELEASE ($RELEASE) from configure.ac"
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELDATE=$3
|
||||||
|
if test "x${RELDATE}" = "x" ;
|
||||||
|
then
|
||||||
|
RELDATE=$(awk -F'"' '/^PKG_REL_DATE=/{print $2}' $basedir/configure.ac)
|
||||||
|
echo "RELDATE ($RELDATE) from configure.ac"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Version $VERSION Release $RELEASE Date $RELDATE"
|
||||||
|
|
||||||
|
tdir=$(mktemp -p "/tmp" -d "pnp4nagiosDIST_XXXXXXXX")
|
||||||
|
#echo "tempdir $tdir"
|
||||||
|
cd $tdir
|
||||||
|
|
||||||
|
#directory for dist
|
||||||
|
mkdir pnp4nagios-${VERSION}
|
||||||
|
|
||||||
|
|
||||||
|
#populate with symbolic links from main code directory
|
||||||
|
cd pnp4nagios-${VERSION}
|
||||||
|
|
||||||
|
|
||||||
|
for f in AUTHORS ChangeLog ci config.guess config.sub contrib \
|
||||||
|
configure aclocal.m4 autoconf-macros \
|
||||||
|
pnp4nagios.te pnp4nagios.fc.in \
|
||||||
|
COPYING helpers include INSTALL install-sh lib \
|
||||||
|
Makefile.in man README.md sample-config scripts \
|
||||||
|
share src subst.in summary.in THANKS ;
|
||||||
|
do
|
||||||
|
# echo "ln -s $basedir/$f ."
|
||||||
|
ln -s $basedir/$f .
|
||||||
|
done
|
||||||
|
|
||||||
|
# update version/release/release_date
|
||||||
|
cp $basedir/configure.ac .
|
||||||
|
touch configure.ac
|
||||||
|
rm ci/pnp4nagios.spec
|
||||||
|
cp ci/pnp4nagios.spec.in ci/pnp4nagios.spec
|
||||||
|
sed -i "s/@PACKAGE_VERSION@/${VERSION}/" ci/pnp4nagios.spec
|
||||||
|
sed -i "s/@PACKAGE_RELEASE@/${RELEASE}/" ci/pnp4nagios.spec
|
||||||
|
sed -i "s/PACKAGE_RELEASE=\"[^\"]*\"/PACKAGE_RELEASE=\"${RELEASE}\"/" \
|
||||||
|
configure.ac
|
||||||
|
sed -i "s/PKG_REL_DATE=\"[^\"]*\"/PKG_REL_DATE=\"${RELDATE}\"/" \
|
||||||
|
configure.ac
|
||||||
|
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# any file that is a 'FILE.in' is kept, but the
|
||||||
|
# resulting 'FILE' is not.
|
||||||
|
find -L pnp4nagios-${VERSION} -name '*.in' >dist.exclude
|
||||||
|
sed -i 's/.in$//' dist.exclude
|
||||||
|
# .. no object files
|
||||||
|
find -L pnp4nagios-${VERSION} -name '*.o' >>dist.exclude
|
||||||
|
# .. no binaries
|
||||||
|
echo "./pnp4nagios-${VERSION}/src/npcd" >>dist.exclude
|
||||||
|
echo "./pnp4nagios-${VERSION}/src/utils" >>dist.exclude
|
||||||
|
echo "./pnp4nagios-${VERSION}/src/pnpsender" >>dist.exclude
|
||||||
|
# ...and no archives in dist, either
|
||||||
|
find -L pnp4nagios-${VERSION} -name 'pnp4nagios-*.tgz' >>dist.exclude
|
||||||
|
find -L pnp4nagios-${VERSION} -name 'pnp4nagios-*.zip' >>dist.exclude
|
||||||
|
find -L pnp4nagios-${VERSION} -path '*/ci/outputs' >>dist.exclude
|
||||||
|
find -L pnp4nagios-${VERSION} -path '*/ci/outputs/*' >>dist.exclude
|
||||||
|
|
||||||
|
# exception is pnp4nagios.spec
|
||||||
|
grep -v ci/pnp4nagios.spec dist.exclude >dist.x
|
||||||
|
mv dist.x dist.exclude
|
||||||
|
|
||||||
|
#GNU makefile 'dist' guideline is that files in the archive
|
||||||
|
#should have world rx permissions
|
||||||
|
chmod 0755 -R pnp4nagios-${VERSION}
|
||||||
|
|
||||||
|
#make the tar archive, rereferencing symbolic links
|
||||||
|
tar chzf pnp4nagios-${VERSION}.tgz -X dist.exclude --exclude-backups pnp4nagios-${VERSION}
|
||||||
|
mv pnp4nagios-${VERSION}.tgz $distdir
|
||||||
|
|
||||||
|
zip -r -q pnp4nagios-${VERSION}.zip pnp4nagios-${VERSION}/ -x\*~ -x\*\# -x\@dist.exclude
|
||||||
|
mv pnp4nagios-${VERSION}.zip $distdir
|
||||||
|
cd $startdir
|
||||||
|
# clean up temp directory
|
||||||
|
rm -rf $tdir
|
||||||
|
|
||||||
|
|
||||||
44
ci/mockbuild.sh
Executable file
44
ci/mockbuild.sh
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
NAME=pnp4nagios
|
||||||
|
VERSION=$(grep '^Version: ' ${NAME}.spec | cut -d ':' -f2 | awk -F'%' '{print $1}' | tr -d ' ')
|
||||||
|
RELEASE=$(grep '^Release: ' ${NAME}.spec | cut -d ':' -f2 | awk -F'%' '{print $1}' | tr -d ' ')
|
||||||
|
|
||||||
|
dnf install -y epel-release
|
||||||
|
dnf install -y mock
|
||||||
|
|
||||||
|
cp ${NAME}.spec ${NAME}.spec.base
|
||||||
|
|
||||||
|
echo "VERSION = ${VERSION}"
|
||||||
|
echo "RELEASE = ${RELEASE}"
|
||||||
|
mkdir outputs
|
||||||
|
|
||||||
|
# want to use the plain-vanilla pnp4nagios.spec so that
|
||||||
|
# it's the one that is included in the srpm
|
||||||
|
|
||||||
|
BREL="${RELEASE}.alma%{?dist}"
|
||||||
|
sed "/^Release:/c\
|
||||||
|
Release: ${BREL}" <${NAME}.spec.base >${NAME}.spec
|
||||||
|
|
||||||
|
config='alma+epel-8-x86_64'
|
||||||
|
mock -v -r $config \
|
||||||
|
--additional-package=selinux-policy-targeted \
|
||||||
|
--additional-package=selinux-policy-devel \
|
||||||
|
--additional-package=perl-Time-HiRes \
|
||||||
|
--additional-package=rrdtool \
|
||||||
|
--spec=${NAME}.spec \
|
||||||
|
--sources=${NAME}-${VERSION}.tgz \
|
||||||
|
--resultdir=./outputs -N
|
||||||
|
|
||||||
|
cp ${NAME}.spec.base ${NAME}.spec
|
||||||
|
config='fedora-38-x86_64'
|
||||||
|
mock -v -r $config \
|
||||||
|
--additional-package=selinux-policy-targeted \
|
||||||
|
--additional-package=selinux-policy-devel \
|
||||||
|
--additional-package=perl-Time-HiRes \
|
||||||
|
--additional-package=rrdtool \
|
||||||
|
--spec=${NAME}.spec \
|
||||||
|
--sources=${NAME}-${VERSION}.tgz --resultdir=./outputs -N
|
||||||
|
|
||||||
|
|
||||||
|
ls -lR .
|
||||||
498
ci/pnp4nagios.spec
Executable file
498
ci/pnp4nagios.spec
Executable file
@@ -0,0 +1,498 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
%global with_selinux 1
|
||||||
|
%global _libdir %{_prefix}/lib64
|
||||||
|
|
||||||
|
Name: pnp4nagios
|
||||||
|
Version: 0.6.27
|
||||||
|
Release: 5%{?dist}
|
||||||
|
Summary: Nagios performance data analysis tool
|
||||||
|
|
||||||
|
Group: Applications/System
|
||||||
|
License: GPLv2
|
||||||
|
URL: https://github.com/pnp4nagios/pnp4nagios
|
||||||
|
Source0: %{name}-%{version}.tgz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
|
BuildRequires: autoconf, automake, libtool
|
||||||
|
Requires: rrdtool-perl
|
||||||
|
Requires: perl(Time::HiRes)
|
||||||
|
Requires: nagios
|
||||||
|
Requires: httpd
|
||||||
|
Requires: rrdtool-perl
|
||||||
|
Requires: php >= 5.6
|
||||||
|
Requires: php-gd
|
||||||
|
Requires: php-xml
|
||||||
|
Requires: php-mbstring
|
||||||
|
# This ensures that the *-selinux package and all it’s dependencies are not pulled
|
||||||
|
# into containers and other systems that do not use SELinux
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
|
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
||||||
|
%else
|
||||||
|
Requires: %{name}-selinux
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 6 || 0%{?fedora} > 20
|
||||||
|
# For necessary macros
|
||||||
|
BuildRequires: systemd
|
||||||
|
%else
|
||||||
|
Requires(preun): initscripts, chkconfig
|
||||||
|
Requires(post): initscripts, chkconfig
|
||||||
|
Requires(postun): initscripts
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
PNP is an addon to nagios which analyzes performance data provided by plugins
|
||||||
|
and stores them automatically into RRD-databases.
|
||||||
|
|
||||||
|
%if 0%{?with_selinux}
|
||||||
|
# SELinux subpackage
|
||||||
|
%package selinux
|
||||||
|
Summary: SELinux context for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
%global selinuxtype targeted
|
||||||
|
%global modulename pnp4nagios
|
||||||
|
Requires: selinux-policy-%{selinuxtype}
|
||||||
|
Requires(post): selinux-policy-%{selinuxtype}
|
||||||
|
Requires: checkpolicy, selinux-policy-devel, bzip2
|
||||||
|
%{?selinux_requires}
|
||||||
|
|
||||||
|
%description selinux
|
||||||
|
SElinux security policy for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
#autoreconf
|
||||||
|
cp contrib/fedora/pnp4nagios-README.fedora README.fedora
|
||||||
|
sed -i -e 's/^INSTALL_OPTS="-o $nagios_user -g $nagios_grp"/INSTALL_OPTS=""/' \
|
||||||
|
configure
|
||||||
|
sed -i -e '/^\t$(MAKE) strip-post-install$/d' src/Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
autoconf
|
||||||
|
%configure --prefix='' \
|
||||||
|
--bindir=%{_sbindir} \
|
||||||
|
--libexecdir=%{_libexecdir}/%{name} \
|
||||||
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
||||||
|
--localstatedir=%{_localstatedir}/log/%{name} \
|
||||||
|
--datadir=%{_datadir}/nagios/html/%{name} \
|
||||||
|
--datarootdir=%{_datadir}/nagios/html/%{name} \
|
||||||
|
%if 0%{with_selinux}
|
||||||
|
--enable-selinux=yes \
|
||||||
|
%else
|
||||||
|
--with-selinux=no \
|
||||||
|
%endif
|
||||||
|
--with-dist-type=rh \
|
||||||
|
--with-init-type=systemd \
|
||||||
|
--with-initdir=%{_unitdir} \
|
||||||
|
--with-http_server=apache \
|
||||||
|
--with-http_server_base=%{_sysconfdir}/httpd \
|
||||||
|
--with-http_user=apache \
|
||||||
|
--with-http_group=apache \
|
||||||
|
--with-kohana_system=%{_datadir}/nagios/html/%{name}/kohana/system \
|
||||||
|
--with-nagios_user=nagios \
|
||||||
|
--with-nagios_group=nagios \
|
||||||
|
--with-nagios_unit=nagios \
|
||||||
|
--with-cache_dir=%{_localstatedir}/cache/pnp4nagios \
|
||||||
|
--with-perfdata-dir=%{_localstatedir}/lib/%{name} \
|
||||||
|
--with-perfdata-spool-dir=%{_localstatedir}/spool/%{name} \
|
||||||
|
--with-pnp-logdir=%{_localstatedir}/log/%{name}
|
||||||
|
|
||||||
|
%{__make} %{?_smp_mflags} all
|
||||||
|
|
||||||
|
%install
|
||||||
|
if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
fi
|
||||||
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL_OPTS="" HTTP_INSTALL_OPTS="" MIX_OPTS="" INIT_OPTS="" NOSAMPLES=1
|
||||||
|
|
||||||
|
# NO...do NOT remove -sample from filename suffix
|
||||||
|
#for i in $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample \
|
||||||
|
# $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*/*-sample
|
||||||
|
#do
|
||||||
|
# mv ${i} ${i%%-sample}
|
||||||
|
#done
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php.*
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config_local.php
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/*.cfg
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/*.md
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/check_commands/*.cfg-sample
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/stats
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/kohana
|
||||||
|
#
|
||||||
|
install -Dp -m 0644 contrib/fedora/pnp4nagios.logrotate.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pnp4nagios
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/scripts/services
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/services
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/logfiles
|
||||||
|
install -m 0666 contrib/fedora/logwatch/scripts/services/pnp4nagios \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/scripts/services/
|
||||||
|
install -m 0644 contrib/fedora/logwatch/conf/services/pnp4nagios.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/services/
|
||||||
|
install -m 0644 contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/logfiles/
|
||||||
|
#
|
||||||
|
#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
|
||||||
|
#sed 's|/usr/local/nagios/etc/htpasswd.users|@NAGIOS_PWD@|' \
|
||||||
|
# sample-config/httpd.conf \
|
||||||
|
# > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||||
|
install -Dp -m 0644 scripts/npcd.service \
|
||||||
|
$RPM_BUILD_ROOT%{_unitdir}/npcd.service
|
||||||
|
|
||||||
|
#### broker api changed
|
||||||
|
#mkdir -p $RPM_BUILD_ROOT%{_libdir}/nagios/brokers
|
||||||
|
#mv $RPM_BUILD_ROOT%{_libdir}/npcdmod.o \
|
||||||
|
# $RPM_BUILD_ROOT%{_libdir}/nagios/brokers/npcdmod.o
|
||||||
|
## rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/npcmod.o
|
||||||
|
|
||||||
|
#mv $RPM_BUILD_ROOT/man $RPM_BUILD_ROOT%{_datadir}/
|
||||||
|
|
||||||
|
# Move kohana to pnp4nagios, there is another kohana in fedore/EPEL,
|
||||||
|
# which can be installed.
|
||||||
|
#mv $RPM_BUILD_ROOT%{_libdir}/kohana \
|
||||||
|
# $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/kohana
|
||||||
|
#sed -i 's|%{_libdir}/pnp4nagios/kohana|%{_datadir}/nagios/html/%{name}/kohana|' \
|
||||||
|
# $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/index.php
|
||||||
|
mv $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/install.ignore.not \
|
||||||
|
$RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/install.ignore
|
||||||
|
rm $RPM_BUILD_ROOT%{_sysconfdir}/pnp4nagios/background.pdf
|
||||||
|
|
||||||
|
%if 0%{with_selinux}
|
||||||
|
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}
|
||||||
|
install -m 0644 %{name}.fc $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.fc
|
||||||
|
install -m 0644 %{name}.te $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.te
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package logrotate
|
||||||
|
Summary: config for rotating pnp4nagios logs
|
||||||
|
Requires: logrotate
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
%description logrotate
|
||||||
|
config file used by logrotate, set up for pnp4nagios logs
|
||||||
|
|
||||||
|
|
||||||
|
%package logwatch
|
||||||
|
Summary: config and scripts for checking pnp4nagios log files
|
||||||
|
Requires: logwatch
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
%description logwatch
|
||||||
|
config files and log scanning script for checking pnp4nagios log
|
||||||
|
files for errors, and flagging them for attention.
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
#if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||||
|
# rm -rf $RPM_BUILD_ROOT
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%doc AUTHORS ChangeLog COPYING
|
||||||
|
%doc INSTALL README.md README.fedora
|
||||||
|
%doc THANKS contrib/
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/pages/background-*.pdf
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/config.php
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/*.cfg
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/SetLogLevels
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/verify_pnp_config
|
||||||
|
%attr(644,root,root) %{_sysconfdir}/%{name}/README_config.md
|
||||||
|
%{_sysconfdir}/%{name}/check_commands/*
|
||||||
|
%{_sysconfdir}/%{name}/contrib/*
|
||||||
|
%dir %{_sysconfdir}/%{name}/config.d
|
||||||
|
%dir %attr(744,apache,apache) /var/cache/pnp4nagios
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/config_tools/NagiosCfgMod.pl
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/config_tools/TemplateMod.pl
|
||||||
|
%{_sysconfdir}/%{name}/config_samples/*
|
||||||
|
%{_sysconfdir}/%{name}/pnp4nagios_release
|
||||||
|
|
||||||
|
%attr(755,root,root) %{_sbindir}/npcd
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_unitdir}/npcd.service
|
||||||
|
%dir %{_libexecdir}/%{name}
|
||||||
|
%attr(755,root,root) %{_libexecdir}/%{name}/*
|
||||||
|
%attr(755,nagios,nagios) %{_localstatedir}/lib/%{name}
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}/stats
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}/lock
|
||||||
|
%dir %attr(755,apache,apache) %{_localstatedir}/log/%{name}/kohana
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/spool/%{name}
|
||||||
|
%{_datadir}/nagios/html/%{name}/
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%files logrotate
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
%files logwatch
|
||||||
|
%defattr(644,root,root)
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/scripts/services/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/conf/services/%{name}.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/conf/logfiles/%{name}.conf
|
||||||
|
|
||||||
|
%if 0%{?with_selinux}
|
||||||
|
%files selinux
|
||||||
|
%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.te
|
||||||
|
%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.fc
|
||||||
|
|
||||||
|
%pre selinux
|
||||||
|
%selinux_relabel_pre -s %{selinuxtype}
|
||||||
|
|
||||||
|
%post selinux
|
||||||
|
pushd %{_localstatedir}/lib/selinux/tmp/%{name} >/dev/null
|
||||||
|
if semodule -E nagios 2>/dev/null >/dev/null ;
|
||||||
|
then
|
||||||
|
semodule_unpackage nagios.pp nagios.mod nagios.fc
|
||||||
|
for pnpdir in /etc/pnp4nagios /var/log/pnp4nagios /var/lib/pnp4nagios /usr/lib/pnp4nagios
|
||||||
|
do
|
||||||
|
if grep -q $pnpdir nagios.fc ;
|
||||||
|
then
|
||||||
|
sed -i "\\|$pnpdir|s/^/#/" %{modulename}.fc
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
rm nagios.*
|
||||||
|
%{__make} %{?_smp_mflags} -f /usr/share/selinux/devel/Makefile all
|
||||||
|
bzip2 %{name}.pp
|
||||||
|
install -m 0600 %{modulename}.pp.bz2 %{_datadir}/selinux/packages/%{selinuxtype}/
|
||||||
|
popd >/dev/null
|
||||||
|
rm -rf /var/lib/selinux/tmp/%{name}
|
||||||
|
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
|
||||||
|
|
||||||
|
%postun selinux
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
%selinux_modules_uninstall -s %{selinuxtype} %{modulename}
|
||||||
|
fi
|
||||||
|
|
||||||
|
%posttrans selinux
|
||||||
|
%selinux_relabel_post -s %{selinuxtype}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%post
|
||||||
|
# config sample update
|
||||||
|
pushd %{_sysconfdir}/pnp4nagios >/dev/null
|
||||||
|
if [ -e %{_sysconfdir}/nagios/objects/templates.cfg ] ;
|
||||||
|
then
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/TemplateMod.pl -i %{_sysconfdir}/nagios/objects/templates.cfg -o config_samples/nagios/objects/templates.cfg
|
||||||
|
fi
|
||||||
|
if [ -e %{_sysconfdir}/nagios/nagios.cfg ] ;
|
||||||
|
then
|
||||||
|
nagver=`nagios --version | gawk '/^Nagios /' | gawk -v RS=' ' '/^[0-9]/'`
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m sync -o config_samples/nagios/nagios-sync.cfg -n $nagver
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m bulk -o config_samples/nagios/nagios-bulk.cfg -n $nagver
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m npcd -o config_samples/nagios/nagios-npcd.cfg -n $nagver
|
||||||
|
fi
|
||||||
|
# determine default paper size based on locale
|
||||||
|
if test -e "/etc/locale.conf" ; then
|
||||||
|
localefile=/etc/locale.conf
|
||||||
|
elif test -e "/etc/default/coale" ; then
|
||||||
|
localefile=/etc/default/locale
|
||||||
|
else
|
||||||
|
localefile=""
|
||||||
|
fi
|
||||||
|
if test "x${localefile}" = "x" ; then
|
||||||
|
PAPERSIZE=A4
|
||||||
|
else
|
||||||
|
country=`grep "_..\." -o ${localefile} | sed 's/[\._]//g'`
|
||||||
|
if echo 'BZ,CA,CL,CO,CR,SV,GT,MX,NI,PA,PH,PR,US,VE' | grep -q ${country} ; then
|
||||||
|
PAPERSIZE=letter
|
||||||
|
else
|
||||||
|
PAPERSIZE=A4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ ! -e %{_sysconfdir}/pnp4nagios/background.pdf ] ; then
|
||||||
|
ln -rs %{_sysconfdir}/pnp4nagios/pages/background-${PAPERSIZE}.pdf %{_sysconfdir}/pnp4nagios/background.pdf
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
%systemd_post npcd.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun npcd.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart npcd.service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Feb 19 2024 Chuck Lane <lane@dchooz.org> - 0.6.27-6
|
||||||
|
- get rpm in sync with 'build-from-source' autoconf setup
|
||||||
|
|
||||||
|
* Thu Nov 23 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-5
|
||||||
|
- add selinux info, improved packaging
|
||||||
|
|
||||||
|
* Mon Sep 11 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-4
|
||||||
|
- change to defining XDG_CACHE_HOME in php, many links in docs fixed
|
||||||
|
|
||||||
|
* Mon Aug 28 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-3
|
||||||
|
- one more pnp8.2 fix, update release number
|
||||||
|
|
||||||
|
* Fri Aug 18 2023 Chuck Lane <lane@dhooz.org> - 0.6.27-1
|
||||||
|
- many pnp8.2 deprecation fixes, get XDG_CACHE_HOME in systemd setup
|
||||||
|
|
||||||
|
* Tue Dec 20 2022 Chuck Lane <lane@dchooz.org> - 0.6.26-14
|
||||||
|
- minor config cleanups, add logwatch and logrotate subpackages
|
||||||
|
|
||||||
|
* Sun Sep 11 2022 Chuck Lane <lane@dchooz.org> - 0.6.26-3
|
||||||
|
- upgrade to php8
|
||||||
|
|
||||||
|
* Mon Jun 08 2015 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.25-1
|
||||||
|
- Update to upstream.
|
||||||
|
|
||||||
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.22-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 04 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-2
|
||||||
|
- Fix two URL Cross-Site Scripting Vulnerabilities (bz#1115983)
|
||||||
|
|
||||||
|
* Thu Jul 03 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-1
|
||||||
|
- Update to upstream (fixes XSS flaw in an error page - bz#1115770)
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.6.21-3
|
||||||
|
- Perl 5.18 rebuild
|
||||||
|
|
||||||
|
* Wed Jul 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-2
|
||||||
|
- Broken configuration for httpd 2.4 fixed (bz#871465)
|
||||||
|
- fixed dates in changelog items
|
||||||
|
|
||||||
|
* Tue Jun 04 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Sat Mar 23 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-2
|
||||||
|
- added autoreconf to prep section (bz#926359)
|
||||||
|
|
||||||
|
* Sun Mar 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Sun Feb 17 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-2
|
||||||
|
- updated hostextinfo URL for pnp4nagios 0.6
|
||||||
|
- spec file cleanup
|
||||||
|
|
||||||
|
* Sat Feb 16 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Mon Sep 03 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-4
|
||||||
|
- CVE-2012-3457 - process_perfdata.cfg world readable
|
||||||
|
|
||||||
|
* Thu Apr 05 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-2
|
||||||
|
- Removed double slashes fro directories (BZ#810212).
|
||||||
|
|
||||||
|
* Thu Nov 24 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-4
|
||||||
|
- add back kohana, it's a different version
|
||||||
|
- added BR: perl(Time::HiRes)
|
||||||
|
|
||||||
|
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-2
|
||||||
|
- exclude kohana sources and require php-Kohana package
|
||||||
|
|
||||||
|
* Wed Nov 16 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-1
|
||||||
|
- update to upstream
|
||||||
|
- remove /usr/share/nagios/html/pnp4nagios/install.php
|
||||||
|
- added /etc/httpd/conf.d/pnp4nagios.conf
|
||||||
|
- removed -sample suffix from rest of sample files
|
||||||
|
|
||||||
|
* Tue Oct 11 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-3
|
||||||
|
- Updated renaming of "-sample" config files.
|
||||||
|
|
||||||
|
* Wed Sep 14 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-1
|
||||||
|
- Update to 0.6.1.
|
||||||
|
|
||||||
|
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-7
|
||||||
|
- added perl-Time-HiRes to build requires
|
||||||
|
|
||||||
|
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-6
|
||||||
|
- rebuilt for EPEL-6
|
||||||
|
|
||||||
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.14-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 27 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-4
|
||||||
|
- Bump release for rebuild.
|
||||||
|
|
||||||
|
* Sun Jul 18 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-3
|
||||||
|
- Add patch to fix PHP deprecated warnings with PHP 5.3.
|
||||||
|
(Patch from Jan Ondrej - RHBZ#572851)
|
||||||
|
|
||||||
|
* Thu Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-2
|
||||||
|
- Ship contrib directory as doc.
|
||||||
|
|
||||||
|
* Thu Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-1
|
||||||
|
- Update to 0.4.14 (RHBZ#518069).
|
||||||
|
- Fix typo in README.fedora (RHBZ#490664).
|
||||||
|
- Move npcdmod.o to a better place.
|
||||||
|
- BR: rrdtool-perl
|
||||||
|
|
||||||
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 4 2008 Michael Schwendt <mschwendt@fedoraproject.org> 0.4.12-2
|
||||||
|
- Include /usr/libexec/pnp4nagios directory.
|
||||||
|
|
||||||
|
* Tue Oct 21 2008 Robert M. Albrecht <romal@gmx.de> 0.4.12-1
|
||||||
|
- Upstream released 0.4.12
|
||||||
|
|
||||||
|
* Tue Sep 02 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-3
|
||||||
|
- Fix logrotate conf (RHBZ#460861).
|
||||||
|
|
||||||
|
* Fri Jul 18 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-2
|
||||||
|
- Fix typo in logrotate conf.
|
||||||
|
|
||||||
|
* Wed Jul 09 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-1
|
||||||
|
- Update to 0.4.10.
|
||||||
|
|
||||||
|
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-3
|
||||||
|
- Fix npcd init script to use /etc/pnp4nagios.
|
||||||
|
|
||||||
|
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-2
|
||||||
|
- Install npcd unstripped to let rpm do it.
|
||||||
|
|
||||||
|
* Sat May 24 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-1
|
||||||
|
- Update to 0.4.9.
|
||||||
|
- Rename to pnp4nagios to match other distros packages.
|
||||||
|
|
||||||
|
* Mon Apr 14 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-5
|
||||||
|
- Log to file by default.
|
||||||
|
- Kill pnpsender man page.
|
||||||
|
|
||||||
|
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-4
|
||||||
|
- Install inside of nagios html dir.
|
||||||
|
|
||||||
|
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-3
|
||||||
|
- Provide properly named config files.
|
||||||
|
- Add missing Requires:.
|
||||||
|
- Add a logrotate conf file.
|
||||||
|
|
||||||
|
* Fri Apr 04 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-2
|
||||||
|
- Add an initscript for npcd.
|
||||||
|
|
||||||
|
* Wed Mar 19 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-1
|
||||||
|
- Initial build.
|
||||||
498
ci/pnp4nagios.spec.in
Executable file
498
ci/pnp4nagios.spec.in
Executable file
@@ -0,0 +1,498 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
%global with_selinux 1
|
||||||
|
%global _libdir %{_prefix}/lib64
|
||||||
|
|
||||||
|
Name: pnp4nagios
|
||||||
|
Version: @PACKAGE_VERSION@
|
||||||
|
Release: @PACKAGE_RELEASE@%{?dist}
|
||||||
|
Summary: Nagios performance data analysis tool
|
||||||
|
|
||||||
|
Group: Applications/System
|
||||||
|
License: GPLv2
|
||||||
|
URL: https://github.com/pnp4nagios/pnp4nagios
|
||||||
|
Source0: %{name}-%{version}.tgz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
|
||||||
|
BuildRequires: autoconf, automake, libtool
|
||||||
|
Requires: rrdtool-perl
|
||||||
|
Requires: perl(Time::HiRes)
|
||||||
|
Requires: nagios
|
||||||
|
Requires: httpd
|
||||||
|
Requires: rrdtool-perl
|
||||||
|
Requires: php >= 5.6
|
||||||
|
Requires: php-gd
|
||||||
|
Requires: php-xml
|
||||||
|
Requires: php-mbstring
|
||||||
|
# This ensures that the *-selinux package and all it’s dependencies are not pulled
|
||||||
|
# into containers and other systems that do not use SELinux
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
|
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
||||||
|
%else
|
||||||
|
Requires: %{name}-selinux
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 6 || 0%{?fedora} > 20
|
||||||
|
# For necessary macros
|
||||||
|
BuildRequires: systemd
|
||||||
|
%else
|
||||||
|
Requires(preun): initscripts, chkconfig
|
||||||
|
Requires(post): initscripts, chkconfig
|
||||||
|
Requires(postun): initscripts
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
PNP is an addon to nagios which analyzes performance data provided by plugins
|
||||||
|
and stores them automatically into RRD-databases.
|
||||||
|
|
||||||
|
%if 0%{?with_selinux}
|
||||||
|
# SELinux subpackage
|
||||||
|
%package selinux
|
||||||
|
Summary: SELinux context for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
%global selinuxtype targeted
|
||||||
|
%global modulename pnp4nagios
|
||||||
|
Requires: selinux-policy-%{selinuxtype}
|
||||||
|
Requires(post): selinux-policy-%{selinuxtype}
|
||||||
|
Requires: checkpolicy, selinux-policy-devel, bzip2
|
||||||
|
%{?selinux_requires}
|
||||||
|
|
||||||
|
%description selinux
|
||||||
|
SElinux security policy for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
#autoreconf
|
||||||
|
cp contrib/fedora/pnp4nagios-README.fedora README.fedora
|
||||||
|
sed -i -e 's/^INSTALL_OPTS="-o $nagios_user -g $nagios_grp"/INSTALL_OPTS=""/' \
|
||||||
|
configure
|
||||||
|
sed -i -e '/^\t$(MAKE) strip-post-install$/d' src/Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
autoconf
|
||||||
|
%configure --prefix='' \
|
||||||
|
--bindir=%{_sbindir} \
|
||||||
|
--libexecdir=%{_libexecdir}/%{name} \
|
||||||
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
||||||
|
--localstatedir=%{_localstatedir}/log/%{name} \
|
||||||
|
--datadir=%{_datadir}/nagios/html/%{name} \
|
||||||
|
--datarootdir=%{_datadir}/nagios/html/%{name} \
|
||||||
|
%if 0%{with_selinux}
|
||||||
|
--enable-selinux=yes \
|
||||||
|
%else
|
||||||
|
--with-selinux=no \
|
||||||
|
%endif
|
||||||
|
--with-dist-type=rh \
|
||||||
|
--with-init-type=systemd \
|
||||||
|
--with-initdir=%{_unitdir} \
|
||||||
|
--with-http_server=apache \
|
||||||
|
--with-http_server_base=%{_sysconfdir}/httpd \
|
||||||
|
--with-http_user=apache \
|
||||||
|
--with-http_group=apache \
|
||||||
|
--with-kohana_system=%{_datadir}/nagios/html/%{name}/kohana/system \
|
||||||
|
--with-nagios_user=nagios \
|
||||||
|
--with-nagios_group=nagios \
|
||||||
|
--with-nagios_unit=nagios \
|
||||||
|
--with-cache_dir=%{_localstatedir}/cache/pnp4nagios \
|
||||||
|
--with-perfdata-dir=%{_localstatedir}/lib/%{name} \
|
||||||
|
--with-perfdata-spool-dir=%{_localstatedir}/spool/%{name} \
|
||||||
|
--with-pnp-logdir=%{_localstatedir}/log/%{name}
|
||||||
|
|
||||||
|
%{__make} %{?_smp_mflags} all
|
||||||
|
|
||||||
|
%install
|
||||||
|
if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
fi
|
||||||
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL_OPTS="" HTTP_INSTALL_OPTS="" MIX_OPTS="" INIT_OPTS="" NOSAMPLES=1
|
||||||
|
|
||||||
|
# NO...do NOT remove -sample from filename suffix
|
||||||
|
#for i in $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*-sample \
|
||||||
|
# $RPM_BUILD_ROOT/%{_sysconfdir}/pnp4nagios/*/*-sample
|
||||||
|
#do
|
||||||
|
# mv ${i} ${i%%-sample}
|
||||||
|
#done
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php.*
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config_local.php
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/*.cfg
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/*.md
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/check_commands/*.cfg-sample
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/stats
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/kohana
|
||||||
|
#
|
||||||
|
install -Dp -m 0644 contrib/fedora/pnp4nagios.logrotate.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pnp4nagios
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/scripts/services
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/services
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/logfiles
|
||||||
|
install -m 0666 contrib/fedora/logwatch/scripts/services/pnp4nagios \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/scripts/services/
|
||||||
|
install -m 0644 contrib/fedora/logwatch/conf/services/pnp4nagios.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/services/
|
||||||
|
install -m 0644 contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf \
|
||||||
|
$RPM_BUILD_ROOT%{_sysconfdir}/logwatch/conf/logfiles/
|
||||||
|
#
|
||||||
|
#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
|
||||||
|
#sed 's|/usr/local/nagios/etc/htpasswd.users|@NAGIOS_PWD@|' \
|
||||||
|
# sample-config/httpd.conf \
|
||||||
|
# > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||||
|
install -Dp -m 0644 scripts/npcd.service \
|
||||||
|
$RPM_BUILD_ROOT%{_unitdir}/npcd.service
|
||||||
|
|
||||||
|
#### broker api changed
|
||||||
|
#mkdir -p $RPM_BUILD_ROOT%{_libdir}/nagios/brokers
|
||||||
|
#mv $RPM_BUILD_ROOT%{_libdir}/npcdmod.o \
|
||||||
|
# $RPM_BUILD_ROOT%{_libdir}/nagios/brokers/npcdmod.o
|
||||||
|
## rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/npcmod.o
|
||||||
|
|
||||||
|
#mv $RPM_BUILD_ROOT/man $RPM_BUILD_ROOT%{_datadir}/
|
||||||
|
|
||||||
|
# Move kohana to pnp4nagios, there is another kohana in fedore/EPEL,
|
||||||
|
# which can be installed.
|
||||||
|
#mv $RPM_BUILD_ROOT%{_libdir}/kohana \
|
||||||
|
# $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/kohana
|
||||||
|
#sed -i 's|%{_libdir}/pnp4nagios/kohana|%{_datadir}/nagios/html/%{name}/kohana|' \
|
||||||
|
# $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/index.php
|
||||||
|
mv $RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/install.ignore.not \
|
||||||
|
$RPM_BUILD_ROOT%{_datadir}/nagios/html/%{name}/install.ignore
|
||||||
|
rm $RPM_BUILD_ROOT%{_sysconfdir}/pnp4nagios/background.pdf
|
||||||
|
|
||||||
|
%if 0%{with_selinux}
|
||||||
|
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}
|
||||||
|
install -m 0644 %{name}.fc $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.fc
|
||||||
|
install -m 0644 %{name}.te $RPM_BUILD_ROOT%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.te
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package logrotate
|
||||||
|
Summary: config for rotating pnp4nagios logs
|
||||||
|
Requires: logrotate
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
%description logrotate
|
||||||
|
config file used by logrotate, set up for pnp4nagios logs
|
||||||
|
|
||||||
|
|
||||||
|
%package logwatch
|
||||||
|
Summary: config and scripts for checking pnp4nagios log files
|
||||||
|
Requires: logwatch
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
%description logwatch
|
||||||
|
config files and log scanning script for checking pnp4nagios log
|
||||||
|
files for errors, and flagging them for attention.
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
#if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||||
|
# rm -rf $RPM_BUILD_ROOT
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%doc AUTHORS ChangeLog COPYING
|
||||||
|
%doc INSTALL README.md README.fedora
|
||||||
|
%doc THANKS contrib/
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/pages/background-*.pdf
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/config.php
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/*.cfg
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/SetLogLevels
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/verify_pnp_config
|
||||||
|
%attr(644,root,root) %{_sysconfdir}/%{name}/README_config.md
|
||||||
|
%{_sysconfdir}/%{name}/check_commands/*
|
||||||
|
%{_sysconfdir}/%{name}/contrib/*
|
||||||
|
%dir %{_sysconfdir}/%{name}/config.d
|
||||||
|
%dir %attr(744,apache,apache) /var/cache/pnp4nagios
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/config_tools/NagiosCfgMod.pl
|
||||||
|
%attr(755,root,root) %{_sysconfdir}/%{name}/config_tools/TemplateMod.pl
|
||||||
|
%{_sysconfdir}/%{name}/config_samples/*
|
||||||
|
%{_sysconfdir}/%{name}/pnp4nagios_release
|
||||||
|
|
||||||
|
%attr(755,root,root) %{_sbindir}/npcd
|
||||||
|
%config(noreplace) %attr(644,root,root) %{_unitdir}/npcd.service
|
||||||
|
%dir %{_libexecdir}/%{name}
|
||||||
|
%attr(755,root,root) %{_libexecdir}/%{name}/*
|
||||||
|
%attr(755,nagios,nagios) %{_localstatedir}/lib/%{name}
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}/stats
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/log/%{name}/lock
|
||||||
|
%dir %attr(755,apache,apache) %{_localstatedir}/log/%{name}/kohana
|
||||||
|
%dir %attr(755,nagios,nagios) %{_localstatedir}/spool/%{name}
|
||||||
|
%{_datadir}/nagios/html/%{name}/
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%files logrotate
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
%files logwatch
|
||||||
|
%defattr(644,root,root)
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/scripts/services/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/conf/services/%{name}.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logwatch/conf/logfiles/%{name}.conf
|
||||||
|
|
||||||
|
%if 0%{?with_selinux}
|
||||||
|
%files selinux
|
||||||
|
%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.te
|
||||||
|
%{_localstatedir}/lib/selinux/tmp/%{name}/%{modulename}.fc
|
||||||
|
|
||||||
|
%pre selinux
|
||||||
|
%selinux_relabel_pre -s %{selinuxtype}
|
||||||
|
|
||||||
|
%post selinux
|
||||||
|
pushd %{_localstatedir}/lib/selinux/tmp/%{name} >/dev/null
|
||||||
|
if semodule -E nagios 2>/dev/null >/dev/null ;
|
||||||
|
then
|
||||||
|
semodule_unpackage nagios.pp nagios.mod nagios.fc
|
||||||
|
for pnpdir in /etc/pnp4nagios /var/log/pnp4nagios /var/lib/pnp4nagios /usr/lib/pnp4nagios
|
||||||
|
do
|
||||||
|
if grep -q $pnpdir nagios.fc ;
|
||||||
|
then
|
||||||
|
sed -i "\\|$pnpdir|s/^/#/" %{modulename}.fc
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
rm nagios.*
|
||||||
|
%{__make} %{?_smp_mflags} -f /usr/share/selinux/devel/Makefile all
|
||||||
|
bzip2 %{name}.pp
|
||||||
|
install -m 0600 %{modulename}.pp.bz2 %{_datadir}/selinux/packages/%{selinuxtype}/
|
||||||
|
popd >/dev/null
|
||||||
|
rm -rf /var/lib/selinux/tmp/%{name}
|
||||||
|
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
|
||||||
|
|
||||||
|
%postun selinux
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
%selinux_modules_uninstall -s %{selinuxtype} %{modulename}
|
||||||
|
fi
|
||||||
|
|
||||||
|
%posttrans selinux
|
||||||
|
%selinux_relabel_post -s %{selinuxtype}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%post
|
||||||
|
# config sample update
|
||||||
|
pushd %{_sysconfdir}/pnp4nagios >/dev/null
|
||||||
|
if [ -e %{_sysconfdir}/nagios/objects/templates.cfg ] ;
|
||||||
|
then
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/TemplateMod.pl -i %{_sysconfdir}/nagios/objects/templates.cfg -o config_samples/nagios/objects/templates.cfg
|
||||||
|
fi
|
||||||
|
if [ -e %{_sysconfdir}/nagios/nagios.cfg ] ;
|
||||||
|
then
|
||||||
|
nagver=`nagios --version | gawk '/^Nagios /' | gawk -v RS=' ' '/^[0-9]/'`
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m sync -o config_samples/nagios/nagios-sync.cfg -n $nagver
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m bulk -o config_samples/nagios/nagios-bulk.cfg -n $nagver
|
||||||
|
perl %{_sysconfdir}/pnp4nagios/config_tools/NagiosCfgMod.pl -i %{_sysconfdir}/nagios/nagios.cfg -m npcd -o config_samples/nagios/nagios-npcd.cfg -n $nagver
|
||||||
|
fi
|
||||||
|
# determine default paper size based on locale
|
||||||
|
if test -e "/etc/locale.conf" ; then
|
||||||
|
localefile=/etc/locale.conf
|
||||||
|
elif test -e "/etc/default/coale" ; then
|
||||||
|
localefile=/etc/default/locale
|
||||||
|
else
|
||||||
|
localefile=""
|
||||||
|
fi
|
||||||
|
if test "x${localefile}" = "x" ; then
|
||||||
|
PAPERSIZE=A4
|
||||||
|
else
|
||||||
|
country=`grep "_..\." -o ${localefile} | sed 's/[\._]//g'`
|
||||||
|
if echo 'BZ,CA,CL,CO,CR,SV,GT,MX,NI,PA,PH,PR,US,VE' | grep -q ${country} ; then
|
||||||
|
PAPERSIZE=letter
|
||||||
|
else
|
||||||
|
PAPERSIZE=A4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ ! -e %{_sysconfdir}/pnp4nagios/background.pdf ] ; then
|
||||||
|
ln -rs %{_sysconfdir}/pnp4nagios/pages/background-${PAPERSIZE}.pdf %{_sysconfdir}/pnp4nagios/background.pdf
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
%systemd_post npcd.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun npcd.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart npcd.service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Feb 19 2024 Chuck Lane <lane@dchooz.org> - 0.6.27-6
|
||||||
|
- get rpm in sync with 'build-from-source' autoconf setup
|
||||||
|
|
||||||
|
* Thu Nov 23 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-5
|
||||||
|
- add selinux info, improved packaging
|
||||||
|
|
||||||
|
* Mon Sep 11 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-4
|
||||||
|
- change to defining XDG_CACHE_HOME in php, many links in docs fixed
|
||||||
|
|
||||||
|
* Mon Aug 28 2023 Chuck Lane <lane@dchooz.org> - 0.6.27-3
|
||||||
|
- one more pnp8.2 fix, update release number
|
||||||
|
|
||||||
|
* Fri Aug 18 2023 Chuck Lane <lane@dhooz.org> - 0.6.27-1
|
||||||
|
- many pnp8.2 deprecation fixes, get XDG_CACHE_HOME in systemd setup
|
||||||
|
|
||||||
|
* Tue Dec 20 2022 Chuck Lane <lane@dchooz.org> - 0.6.26-14
|
||||||
|
- minor config cleanups, add logwatch and logrotate subpackages
|
||||||
|
|
||||||
|
* Sun Sep 11 2022 Chuck Lane <lane@dchooz.org> - 0.6.26-3
|
||||||
|
- upgrade to php8
|
||||||
|
|
||||||
|
* Mon Jun 08 2015 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.25-1
|
||||||
|
- Update to upstream.
|
||||||
|
|
||||||
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.22-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 04 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-2
|
||||||
|
- Fix two URL Cross-Site Scripting Vulnerabilities (bz#1115983)
|
||||||
|
|
||||||
|
* Thu Jul 03 2014 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.22-1
|
||||||
|
- Update to upstream (fixes XSS flaw in an error page - bz#1115770)
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.21-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.6.21-3
|
||||||
|
- Perl 5.18 rebuild
|
||||||
|
|
||||||
|
* Wed Jul 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-2
|
||||||
|
- Broken configuration for httpd 2.4 fixed (bz#871465)
|
||||||
|
- fixed dates in changelog items
|
||||||
|
|
||||||
|
* Tue Jun 04 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.21-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Sat Mar 23 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-2
|
||||||
|
- added autoreconf to prep section (bz#926359)
|
||||||
|
|
||||||
|
* Sun Mar 03 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.20-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Sun Feb 17 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-2
|
||||||
|
- updated hostextinfo URL for pnp4nagios 0.6
|
||||||
|
- spec file cleanup
|
||||||
|
|
||||||
|
* Sat Feb 16 2013 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.19-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Mon Sep 03 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-4
|
||||||
|
- CVE-2012-3457 - process_perfdata.cfg world readable
|
||||||
|
|
||||||
|
* Thu Apr 05 2012 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-2
|
||||||
|
- Removed double slashes fro directories (BZ#810212).
|
||||||
|
|
||||||
|
* Thu Nov 24 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.16-1
|
||||||
|
- update to upstream
|
||||||
|
|
||||||
|
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-4
|
||||||
|
- add back kohana, it's a different version
|
||||||
|
- added BR: perl(Time::HiRes)
|
||||||
|
|
||||||
|
* Mon Nov 21 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-2
|
||||||
|
- exclude kohana sources and require php-Kohana package
|
||||||
|
|
||||||
|
* Wed Nov 16 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.15-1
|
||||||
|
- update to upstream
|
||||||
|
- remove /usr/share/nagios/html/pnp4nagios/install.php
|
||||||
|
- added /etc/httpd/conf.d/pnp4nagios.conf
|
||||||
|
- removed -sample suffix from rest of sample files
|
||||||
|
|
||||||
|
* Tue Oct 11 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-3
|
||||||
|
- Updated renaming of "-sample" config files.
|
||||||
|
|
||||||
|
* Wed Sep 14 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-1
|
||||||
|
- Update to 0.6.1.
|
||||||
|
|
||||||
|
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-7
|
||||||
|
- added perl-Time-HiRes to build requires
|
||||||
|
|
||||||
|
* Tue Sep 13 2011 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.4.14-6
|
||||||
|
- rebuilt for EPEL-6
|
||||||
|
|
||||||
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.14-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 27 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-4
|
||||||
|
- Bump release for rebuild.
|
||||||
|
|
||||||
|
* Sun Jul 18 2010 Xavier Bachelot <xavier@bachelot.org> 0.4.14-3
|
||||||
|
- Add patch to fix PHP deprecated warnings with PHP 5.3.
|
||||||
|
(Patch from Jan Ondrej - RHBZ#572851)
|
||||||
|
|
||||||
|
* Thu Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-2
|
||||||
|
- Ship contrib directory as doc.
|
||||||
|
|
||||||
|
* Thu Aug 27 2009 Xavier Bachelot <xavier@bachelot.org> 0.4.14-1
|
||||||
|
- Update to 0.4.14 (RHBZ#518069).
|
||||||
|
- Fix typo in README.fedora (RHBZ#490664).
|
||||||
|
- Move npcdmod.o to a better place.
|
||||||
|
- BR: rrdtool-perl
|
||||||
|
|
||||||
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.12-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 4 2008 Michael Schwendt <mschwendt@fedoraproject.org> 0.4.12-2
|
||||||
|
- Include /usr/libexec/pnp4nagios directory.
|
||||||
|
|
||||||
|
* Tue Oct 21 2008 Robert M. Albrecht <romal@gmx.de> 0.4.12-1
|
||||||
|
- Upstream released 0.4.12
|
||||||
|
|
||||||
|
* Tue Sep 02 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-3
|
||||||
|
- Fix logrotate conf (RHBZ#460861).
|
||||||
|
|
||||||
|
* Fri Jul 18 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-2
|
||||||
|
- Fix typo in logrotate conf.
|
||||||
|
|
||||||
|
* Wed Jul 09 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.10-1
|
||||||
|
- Update to 0.4.10.
|
||||||
|
|
||||||
|
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-3
|
||||||
|
- Fix npcd init script to use /etc/pnp4nagios.
|
||||||
|
|
||||||
|
* Tue May 27 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-2
|
||||||
|
- Install npcd unstripped to let rpm do it.
|
||||||
|
|
||||||
|
* Sat May 24 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.9-1
|
||||||
|
- Update to 0.4.9.
|
||||||
|
- Rename to pnp4nagios to match other distros packages.
|
||||||
|
|
||||||
|
* Mon Apr 14 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-5
|
||||||
|
- Log to file by default.
|
||||||
|
- Kill pnpsender man page.
|
||||||
|
|
||||||
|
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-4
|
||||||
|
- Install inside of nagios html dir.
|
||||||
|
|
||||||
|
* Mon Apr 07 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-3
|
||||||
|
- Provide properly named config files.
|
||||||
|
- Add missing Requires:.
|
||||||
|
- Add a logrotate conf file.
|
||||||
|
|
||||||
|
* Fri Apr 04 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-2
|
||||||
|
- Add an initscript for npcd.
|
||||||
|
|
||||||
|
* Wed Mar 19 2008 Xavier Bachelot <xavier@bachelot.org> 0.4.7-1
|
||||||
|
- Initial build.
|
||||||
1012
configure.ac
Normal file → Executable file
1012
configure.ac
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
4
contrib/.gitignore
vendored
Normal file
4
contrib/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
fedora/logwatch/conf/logfiles/pnp4nagios.conf
|
||||||
|
fedora/logwatch/scripts/services/pnp4nagios
|
||||||
|
fedora/pnp4nagios.logrotate.conf
|
||||||
|
ssi/status-header.ssi
|
||||||
25
contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf.in
Normal file
25
contrib/fedora/logwatch/conf/logfiles/pnp4nagios.conf.in
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
##########################################################################
|
||||||
|
# $Id$
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# This was written and is maintained by:
|
||||||
|
# Chuck Lane <lane@dchooz.org>
|
||||||
|
#
|
||||||
|
########################################################
|
||||||
|
|
||||||
|
# What actual file? Defaults to LogPath if not absolute path....
|
||||||
|
LogFile = @PERFDATA_LOG@
|
||||||
|
Logfile = @logdir@/npcd.log
|
||||||
|
|
||||||
|
# If the archives are searched, here is one or more line
|
||||||
|
# (optionally containing wildcards) that tell where they are...
|
||||||
|
#If you use a "-" in naming add that as well -mgt
|
||||||
|
Archive = @PERFDATA_LOG@?[0-9]+
|
||||||
|
Archive = @PERFDATA_LOG@?[0-9]+.gz
|
||||||
|
Archive = @logdir@/npcd.log.[0-9]+
|
||||||
|
Archive = @logdir@/npcd.log.[0-9]+.gz
|
||||||
|
|
||||||
|
|
||||||
|
*ApplyEuroDate =
|
||||||
|
# vi: shiftwidth=3 tabstop=3 et
|
||||||
21
contrib/fedora/logwatch/conf/services/pnp4nagios.conf
Normal file
21
contrib/fedora/logwatch/conf/services/pnp4nagios.conf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
# You can put comments anywhere you want to. They are effective for the
|
||||||
|
# rest of the line.
|
||||||
|
|
||||||
|
# this is in the format of <name> = <value>. Whitespace at the beginning
|
||||||
|
# and end of the lines is removed. Whitespace before and after the = sign
|
||||||
|
# is removed. Everything is case *insensitive*.
|
||||||
|
|
||||||
|
# Yes = True = On = 1
|
||||||
|
# No = False = Off = 0
|
||||||
|
|
||||||
|
Title = pnp4nagios-messages
|
||||||
|
|
||||||
|
# Which logfile group...
|
||||||
|
LogFile = pnp4nagios
|
||||||
|
|
||||||
|
# *OnlyService = vsftpd
|
||||||
|
#*RemoveHeaders =
|
||||||
|
|
||||||
|
|
||||||
|
# vi: shiftwidth=3 tabstop=3 et
|
||||||
71
contrib/fedora/logwatch/scripts/services/pnp4nagios.in
Normal file
71
contrib/fedora/logwatch/scripts/services/pnp4nagios.in
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#!@PERL@
|
||||||
|
##########################################################################
|
||||||
|
# $Id: $
|
||||||
|
##########################################################################
|
||||||
|
# $Log: $
|
||||||
|
# Rev for pnp4nagios 0.6.26 2022/10/23 lane@dchooz.org
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Logwatch ':all';
|
||||||
|
|
||||||
|
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
||||||
|
my $DebugCounter = 0;
|
||||||
|
|
||||||
|
my @OtherList = ();
|
||||||
|
|
||||||
|
if ( $Debug >= 5 ) {
|
||||||
|
print STDERR "\n\nDEBUG: Inside pnp4nagios Filter \n\n";
|
||||||
|
$DebugCounter = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $line = 0;
|
||||||
|
#my $date = '\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \[\d+\] \[\d+\]';
|
||||||
|
while (defined(my $ThisLine = <STDIN>)) {
|
||||||
|
if ( $Debug >= 5 ) {
|
||||||
|
print STDERR "DEBUG($DebugCounter): $ThisLine";
|
||||||
|
$DebugCounter++;
|
||||||
|
}
|
||||||
|
chomp($ThisLine);
|
||||||
|
$ThisLine =~ s/^File truncated// if $line == 0;
|
||||||
|
$line++;
|
||||||
|
|
||||||
|
if (
|
||||||
|
($ThisLine =~ /Found Performance Data for/) or
|
||||||
|
($ThisLine =~ /\d+ lines processed/) or
|
||||||
|
($ThisLine =~ /\/var\/spool\/pnp4nagios\/service-perfdata\.\d+-PID-\d+ deleted/) or
|
||||||
|
($ThisLine =~ /\/var\/spool\/pnp4nagios\/host-perfdata\.\d+-PID-\d+ deleted/) or
|
||||||
|
($ThisLine =~ /PNP exiting \(runtime/) or
|
||||||
|
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in BULK Mode called by (NPCD|Nagios)/) or
|
||||||
|
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in SYNC Mode/) or
|
||||||
|
($ThisLine =~ /process_perfdata.pl-[\.\d]+ starting in STDIN Mode/) or
|
||||||
|
($ThisLine =~ /NPCD: Found \d+ files in/) or
|
||||||
|
($ThisLine =~ /NPCD: ThreadCounter \d+\/\d+ File is/) or
|
||||||
|
($ThisLine =~ /NPCD: Regular File: (host|service)-perfdata\.\d+/) or
|
||||||
|
($ThisLine =~ /NPCD: A thread was started on thread_counter = \d+/) or
|
||||||
|
($ThisLine =~ /NPCD: Processing file (host|service)-perfdata\.\d+ with ID \d+ - going to exec/) or
|
||||||
|
($ThisLine =~ /NPCD: Have to wait: Filecounter = \d+ - thread_counter = \d+/) or
|
||||||
|
($ThisLine =~ /NPCD: No more files to process\.\.\. waiting for \d+ seconds/) or
|
||||||
|
0 # this line prevents blame-shifting as lines are added above
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if ( $Debug >= 6 ) {
|
||||||
|
print STDERR "DEBUG($DebugCounter): line ignored\n";
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
# Report any unmatched entries...
|
||||||
|
push @OtherList, "$ThisLine\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
|
||||||
|
if ($#OtherList >= 0) {
|
||||||
|
print "\n**Unmatched Entries**\n";
|
||||||
|
print @OtherList;
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
|
||||||
|
# vi: shiftwidth=3 tabstop=3 syntax=perl et
|
||||||
17
contrib/fedora/npcd.service
Normal file
17
contrib/fedora/npcd.service
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=npcd rrd processor for pnp4nagios
|
||||||
|
Documentation=http://docs.pnp4nagios.org/
|
||||||
|
After=network.target local-fs.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
User=nagios
|
||||||
|
Group=nagios
|
||||||
|
PIDFile=/run/nagios/npcd.pid
|
||||||
|
Environment="CONFIG_FILE=/etc/pnp4nagios/npcd.cfg"
|
||||||
|
EnvironmentFile=-/etc/sysconfig/npcd
|
||||||
|
ExecStart=/usr/sbin/npcd -d -f ${CONFIG_FILE}
|
||||||
|
ExecStop=/bin/kill -s QUIT $MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=nagios.service
|
||||||
5
contrib/fedora/npcd.sysconfig
Normal file
5
contrib/fedora/npcd.sysconfig
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
#
|
||||||
|
# if the config file is in a different location, change it here
|
||||||
|
#
|
||||||
|
#CONFIG_FILE=/etc/pnp4nagios/npcd.cfg
|
||||||
89
contrib/fedora/pnp4nagios-README.fedora
Normal file
89
contrib/fedora/pnp4nagios-README.fedora
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
(For Fedora and other redhat-ish variants)
|
||||||
|
|
||||||
|
**** httpd integration ****
|
||||||
|
pnp4nagios.httpd.plugin.conf -> /etc/systemd/system/httpd.service.d/pnp4nagios.conf
|
||||||
|
systemctl daemon-reload
|
||||||
|
...this sets the XDG_CACHE_HOME environment variable needed by
|
||||||
|
fontconfig that is in turn needed by rrdtool graph generation
|
||||||
|
it should be an apache-writable directory, typically /var/cache/httpd
|
||||||
|
|
||||||
|
|
||||||
|
**** nagios integration *****
|
||||||
|
|
||||||
|
|
||||||
|
* Default Mode
|
||||||
|
|
||||||
|
/etc/nagios/nagios.cfg
|
||||||
|
|
||||||
|
process_performance_data=1
|
||||||
|
service_perfdata_command=process-service-perfdata
|
||||||
|
|
||||||
|
/etc/nagios/commands.cfg
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name process-service-perfdata
|
||||||
|
command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl
|
||||||
|
}
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name process-host-perfdata
|
||||||
|
command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl -d HOSTPERFDATA
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
* Bulk Mode
|
||||||
|
|
||||||
|
/etc/nagios/nagios.cfg :
|
||||||
|
|
||||||
|
process_performance_data=1
|
||||||
|
#
|
||||||
|
# service performance data
|
||||||
|
#
|
||||||
|
service_perfdata_file=/var/spool/nagios/service-perfdata
|
||||||
|
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
|
||||||
|
service_perfdata_file_mode=a
|
||||||
|
service_perfdata_file_processing_interval=15
|
||||||
|
service_perfdata_file_processing_command=process-service-perfdata-file
|
||||||
|
|
||||||
|
/etc/nagios/commands.cfg :
|
||||||
|
|
||||||
|
define command{
|
||||||
|
command_name process-service-perfdata-file
|
||||||
|
command_line $USER1$/process_perfdata.pl --bulk=/var/spool/nagios/service-perfdata
|
||||||
|
}
|
||||||
|
|
||||||
|
define command{
|
||||||
|
command_name process-host-perfdata-file
|
||||||
|
command_line $USER1$/process_perfdata.pl --bulk=/var/spool/nagios/host-perfdata
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
* Bulk Mode with NPCD
|
||||||
|
|
||||||
|
npcd daemon needs to be started :
|
||||||
|
service npcd start
|
||||||
|
chkconfig npcd on
|
||||||
|
|
||||||
|
The configuration is identical to the bulk mode except for the used command.
|
||||||
|
|
||||||
|
/etc/nagios/commands.cfg :
|
||||||
|
|
||||||
|
define command{
|
||||||
|
command_name process-service-perfdata-file
|
||||||
|
command_line /bin/mv /var/spool/nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$
|
||||||
|
}
|
||||||
|
|
||||||
|
define command{
|
||||||
|
command_name process-host-perfdata-file
|
||||||
|
command_line /bin/mv /var/spool/nagios/host-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
* Nagios integration
|
||||||
|
|
||||||
|
/etc/nagios/hostextinfo.cfg :
|
||||||
|
|
||||||
|
define hostextinfo {
|
||||||
|
host_name localhost
|
||||||
|
action_url /pnp4nagios/graph?host=$HOSTNAME$
|
||||||
|
}
|
||||||
103
contrib/fedora/pnp4nagios-npcd.sysvinit
Normal file
103
contrib/fedora/pnp4nagios-npcd.sysvinit
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# npcd Nagios Performancedata C Daemon
|
||||||
|
#
|
||||||
|
# chkconfig: - 98 02
|
||||||
|
# description: Nagios Performancedata C Daemon
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Required-Start:
|
||||||
|
# Required-Stop:
|
||||||
|
# Should-Start:
|
||||||
|
# Should-Stop:
|
||||||
|
# Default-Start:
|
||||||
|
# Default-Stop:
|
||||||
|
# Short-Description:
|
||||||
|
# Description:
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
exec="/usr/sbin/npcd"
|
||||||
|
prog="npcd"
|
||||||
|
config="/etc/pnp4nagios/npcd.cfg"
|
||||||
|
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||||
|
|
||||||
|
lockfile=/var/lock/subsys/$prog
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -x $exec ] || exit 5
|
||||||
|
[ -f $config ] || exit 6
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon $exec -f $config -d
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
force_reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status() {
|
||||||
|
status $prog
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status_q() {
|
||||||
|
rh_status >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
rh_status_q && exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
rh_status_q || exit 7
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
force_reload
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
rh_status
|
||||||
|
;;
|
||||||
|
condrestart|try-restart)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||||
|
exit 2
|
||||||
|
esac
|
||||||
|
exit $?
|
||||||
7
contrib/fedora/pnp4nagios.logrotate.conf.in
Normal file
7
contrib/fedora/pnp4nagios.logrotate.conf.in
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
@logdir@/*.log {
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
rotate 5
|
||||||
|
size 100k
|
||||||
|
}
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
# $Id:$
|
|
||||||
# Upstream: pnp4nagios-devel@lists.sourceforge.net
|
|
||||||
Name: pnp4nagios
|
|
||||||
Version: 0.6.16
|
|
||||||
Release: 1
|
|
||||||
Summary: PNP is not PerfParse. A Nagios/Icinga perfdata graphing solution
|
|
||||||
|
|
||||||
Group: Applications/System
|
|
||||||
License: GPLv2
|
|
||||||
URL: http://www.pnp4nagios.org/
|
|
||||||
Source: http://downloads.sourceforge.net/pnp4nagios/%{name}-%{version}.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
||||||
|
|
||||||
BuildRequires: rrdtool-devel
|
|
||||||
BuildRequires: perl-rrdtool
|
|
||||||
Requires: rrdtool
|
|
||||||
Requires: perl-rrdtool
|
|
||||||
Obsoletes: pnp
|
|
||||||
|
|
||||||
%description
|
|
||||||
PNP is an addon to Nagios/Icinga which analyzes performance data provided by plugins and stores them automatically into RRD-databases.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
sed -i -e 's/INSTALL_OPTS="-o $nagios_user -g $nagios_grp"/INSTALL_OPTS=""/' configure
|
|
||||||
sed -i -e 's/INIT_OPTS=-o root -g root/INIT_OPTS=/' scripts/Makefile.in
|
|
||||||
# hardcode that until a proper fix is upstream
|
|
||||||
sed -i -e 's/MANDIR=@mandir@/MANDIR=\/usr\/share\/man/' man/Makefile.in
|
|
||||||
%configure --with-perfdata-logfile=%{_localstatedir}/log/nagios/perfdata.log \
|
|
||||||
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
||||||
--datarootdir=%{_datadir}/%{name} \
|
|
||||||
--with-perfdata-dir=%{_datadir}/%{name}/perfdata \
|
|
||||||
--with-perfdata-spool-dir=%{_localstatedir}/spool/nagios \
|
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--libdir=%{_libdir}/%{name} # only kohana is installed there and maybe we have a system wide kohana already
|
|
||||||
make %{?_smp_mflags} all
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
%{__mkdir} -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
|
||||||
make fullinstall DESTDIR=%{buildroot}
|
|
||||||
mv %{buildroot}%{_sysconfdir}/%{name}/check_commands/check_nwstat.cfg-sample %{buildroot}%{_sysconfdir}/%{name}/check_commands/check_nwstat.cfg
|
|
||||||
mv %{buildroot}%{_sysconfdir}/%{name}/pages/web_traffic.cfg-sample %{buildroot}%{_sysconfdir}/%{name}/pages/web_traffic.cfg
|
|
||||||
mv %{buildroot}%{_sysconfdir}/%{name}/rra.cfg-sample %{buildroot}%{_sysconfdir}/%{name}/rra.cfg
|
|
||||||
|
|
||||||
sed -i -e 's*log_file = /var/npcd.log*log_file = /var/log/nagios/npcd.log*' %{buildroot}%{_sysconfdir}/%{name}/npcd.cfg
|
|
||||||
|
|
||||||
# drop local versioning, we already provide our own upgrade safety
|
|
||||||
rm -f %{buildroot}%{_sysconfdir}/%{name}/config.php.%{version}
|
|
||||||
rm -f %{buildroot}%{_sysconfdir}/%{name}/config_local.php
|
|
||||||
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,nagios,nagios,-)
|
|
||||||
%doc AUTHORS
|
|
||||||
%doc ChangeLog
|
|
||||||
%doc COPYING
|
|
||||||
%doc INSTALL
|
|
||||||
%doc README
|
|
||||||
%doc THANKS
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/check_commands/check_all_local_disks.cfg-sample
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/check_commands/check_nrpe.cfg-sample
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/check_commands/check_nwstat.cfg
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/npcd.cfg
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/pages/web_traffic.cfg
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/process_perfdata.cfg
|
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/rra.cfg
|
|
||||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
|
|
||||||
%{_sysconfdir}/%{name}/background.pdf
|
|
||||||
%{_sysconfdir}/%{name}/config.php
|
|
||||||
%{_sysconfdir}/%{name}/misccommands.cfg-sample
|
|
||||||
%{_sysconfdir}/%{name}/nagios.cfg-sample
|
|
||||||
%{_sysconfdir}/%{name}/pnp4nagios_release
|
|
||||||
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/npcd
|
|
||||||
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/pnp_gearman_worker
|
|
||||||
%{_bindir}/npcd
|
|
||||||
%{_libdir}/pnp4nagios/npcdmod.o
|
|
||||||
%{_libdir}/%{name}
|
|
||||||
%{_libexecdir}/check_pnp_rrds.pl
|
|
||||||
%{_libexecdir}/process_perfdata.pl
|
|
||||||
%{_libexecdir}/rrd_convert.pl
|
|
||||||
%{_datadir}/%{name}
|
|
||||||
%{_mandir}/man8/npcd.8.gz
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon Feb 06 2012 Michael Friedrich <michael.friedrich@univie.ac.at> - 0.6.16-1
|
|
||||||
- Updated to version 0.6.16.
|
|
||||||
- drop (Build)Requires nagios, we can use other core(s) as well
|
|
||||||
- verify_pnp_config.pl => verify_pnp_config_v2.pl not installed anymore
|
|
||||||
- npcd.cfg and process_perfdata.cfg get now installed by make install w/o -sample suffix
|
|
||||||
- recognize new initscript for pnp_gearman_worker
|
|
||||||
- autoremove versionized config.php, we use config(noreplace)
|
|
||||||
- drop config_local.php which would override default settings
|
|
||||||
- fix npcd.8 man page prefix install
|
|
||||||
|
|
||||||
* Tue Feb 15 2011 Christoph Maser <cmr@financial.com> - 0.6.11-1
|
|
||||||
- Updated to version 0.6.11.
|
|
||||||
|
|
||||||
* Tue Aug 31 2010 Christoph Maser <cmr@financial.com> - 0.6.6-1
|
|
||||||
- Updated to version 0.6.6.
|
|
||||||
|
|
||||||
* Thu Dec 24 2009 Christoph Maser <cmr@financial.com> - 0.6.2 - 2
|
|
||||||
- add --with-perfdata-spool-dir and --with-perfdata--dir
|
|
||||||
- mark httpd-config snippet as config file
|
|
||||||
|
|
||||||
* Thu Dec 24 2009 Christoph Maser <cmr@financial.com> - 0.6.2 - 1
|
|
||||||
- Update to version 0.6.2
|
|
||||||
- Rename to pnp4nagios
|
|
||||||
|
|
||||||
* Mon Mar 23 2009 Christoph Maser <cmr@financial.com> - 0.4.14 - 2
|
|
||||||
- Update to version 0.4.14
|
|
||||||
|
|
||||||
* Mon Mar 23 2009 Christoph Maser <cmr@financial.com> - 0.4.13 - 2
|
|
||||||
- modify log path
|
|
||||||
- add documentation files
|
|
||||||
|
|
||||||
* Mon Mar 23 2009 Christoph Maser <cmr@financial.com> - 0.4.13 - 1
|
|
||||||
- Initial package (using brain ;)
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<script src="@BASE_URL@/media/js/jquery-min.js" type="text/javascript"></script>
|
<script src="@PNP_URL@/media/js/jquery-min.js" type="text/javascript"></script>
|
||||||
<script src="@BASE_URL@/media/js/jquery.cluetip.js" type="text/javascript"></script>
|
<script src="@PNP_URL@/media/js/jquery.cluetip.js" type="text/javascript"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery.noConflict();
|
jQuery.noConflict();
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
|
|||||||
@@ -39,4 +39,4 @@ for L in $LANG; do
|
|||||||
((lindex++))
|
((lindex++))
|
||||||
done
|
done
|
||||||
rm de_DE/dwnld.html
|
rm de_DE/dwnld.html
|
||||||
ln -s en_US/dwnld.html de_DE/dwnld.html
|
ln -s ../en_US/dwnld.html de_DE/dwnld.html
|
||||||
|
|||||||
2
include/.gitignore
vendored
Normal file
2
include/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config.h
|
||||||
|
stamp-h
|
||||||
@@ -12,9 +12,6 @@
|
|||||||
/* Define to 1 if you have the `bzero' function. */
|
/* Define to 1 if you have the `bzero' function. */
|
||||||
#undef HAVE_BZERO
|
#undef HAVE_BZERO
|
||||||
|
|
||||||
/* Define to 1 if you have the `getloadavg' function. */
|
|
||||||
#undef HAVE_GETLOADAVG
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
#undef HAVE_DIRENT_H
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
@@ -27,6 +24,9 @@
|
|||||||
/* Define to 1 if you have the `fork' function. */
|
/* Define to 1 if you have the `fork' function. */
|
||||||
#undef HAVE_FORK
|
#undef HAVE_FORK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getloadavg' function. */
|
||||||
|
#undef HAVE_GETLOADAVG
|
||||||
|
|
||||||
/* Define to 1 if you have the <getopt.h> header file. */
|
/* Define to 1 if you have the <getopt.h> header file. */
|
||||||
#undef HAVE_GETOPT_H
|
#undef HAVE_GETOPT_H
|
||||||
|
|
||||||
@@ -43,9 +43,6 @@
|
|||||||
to 0 otherwise. */
|
to 0 otherwise. */
|
||||||
#undef HAVE_MALLOC
|
#undef HAVE_MALLOC
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||||
#undef HAVE_NDIR_H
|
#undef HAVE_NDIR_H
|
||||||
|
|
||||||
@@ -89,7 +86,7 @@
|
|||||||
/* Define to 1 if you have the `strspn' function. */
|
/* Define to 1 if you have the `strspn' function. */
|
||||||
#undef HAVE_STRSPN
|
#undef HAVE_STRSPN
|
||||||
|
|
||||||
/* Define to 1 if `d_type' is member of `struct dirent'. */
|
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||||
#undef HAVE_STRUCT_DIRENT_D_TYPE
|
#undef HAVE_STRUCT_DIRENT_D_TYPE
|
||||||
|
|
||||||
/* Define to 1 if you have the <syslog.h> header file. */
|
/* Define to 1 if you have the <syslog.h> header file. */
|
||||||
@@ -99,6 +96,12 @@
|
|||||||
*/
|
*/
|
||||||
#undef HAVE_SYS_DIR_H
|
#undef HAVE_SYS_DIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/loadavg.h> header file. */
|
||||||
|
#undef HAVE_SYS_LOADAVG_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||||
|
#undef HAVE_SYS_MMAN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||||
*/
|
*/
|
||||||
#undef HAVE_SYS_NDIR_H
|
#undef HAVE_SYS_NDIR_H
|
||||||
@@ -118,9 +121,6 @@
|
|||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
|
||||||
#undef HAVE_SYS_MMAN_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `vfork' function. */
|
/* Define to 1 if you have the `vfork' function. */
|
||||||
#undef HAVE_VFORK
|
#undef HAVE_VFORK
|
||||||
|
|
||||||
@@ -149,13 +149,15 @@
|
|||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#undef PACKAGE_TARNAME
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||||
#undef RETSIGTYPE
|
required in a freestanding environment). This macro is provided for
|
||||||
|
backward compatibility; new code need not use it. */
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
@@ -167,7 +169,7 @@
|
|||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
/* Define to rpl_malloc if the replacement function should be used. */
|
||||||
#undef malloc
|
#undef malloc
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define as a signed integer type capable of holding a process identifier. */
|
||||||
#undef pid_t
|
#undef pid_t
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
|
|||||||
1
include/stamp-h.in
Normal file
1
include/stamp-h.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2023-10-09T09:17:20-04:00
|
||||||
1
lib/.gitignore
vendored
Normal file
1
lib/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Makefile
|
||||||
564
lib/Makefile.in
564
lib/Makefile.in
@@ -1,7 +1,6 @@
|
|||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
LOGDIR=@localstatedir@
|
LOGDIR=@localstatedir@
|
||||||
CFGDIR=@sysconfdir@
|
|
||||||
BINDIR=@bindir@
|
BINDIR=@bindir@
|
||||||
CGIDIR=@sbindir@
|
CGIDIR=@sbindir@
|
||||||
LIBDIR=@libdir@
|
LIBDIR=@libdir@
|
||||||
@@ -22,284 +21,285 @@ devclean: distclean
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/controllers
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/controllers
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/helpers
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Image
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Image
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Session
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Session
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/config
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/config
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/core
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/core
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/views
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/views
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/views/pagination
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/pagination
|
||||||
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR)/kohana/system/fonts
|
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(DATAROOTDIR)/kohana/system/fonts
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/controllers/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/controllers/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/controllers/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/controllers/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/controllers/template.php $(DESTDIR)$(LIBDIR)/kohana/system/controllers/template.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/controllers/template.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/controllers/template.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/de_DE/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/de_DE/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/de_DE/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/nl_NL/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/nl_NL/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/nl_NL/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/es_ES/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/es_ES/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/es_ES/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/ru_RU/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/ru_RU/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/ru_RU/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/en_US/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/en_US/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/en_US/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/fr_FR/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/fr_FR/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/fr_FR/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/validation.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/core.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/core.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/core.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/core.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/orm.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/orm.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/orm.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/orm.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/image.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/session.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/database.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/event.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/errors.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/errors.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/errors.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/errors.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/swift.php $(DESTDIR)$(LIBDIR)/kohana/system/i18n/it_IT/swift.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/i18n/it_IT/swift.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/i18n/it_IT/swift.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/remote.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/remote.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/remote.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/remote.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/url.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/url.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/url.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/url.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/feed.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/feed.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/feed.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/feed.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/expires.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/expires.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/expires.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/expires.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/text.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/text.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/text.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/text.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/email.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/email.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/email.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/email.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/download.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/download.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/download.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/download.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/format.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/format.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/format.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/format.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/form.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/form.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/form.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/form.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/arr.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/arr.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/arr.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/arr.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/html.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/html.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/html.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/html.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/valid.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/valid.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/valid.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/valid.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/date.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/date.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/date.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/date.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/file.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/file.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/file.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/file.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/request.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/request.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/request.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/request.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/cookie.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/cookie.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/cookie.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/cookie.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/security.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/security.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/security.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/security.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/num.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/num.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/num.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/num.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/inflector.php $(DESTDIR)$(LIBDIR)/kohana/system/helpers/inflector.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/helpers/inflector.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/helpers/inflector.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Tree.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/ORM_Tree.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Tree.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/ORM_Tree.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Encrypt.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Encrypt.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Encrypt.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Encrypt.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Database_Expression.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Database_Expression.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Database_Expression.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Database_Expression.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Event_Observer.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Event_Observer.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Event_Observer.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Event_Observer.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Event_Subject.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Event_Subject.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Event_Subject.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Event_Subject.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Cache.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Session.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mssql.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database/Mssql.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mssql.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database/Mssql.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Pdosqlite.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database/Pdosqlite.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Pdosqlite.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database/Pdosqlite.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mysqli.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database/Mysqli.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mysqli.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database/Mysqli.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Pgsql.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database/Pgsql.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Pgsql.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database/Pgsql.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mysql.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database/Mysql.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database/Mysql.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database/Mysql.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Alpha.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Alpha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Alpha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Alpha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Math.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Math.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Math.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Math.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Word.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Word.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Word.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Word.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Riddle.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Riddle.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Riddle.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Riddle.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Basic.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Basic.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Basic.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Basic.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Black.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha/Black.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha/Black.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha/Black.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Eaccelerator.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/Eaccelerator.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Eaccelerator.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/Eaccelerator.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Apc.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/Apc.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Apc.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/Apc.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Memcache.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/Memcache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Memcache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/Memcache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Xcache.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/Xcache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Xcache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/Xcache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/File.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/File.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/File.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/File.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Sqlite.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Cache/Sqlite.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Cache/Sqlite.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Cache/Sqlite.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/GraphicsMagick.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Image/GraphicsMagick.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/GraphicsMagick.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Image/GraphicsMagick.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/GD.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Image/GD.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/GD.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Image/GD.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/ImageMagick.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Image/ImageMagick.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Image/ImageMagick.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Image/ImageMagick.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Cookie.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Session/Cookie.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Cookie.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Session/Cookie.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Cache.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Session/Cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Session/Cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Database.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Session/Database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Session/Database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Session/Database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/drivers/Database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/drivers/Database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/drivers/Database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Image.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Validation.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Validation.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Validation.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Validation.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Versioned.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/ORM_Versioned.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Versioned.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/ORM_Versioned.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Controller.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Controller.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Controller.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Controller.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Model.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Model.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Model.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Model.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/View.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/View.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/View.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/View.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Router.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Router.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Router.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Router.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Iterator.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/ORM_Iterator.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM_Iterator.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/ORM_Iterator.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Profiler_Table.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Profiler_Table.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Profiler_Table.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Profiler_Table.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/URI.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/URI.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/URI.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/URI.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/ORM.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/ORM.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/ORM.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Calendar_Event.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Calendar_Event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Calendar_Event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Calendar_Event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Tagcloud.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Tagcloud.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Tagcloud.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Tagcloud.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Input.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Input.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Input.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Input.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Database.php $(DESTDIR)$(LIBDIR)/kohana/system/libraries/Database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/libraries/Database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/libraries/Database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/locale.php $(DESTDIR)$(LIBDIR)/kohana/system/config/locale.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/locale.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/locale.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/routes.php $(DESTDIR)$(LIBDIR)/kohana/system/config/routes.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/routes.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/routes.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/pagination.php $(DESTDIR)$(LIBDIR)/kohana/system/config/pagination.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/pagination.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/pagination.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/sql_types.php $(DESTDIR)$(LIBDIR)/kohana/system/config/sql_types.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/sql_types.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/sql_types.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/captcha.php $(DESTDIR)$(LIBDIR)/kohana/system/config/captcha.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/captcha.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/captcha.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/email.php $(DESTDIR)$(LIBDIR)/kohana/system/config/email.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/email.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/email.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/image.php $(DESTDIR)$(LIBDIR)/kohana/system/config/image.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/image.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/image.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_sqlite.php $(DESTDIR)$(LIBDIR)/kohana/system/config/cache_sqlite.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_sqlite.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/cache_sqlite.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_memcache.php $(DESTDIR)$(LIBDIR)/kohana/system/config/cache_memcache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_memcache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/cache_memcache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/session.php $(DESTDIR)$(LIBDIR)/kohana/system/config/session.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/session.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/session.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/database.php $(DESTDIR)$(LIBDIR)/kohana/system/config/database.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/database.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/database.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/credit_cards.php $(DESTDIR)$(LIBDIR)/kohana/system/config/credit_cards.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/credit_cards.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/credit_cards.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/http.php $(DESTDIR)$(LIBDIR)/kohana/system/config/http.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/http.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/http.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/mimes.php $(DESTDIR)$(LIBDIR)/kohana/system/config/mimes.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/mimes.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/mimes.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/config/profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/view.php $(DESTDIR)$(LIBDIR)/kohana/system/config/view.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/view.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/view.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache.php $(DESTDIR)$(LIBDIR)/kohana/system/config/cache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/cache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/encryption.php $(DESTDIR)$(LIBDIR)/kohana/system/config/encryption.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/encryption.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/encryption.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/upload.php $(DESTDIR)$(LIBDIR)/kohana/system/config/upload.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/upload.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/upload.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cookie.php $(DESTDIR)$(LIBDIR)/kohana/system/config/cookie.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cookie.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/cookie.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/user_agents.php $(DESTDIR)$(LIBDIR)/kohana/system/config/user_agents.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/user_agents.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/user_agents.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/inflector.php $(DESTDIR)$(LIBDIR)/kohana/system/config/inflector.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/inflector.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/inflector.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_xcache.php $(DESTDIR)$(LIBDIR)/kohana/system/config/cache_xcache.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/config/cache_xcache.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/config/cache_xcache.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Event.php $(DESTDIR)$(LIBDIR)/kohana/system/core/Event.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Event.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/Event.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/transliterate_to_ascii.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/transliterate_to_ascii.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/transliterate_to_ascii.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/transliterate_to_ascii.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ucfirst.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/ucfirst.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ucfirst.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/ucfirst.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ord.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/ord.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ord.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/ord.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strrpos.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strrpos.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strrpos.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strrpos.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strtolower.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strtolower.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strtolower.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strtolower.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/substr.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/substr.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/substr.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/substr.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_pad.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/str_pad.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_pad.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/str_pad.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strcspn.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strcspn.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strcspn.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strcspn.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/trim.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/trim.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/trim.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/trim.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/rtrim.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/rtrim.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/rtrim.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/rtrim.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strcasecmp.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strcasecmp.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strcasecmp.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strcasecmp.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strtoupper.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strtoupper.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strtoupper.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strtoupper.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_split.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/str_split.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_split.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/str_split.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strpos.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strpos.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strpos.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strpos.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/stristr.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/stristr.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/stristr.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/stristr.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ucwords.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/ucwords.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ucwords.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/ucwords.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_ireplace.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/str_ireplace.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/str_ireplace.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/str_ireplace.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strlen.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strlen.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strlen.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strlen.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/to_unicode.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/to_unicode.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/to_unicode.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/to_unicode.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/substr_replace.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/substr_replace.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/substr_replace.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/substr_replace.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/from_unicode.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/from_unicode.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/from_unicode.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/from_unicode.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strrev.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strrev.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strrev.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strrev.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strspn.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/strspn.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/strspn.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/strspn.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ltrim.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8/ltrim.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8/ltrim.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8/ltrim.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Benchmark.php $(DESTDIR)$(LIBDIR)/kohana/system/core/Benchmark.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Benchmark.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/Benchmark.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Bootstrap.php $(DESTDIR)$(LIBDIR)/kohana/system/core/Bootstrap.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Bootstrap.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/Bootstrap.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Kohana.php $(DESTDIR)$(LIBDIR)/kohana/system/core/Kohana.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Security.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/Security.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8.php $(DESTDIR)$(LIBDIR)/kohana/system/core/utf8.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/Kohana.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/Kohana.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler_table.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_profiler_table.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/core/utf8.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/core/utf8.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana/template.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana/template.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler_table.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_profiler_table.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_error_page.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_error_page.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana/template.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana/template.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_calendar.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_calendar.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_error_page.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_error_page.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/digg.php $(DESTDIR)$(LIBDIR)/kohana/system/views/pagination/digg.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_calendar.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_calendar.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/punbb.php $(DESTDIR)$(LIBDIR)/kohana/system/views/pagination/punbb.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/digg.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/pagination/digg.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/extended.php $(DESTDIR)$(LIBDIR)/kohana/system/views/pagination/extended.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/punbb.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/pagination/punbb.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/classic.php $(DESTDIR)$(LIBDIR)/kohana/system/views/pagination/classic.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/extended.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/pagination/extended.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler_table.css $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_profiler_table.css
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/pagination/classic.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/pagination/classic.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_profiler.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler_table.css $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_profiler_table.css
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_error_disabled.php $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_error_disabled.php
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_profiler.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_profiler.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_errors.css $(DESTDIR)$(LIBDIR)/kohana/system/views/kohana_errors.css
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_error_disabled.php $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_error_disabled.php
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/fonts/LICENSE $(DESTDIR)$(LIBDIR)/kohana/system/fonts/LICENSE
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/views/kohana_errors.css $(DESTDIR)$(DATAROOTDIR)/kohana/system/views/kohana_errors.css
|
||||||
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/fonts/DejaVuSerif.ttf $(DESTDIR)$(LIBDIR)/kohana/system/fonts/DejaVuSerif.ttf
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/fonts/LICENSE $(DESTDIR)$(DATAROOTDIR)/kohana/system/fonts/LICENSE
|
||||||
|
$(INSTALL) -m 644 $(INSTALL_OPTS) kohana/system/fonts/DejaVuSerif.ttf $(DESTDIR)$(DATAROOTDIR)/kohana/system/fonts/DejaVuSerif.ttf
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Cache
|
* @package Cache
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Cache:Memcache
|
* @package Cache:Memcache
|
||||||
*
|
*
|
||||||
@@ -10,11 +14,11 @@ $config['servers'] = array
|
|||||||
(
|
(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'port' => 11211,
|
'port' => 11211,
|
||||||
'persistent' => FALSE,
|
'persistent' => false,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable cache data compression.
|
* Enable cache data compression.
|
||||||
*/
|
*/
|
||||||
$config['compression'] = FALSE;
|
$config['compression'] = false;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Cache:SQLite
|
* @package Cache:SQLite
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Cache:Xcache
|
* @package Cache:Xcache
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
@@ -25,5 +29,5 @@ $config['default'] = array
|
|||||||
'background' => '',
|
'background' => '',
|
||||||
'fontpath' => SYSPATH . 'fonts/',
|
'fontpath' => SYSPATH . 'fonts/',
|
||||||
'fonts' => array('DejaVuSerif.ttf'),
|
'fonts' => array('DejaVuSerif.ttf'),
|
||||||
'promote' => FALSE,
|
'promote' => false,
|
||||||
);
|
);
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
@@ -23,10 +27,10 @@ $config['expire'] = 0;
|
|||||||
* Enable this option to only allow the cookie to be read when using the a
|
* Enable this option to only allow the cookie to be read when using the a
|
||||||
* secure protocol.
|
* secure protocol.
|
||||||
*/
|
*/
|
||||||
$config['secure'] = FALSE;
|
$config['secure'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable this option to disable the cookie from being accessed when using a
|
* Enable this option to disable the cookie from being accessed when using a
|
||||||
* secure protocol. This option is only available in PHP 5.2 and above.
|
* secure protocol. This option is only available in PHP 5.2 and above.
|
||||||
*/
|
*/
|
||||||
$config['httponly'] = FALSE;
|
$config['httponly'] = false;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* Credit card validation configuration.
|
* Credit card validation configuration.
|
||||||
*
|
*
|
||||||
@@ -13,48 +17,48 @@ $config = array
|
|||||||
(
|
(
|
||||||
'length' => '13,14,15,16,17,18,19',
|
'length' => '13,14,15,16,17,18,19',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'american express' => array
|
'american express' => array
|
||||||
(
|
(
|
||||||
'length' => '15',
|
'length' => '15',
|
||||||
'prefix' => '3[47]',
|
'prefix' => '3[47]',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'diners club' => array
|
'diners club' => array
|
||||||
(
|
(
|
||||||
'length' => '14,16',
|
'length' => '14,16',
|
||||||
'prefix' => '36|55|30[0-5]',
|
'prefix' => '36|55|30[0-5]',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'discover' => array
|
'discover' => array
|
||||||
(
|
(
|
||||||
'length' => '16',
|
'length' => '16',
|
||||||
'prefix' => '6(?:5|011)',
|
'prefix' => '6(?:5|011)',
|
||||||
'luhn' => TRUE,
|
'luhn' => true,
|
||||||
),
|
),
|
||||||
'jcb' => array
|
'jcb' => array
|
||||||
(
|
(
|
||||||
'length' => '15,16',
|
'length' => '15,16',
|
||||||
'prefix' => '3|1800|2131',
|
'prefix' => '3|1800|2131',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'maestro' => array
|
'maestro' => array
|
||||||
(
|
(
|
||||||
'length' => '16,18',
|
'length' => '16,18',
|
||||||
'prefix' => '50(?:20|38)|6(?:304|759)',
|
'prefix' => '50(?:20|38)|6(?:304|759)',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'mastercard' => array
|
'mastercard' => array
|
||||||
(
|
(
|
||||||
'length' => '16',
|
'length' => '16',
|
||||||
'prefix' => '5[1-5]',
|
'prefix' => '5[1-5]',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
'visa' => array
|
'visa' => array
|
||||||
(
|
(
|
||||||
'length' => '13,16',
|
'length' => '13,16',
|
||||||
'prefix' => '4',
|
'prefix' => '4',
|
||||||
'luhn' => TRUE
|
'luhn' => true
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Database
|
* @package Database
|
||||||
*
|
*
|
||||||
@@ -25,21 +29,21 @@
|
|||||||
*/
|
*/
|
||||||
$config['default'] = array
|
$config['default'] = array
|
||||||
(
|
(
|
||||||
'benchmark' => TRUE,
|
'benchmark' => true,
|
||||||
'persistent' => FALSE,
|
'persistent' => false,
|
||||||
'connection' => array
|
'connection' => array
|
||||||
(
|
(
|
||||||
'type' => 'mysql',
|
'type' => 'mysql',
|
||||||
'user' => 'dbuser',
|
'user' => 'dbuser',
|
||||||
'pass' => 'p@ssw0rd',
|
'pass' => 'p@ssw0rd',
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'port' => FALSE,
|
'port' => false,
|
||||||
'socket' => FALSE,
|
'socket' => false,
|
||||||
'database' => 'kohana'
|
'database' => 'kohana'
|
||||||
),
|
),
|
||||||
'character_set' => 'utf8',
|
'character_set' => 'utf8',
|
||||||
'table_prefix' => '',
|
'table_prefix' => '',
|
||||||
'object' => TRUE,
|
'object' => true,
|
||||||
'cache' => FALSE,
|
'cache' => false,
|
||||||
'escape' => TRUE
|
'escape' => true
|
||||||
);
|
);
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* SwiftMailer driver, used with the email helper.
|
* SwiftMailer driver, used with the email helper.
|
||||||
*
|
*
|
||||||
@@ -19,4 +23,4 @@ $config['driver'] = 'native';
|
|||||||
* @param string sendmail: executable path, with -bs or equivalent attached
|
* @param string sendmail: executable path, with -bs or equivalent attached
|
||||||
* @param array smtp: hostname, (username), (password), (port), (auth), (encryption)
|
* @param array smtp: hostname, (username), (password), (port), (auth), (encryption)
|
||||||
*/
|
*/
|
||||||
$config['options'] = NULL;
|
$config['options'] = null;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Encrypt
|
* @package Encrypt
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
// HTTP-EQUIV type meta tags
|
// HTTP-EQUIV type meta tags
|
||||||
$config['meta_equiv'] = array
|
$config['meta_equiv'] = array
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Image
|
* @package Image
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
$config['uncountable'] = array
|
$config['uncountable'] = array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Pagination
|
* @package Pagination
|
||||||
*
|
*
|
||||||
@@ -21,5 +25,5 @@ $config['default'] = array
|
|||||||
'uri_segment' => 3,
|
'uri_segment' => 3,
|
||||||
'query_string' => '',
|
'query_string' => '',
|
||||||
'items_per_page' => 20,
|
'items_per_page' => 20,
|
||||||
'auto_hide' => FALSE,
|
'auto_hide' => false,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Profiler
|
* @package Profiler
|
||||||
*
|
*
|
||||||
* Array of section names to display in the Profiler, TRUE to display all of them.
|
* Array of section names to display in the Profiler, TRUE to display all of them.
|
||||||
* Built in sections are benchmarks, database, session, post and cookies, custom sections can be used too.
|
* Built in sections are benchmarks, database, session, post and cookies, custom sections can be used too.
|
||||||
*/
|
*/
|
||||||
$config['show'] = TRUE;
|
$config['show'] = true;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Session
|
* @package Session
|
||||||
*
|
*
|
||||||
@@ -27,7 +31,7 @@ $config['validate'] = array('user_agent');
|
|||||||
* Note: this has no effect on the native session driver.
|
* Note: this has no effect on the native session driver.
|
||||||
* Note: the cookie driver always encrypts session data. Set to TRUE for stronger encryption.
|
* Note: the cookie driver always encrypts session data. Set to TRUE for stronger encryption.
|
||||||
*/
|
*/
|
||||||
$config['encryption'] = FALSE;
|
$config['encryption'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Session lifetime. Number of seconds that each session will last.
|
* Session lifetime. Number of seconds that each session will last.
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Database
|
* @package Database
|
||||||
*
|
*
|
||||||
@@ -23,11 +27,11 @@ $config = array
|
|||||||
'year' => array('type' => 'string', 'format' => '0000'),
|
'year' => array('type' => 'string', 'format' => '0000'),
|
||||||
'datetime' => array('type' => 'string', 'format' => '0000-00-00 00:00:00'),
|
'datetime' => array('type' => 'string', 'format' => '0000-00-00 00:00:00'),
|
||||||
'timestamp with time zone' => array('type' => 'string'),
|
'timestamp with time zone' => array('type' => 'string'),
|
||||||
'char' => array('type' => 'string', 'exact' => TRUE),
|
'char' => array('type' => 'string', 'exact' => true),
|
||||||
'binary' => array('type' => 'string', 'binary' => TRUE, 'exact' => TRUE),
|
'binary' => array('type' => 'string', 'binary' => true, 'exact' => true),
|
||||||
'varchar' => array('type' => 'string'),
|
'varchar' => array('type' => 'string'),
|
||||||
'varbinary' => array('type' => 'string', 'binary' => TRUE),
|
'varbinary' => array('type' => 'string', 'binary' => true),
|
||||||
'blob' => array('type' => 'string', 'binary' => TRUE),
|
'blob' => array('type' => 'string', 'binary' => true),
|
||||||
'text' => array('type' => 'string')
|
'text' => array('type' => 'string')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
@@ -9,9 +13,9 @@ $config['directory'] = DOCROOT.'upload';
|
|||||||
/**
|
/**
|
||||||
* Enable or disable directory creation.
|
* Enable or disable directory creation.
|
||||||
*/
|
*/
|
||||||
$config['create_directories'] = FALSE;
|
$config['create_directories'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove spaces from uploaded filenames.
|
* Remove spaces from uploaded filenames.
|
||||||
*/
|
*/
|
||||||
$config['remove_spaces'] = TRUE;
|
$config['remove_spaces'] = true;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* @package Core
|
* @package Core
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs the dynamic Captcha resource.
|
* Outputs the dynamic Captcha resource.
|
||||||
* Usage: Call the Captcha controller from a view, e.g.
|
* Usage: Call the Captcha controller from a view, e.g.
|
||||||
@@ -11,13 +18,13 @@
|
|||||||
* @copyright (c) 2007-2008 Kohana Team
|
* @copyright (c) 2007-2008 Kohana Team
|
||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
*/
|
*/
|
||||||
class Captcha_Controller extends Controller {
|
class Captcha_Controller extends Controller
|
||||||
|
{
|
||||||
public function __call($method, $args)
|
public function __call($method, $args)
|
||||||
{
|
{
|
||||||
// Output the Captcha challenge resource (no html)
|
// Output the Captcha challenge resource (no html)
|
||||||
// Pull the config group name from the URL
|
// Pull the config group name from the URL
|
||||||
Captcha::factory($this->uri->segment(2))->render(FALSE);
|
Captcha::factory($this->uri->segment(2))->render(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End Captcha_Controller
|
// End Captcha_Controller
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows a template to be automatically loaded and displayed. Display can be
|
* Allows a template to be automatically loaded and displayed. Display can be
|
||||||
* dynamically turned off in the controller methods, and the template file
|
* dynamically turned off in the controller methods, and the template file
|
||||||
@@ -14,13 +22,13 @@
|
|||||||
* @copyright (c) 2007-2008 Kohana Team
|
* @copyright (c) 2007-2008 Kohana Team
|
||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
*/
|
*/
|
||||||
abstract class Template_Controller extends Controller {
|
abstract class Template_Controller extends Controller
|
||||||
|
{
|
||||||
// Template view name
|
// Template view name
|
||||||
public $template = 'template';
|
public $template = 'template';
|
||||||
|
|
||||||
// Default to do auto-rendering
|
// Default to do auto-rendering
|
||||||
public $auto_render = TRUE;
|
public $auto_render = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template loading and setup routine.
|
* Template loading and setup routine.
|
||||||
@@ -32,23 +40,21 @@ abstract class Template_Controller extends Controller {
|
|||||||
// Load the template
|
// Load the template
|
||||||
$this->template = new View($this->template);
|
$this->template = new View($this->template);
|
||||||
|
|
||||||
if ($this->auto_render == TRUE)
|
if ($this->auto_render == true) {
|
||||||
{
|
|
||||||
// Render the template immediately after the controller method
|
// Render the template immediately after the controller method
|
||||||
Event::add('system.post_controller', array($this, '_render'));
|
Event::add('system.post_controller', array($this, 'Xrender'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the loaded template.
|
* Render the loaded template.
|
||||||
*/
|
*/
|
||||||
public function _render()
|
public function Xrender()
|
||||||
{
|
|
||||||
if ($this->auto_render == TRUE)
|
|
||||||
{
|
{
|
||||||
|
if ($this->auto_render == true) {
|
||||||
// Render the template when the class is destroyed
|
// Render the template when the class is destroyed
|
||||||
$this->template->render(TRUE);
|
$this->template->render(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End Template_Controller
|
// End Template_Controller
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple benchmarking.
|
* Simple benchmarking.
|
||||||
*
|
*
|
||||||
@@ -9,8 +16,8 @@
|
|||||||
* @copyright (c) 2007 Kohana Team
|
* @copyright (c) 2007 Kohana Team
|
||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
*/
|
*/
|
||||||
final class Benchmark {
|
final class Benchmark
|
||||||
|
{
|
||||||
// Benchmark timestamps
|
// Benchmark timestamps
|
||||||
private static $marks;
|
private static $marks;
|
||||||
|
|
||||||
@@ -22,17 +29,16 @@ final class Benchmark {
|
|||||||
*/
|
*/
|
||||||
public static function start($name)
|
public static function start($name)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$marks[$name]))
|
if (! isset(self::$marks[$name])) {
|
||||||
{
|
|
||||||
self::$marks[$name] = array();
|
self::$marks[$name] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$mark = array
|
$mark = array
|
||||||
(
|
(
|
||||||
'start' => microtime(TRUE),
|
'start' => microtime(true),
|
||||||
'stop' => FALSE,
|
'stop' => false,
|
||||||
'memory_start' => self::memory_usage(),
|
'memory_start' => self::memory_usage(),
|
||||||
'memory_stop' => FALSE
|
'memory_stop' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
array_unshift(self::$marks[$name], $mark);
|
array_unshift(self::$marks[$name], $mark);
|
||||||
@@ -46,9 +52,8 @@ final class Benchmark {
|
|||||||
*/
|
*/
|
||||||
public static function stop($name)
|
public static function stop($name)
|
||||||
{
|
{
|
||||||
if (isset(self::$marks[$name]) AND self::$marks[$name][0]['stop'] === FALSE)
|
if (isset(self::$marks[$name]) and self::$marks[$name][0]['stop'] === false) {
|
||||||
{
|
self::$marks[$name][0]['stop'] = microtime(true);
|
||||||
self::$marks[$name][0]['stop'] = microtime(TRUE);
|
|
||||||
self::$marks[$name][0]['memory_stop'] = self::memory_usage();
|
self::$marks[$name][0]['memory_stop'] = self::memory_usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,13 +67,11 @@ final class Benchmark {
|
|||||||
*/
|
*/
|
||||||
public static function get($name, $decimals = 4)
|
public static function get($name, $decimals = 4)
|
||||||
{
|
{
|
||||||
if ($name === TRUE)
|
if ($name === true) {
|
||||||
{
|
|
||||||
$times = array();
|
$times = array();
|
||||||
$names = array_keys(self::$marks);
|
$names = array_keys(self::$marks);
|
||||||
|
|
||||||
foreach ($names as $name)
|
foreach ($names as $name) {
|
||||||
{
|
|
||||||
// Get each mark recursively
|
// Get each mark recursively
|
||||||
$times[$name] = self::get($name, $decimals);
|
$times[$name] = self::get($name, $decimals);
|
||||||
}
|
}
|
||||||
@@ -77,11 +80,11 @@ final class Benchmark {
|
|||||||
return $times;
|
return $times;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset(self::$marks[$name]))
|
if (! isset(self::$marks[$name])) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (self::$marks[$name][0]['stop'] === FALSE)
|
if (self::$marks[$name][0]['stop'] === false) {
|
||||||
{
|
|
||||||
// Stop the benchmark to prevent mis-matched results
|
// Stop the benchmark to prevent mis-matched results
|
||||||
self::stop($name);
|
self::stop($name);
|
||||||
}
|
}
|
||||||
@@ -89,8 +92,7 @@ final class Benchmark {
|
|||||||
// Return a string version of the time between the start and stop points
|
// Return a string version of the time between the start and stop points
|
||||||
// Properly reading a float requires using number_format or sprintf
|
// Properly reading a float requires using number_format or sprintf
|
||||||
$time = $memory = 0;
|
$time = $memory = 0;
|
||||||
for ($i = 0; $i < count(self::$marks[$name]); $i++)
|
for ($i = 0; $i < count(self::$marks[$name]); $i++) {
|
||||||
{
|
|
||||||
$time += self::$marks[$name][$i]['stop'] - self::$marks[$name][$i]['start'];
|
$time += self::$marks[$name][$i]['stop'] - self::$marks[$name][$i]['start'];
|
||||||
$memory += self::$marks[$name][$i]['memory_stop'] - self::$marks[$name][$i]['memory_start'];
|
$memory += self::$marks[$name][$i]['memory_stop'] - self::$marks[$name][$i]['memory_start'];
|
||||||
}
|
}
|
||||||
@@ -113,13 +115,12 @@ final class Benchmark {
|
|||||||
{
|
{
|
||||||
static $func;
|
static $func;
|
||||||
|
|
||||||
if ($func === NULL)
|
if ($func === null) {
|
||||||
{
|
|
||||||
// Test if memory usage can be seen
|
// Test if memory usage can be seen
|
||||||
$func = function_exists('memory_get_usage');
|
$func = function_exists('memory_get_usage');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $func ? memory_get_usage() : 0;
|
return $func ? memory_get_usage() : 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End Benchmark
|
// End Benchmark
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kohana process control file, loaded by the front controller.
|
* Kohana process control file, loaded by the front controller.
|
||||||
*
|
*
|
||||||
@@ -31,6 +35,7 @@ Benchmark::start(SYSTEM_BENCHMARK.'_kohana_loading');
|
|||||||
// Load core files
|
// Load core files
|
||||||
require SYSPATH . 'core/utf8' . EXT;
|
require SYSPATH . 'core/utf8' . EXT;
|
||||||
require SYSPATH . 'core/Event' . EXT;
|
require SYSPATH . 'core/Event' . EXT;
|
||||||
|
require SYSPATH . 'core/Security' . EXT;
|
||||||
require SYSPATH . 'core/Kohana' . EXT;
|
require SYSPATH . 'core/Kohana' . EXT;
|
||||||
|
|
||||||
// Prepare the environment
|
// Prepare the environment
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process queuing/execution class. Allows an unlimited number of callbacks
|
* Process queuing/execution class. Allows an unlimited number of callbacks
|
||||||
* to be added to 'events'. Events can be run multiple times, and can also
|
* to be added to 'events'. Events can be run multiple times, and can also
|
||||||
@@ -12,8 +18,8 @@
|
|||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
* @link http://docs.kohanaphp.com/general/events
|
* @link http://docs.kohanaphp.com/general/events
|
||||||
*/
|
*/
|
||||||
final class Event {
|
final class Event
|
||||||
|
{
|
||||||
// Event callbacks
|
// Event callbacks
|
||||||
private static $events = array();
|
private static $events = array();
|
||||||
|
|
||||||
@@ -32,21 +38,18 @@ final class Event {
|
|||||||
*/
|
*/
|
||||||
public static function add($name, $callback)
|
public static function add($name, $callback)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$events[$name]))
|
if (! isset(self::$events[$name])) {
|
||||||
{
|
|
||||||
// Create an empty event if it is not yet defined
|
// Create an empty event if it is not yet defined
|
||||||
self::$events[$name] = array();
|
self::$events[$name] = array();
|
||||||
}
|
} elseif (in_array($callback, self::$events[$name], true)) {
|
||||||
elseif (in_array($callback, self::$events[$name], TRUE))
|
|
||||||
{
|
|
||||||
// The event already exists
|
// The event already exists
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the event
|
// Add the event
|
||||||
self::$events[$name][] = $callback;
|
self::$events[$name][] = $callback;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,13 +62,10 @@ final class Event {
|
|||||||
*/
|
*/
|
||||||
public static function add_before($name, $existing, $callback)
|
public static function add_before($name, $existing, $callback)
|
||||||
{
|
{
|
||||||
if (empty(self::$events[$name]) OR ($key = array_search($existing, self::$events[$name])) === FALSE)
|
if (empty(self::$events[$name]) or ($key = array_search($existing, self::$events[$name])) === false) {
|
||||||
{
|
|
||||||
// Just add the event if there are no events
|
// Just add the event if there are no events
|
||||||
return self::add($name, $callback);
|
return self::add($name, $callback);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Insert the event immediately before the existing event
|
// Insert the event immediately before the existing event
|
||||||
return self::insert_event($name, $key, $callback);
|
return self::insert_event($name, $key, $callback);
|
||||||
}
|
}
|
||||||
@@ -81,13 +81,10 @@ final class Event {
|
|||||||
*/
|
*/
|
||||||
public static function add_after($name, $existing, $callback)
|
public static function add_after($name, $existing, $callback)
|
||||||
{
|
{
|
||||||
if (empty(self::$events[$name]) OR ($key = array_search($existing, self::$events[$name])) === FALSE)
|
if (empty(self::$events[$name]) or ($key = array_search($existing, self::$events[$name])) === false) {
|
||||||
{
|
|
||||||
// Just add the event if there are no events
|
// Just add the event if there are no events
|
||||||
return self::add($name, $callback);
|
return self::add($name, $callback);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Insert the event immediately after the existing event
|
// Insert the event immediately after the existing event
|
||||||
return self::insert_event($name, $key + 1, $callback);
|
return self::insert_event($name, $key + 1, $callback);
|
||||||
}
|
}
|
||||||
@@ -103,12 +100,12 @@ final class Event {
|
|||||||
*/
|
*/
|
||||||
private static function insert_event($name, $key, $callback)
|
private static function insert_event($name, $key, $callback)
|
||||||
{
|
{
|
||||||
if (in_array($callback, self::$events[$name], TRUE))
|
if (in_array($callback, self::$events[$name], true)) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Add the new event at the given key location
|
// Add the new event at the given key location
|
||||||
self::$events[$name] = array_merge
|
self::$events[$name] = array_merge(
|
||||||
(
|
|
||||||
// Events before the key
|
// Events before the key
|
||||||
array_slice(self::$events[$name], 0, $key),
|
array_slice(self::$events[$name], 0, $key),
|
||||||
// New event callback
|
// New event callback
|
||||||
@@ -117,7 +114,7 @@ final class Event {
|
|||||||
array_slice(self::$events[$name], $key)
|
array_slice(self::$events[$name], $key)
|
||||||
);
|
);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,16 +127,14 @@ final class Event {
|
|||||||
*/
|
*/
|
||||||
public static function replace($name, $existing, $callback)
|
public static function replace($name, $existing, $callback)
|
||||||
{
|
{
|
||||||
if (empty(self::$events[$name]) OR ($key = array_search($existing, self::$events[$name], TRUE)) === FALSE)
|
if (empty(self::$events[$name]) or ($key = array_search($existing, self::$events[$name], true)) === false) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! in_array($callback, self::$events[$name], TRUE))
|
if (! in_array($callback, self::$events[$name], true)) {
|
||||||
{
|
|
||||||
// Replace the exisiting event with the new event
|
// Replace the exisiting event with the new event
|
||||||
self::$events[$name][$key] = $callback;
|
self::$events[$name][$key] = $callback;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Remove the existing event from the queue
|
// Remove the existing event from the queue
|
||||||
unset(self::$events[$name][$key]);
|
unset(self::$events[$name][$key]);
|
||||||
|
|
||||||
@@ -147,7 +142,7 @@ final class Event {
|
|||||||
self::$events[$name] = array_values(self::$events[$name]);
|
self::$events[$name] = array_values(self::$events[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -168,21 +163,16 @@ final class Event {
|
|||||||
* @param array specific callback to remove, FALSE for all callbacks
|
* @param array specific callback to remove, FALSE for all callbacks
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function clear($name, $callback = FALSE)
|
public static function clear($name, $callback = false)
|
||||||
{
|
|
||||||
if ($callback === FALSE)
|
|
||||||
{
|
{
|
||||||
|
if ($callback === false) {
|
||||||
self::$events[$name] = array();
|
self::$events[$name] = array();
|
||||||
}
|
} elseif (isset(self::$events[$name])) {
|
||||||
elseif (isset(self::$events[$name]))
|
|
||||||
{
|
|
||||||
// Loop through each of the event callbacks and compare it to the
|
// Loop through each of the event callbacks and compare it to the
|
||||||
// callback requested for removal. The callback is removed if it
|
// callback requested for removal. The callback is removed if it
|
||||||
// matches.
|
// matches.
|
||||||
foreach (self::$events[$name] as $i => $event_callback)
|
foreach (self::$events[$name] as $i => $event_callback) {
|
||||||
{
|
if ($callback === $event_callback) {
|
||||||
if ($callback === $event_callback)
|
|
||||||
{
|
|
||||||
unset(self::$events[$name][$i]);
|
unset(self::$events[$name][$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,16 +186,14 @@ final class Event {
|
|||||||
* @param array data can be processed as Event::$data by the callbacks
|
* @param array data can be processed as Event::$data by the callbacks
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function run($name, & $data = NULL)
|
public static function run($name, &$data = null)
|
||||||
{
|
|
||||||
if ( ! empty(self::$events[$name]))
|
|
||||||
{
|
{
|
||||||
|
if (! empty(self::$events[$name])) {
|
||||||
// So callbacks can access Event::$data
|
// So callbacks can access Event::$data
|
||||||
self::$data =& $data;
|
self::$data =& $data;
|
||||||
$callbacks = self::get($name);
|
$callbacks = self::get($name);
|
||||||
|
|
||||||
foreach ($callbacks as $callback)
|
foreach ($callbacks as $callback) {
|
||||||
{
|
|
||||||
call_user_func($callback);
|
call_user_func($callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,5 +216,5 @@ final class Event {
|
|||||||
{
|
{
|
||||||
return isset(self::$has_run[$name]);
|
return isset(self::$has_run[$name]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End Event
|
// End Event
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
138
lib/kohana/system/core/Security.php
Normal file
138
lib/kohana/system/core/Security.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct script access.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Security helper class.
|
||||||
|
*
|
||||||
|
* @package Kohana
|
||||||
|
* @category Security
|
||||||
|
* @author Kohana Team
|
||||||
|
* @copyright (c) 2007-2012 Kohana Team
|
||||||
|
* @license http://kohanaframework.org/license
|
||||||
|
*/
|
||||||
|
class Security
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var string key name used for token storage
|
||||||
|
*/
|
||||||
|
public static $token_name = 'security_token';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate and store a unique token which can be used to help prevent
|
||||||
|
* [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks.
|
||||||
|
*
|
||||||
|
* $token = Security::token();
|
||||||
|
*
|
||||||
|
* You can insert this token into your forms as a hidden field:
|
||||||
|
*
|
||||||
|
* echo Form::hidden('csrf', Security::token());
|
||||||
|
*
|
||||||
|
* And then check it when using [Validation]:
|
||||||
|
*
|
||||||
|
* $array->rules('csrf', array(
|
||||||
|
* array('not_empty'),
|
||||||
|
* array('Security::check'),
|
||||||
|
* ));
|
||||||
|
*
|
||||||
|
* This provides a basic, but effective, method of preventing CSRF attacks.
|
||||||
|
*
|
||||||
|
* @param boolean $new force a new token to be generated?
|
||||||
|
* @return string
|
||||||
|
* @uses Session::instance
|
||||||
|
*/
|
||||||
|
public static function token($new = false)
|
||||||
|
{
|
||||||
|
$session = Session::instance();
|
||||||
|
|
||||||
|
// Get the current token
|
||||||
|
$token = $session->get(Security::$token_name);
|
||||||
|
|
||||||
|
if ($new === true or ! $token) {
|
||||||
|
// Generate a new unique token
|
||||||
|
if (function_exists('openssl_random_pseudo_bytes')) {
|
||||||
|
// Generate a random pseudo bytes token if openssl_random_pseudo_bytes is available
|
||||||
|
// This is more secure than uniqid, because uniqid relies on microtime, which is predictable
|
||||||
|
$token = base64_encode(openssl_random_pseudo_bytes(32));
|
||||||
|
} else {
|
||||||
|
// Otherwise, fall back to a hashed uniqid
|
||||||
|
$token = sha1(uniqid(null, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the new token
|
||||||
|
$session->set(Security::$token_name, $token);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check that the given token matches the currently stored security token.
|
||||||
|
*
|
||||||
|
* if (Security::check($token))
|
||||||
|
* {
|
||||||
|
* // Pass
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* @param string $token token to check
|
||||||
|
* @return boolean
|
||||||
|
* @uses Security::token
|
||||||
|
*/
|
||||||
|
public static function check($token)
|
||||||
|
{
|
||||||
|
return Security::slow_equals(Security::token(), $token);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare two hashes in a time-invariant manner.
|
||||||
|
* Prevents cryptographic side-channel attacks (timing attacks, specifically)
|
||||||
|
*
|
||||||
|
* @param string $a cryptographic hash
|
||||||
|
* @param string $b cryptographic hash
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public static function slow_equals($a, $b)
|
||||||
|
{
|
||||||
|
$diff = strlen($a) ^ strlen($b);
|
||||||
|
for ($i = 0; $i < strlen($a) and $i < strlen($b); $i++) {
|
||||||
|
$diff |= ord($a[$i]) ^ ord($b[$i]);
|
||||||
|
}
|
||||||
|
return $diff === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated for security reasons.
|
||||||
|
* See https://github.com/kohana/kohana/issues/107
|
||||||
|
*
|
||||||
|
* Remove image tags from a string.
|
||||||
|
*
|
||||||
|
* $str = Security::strip_image_tags($str);
|
||||||
|
*
|
||||||
|
* @deprecated since version 3.3.6
|
||||||
|
* @param string $str string to sanitize
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function strip_image_tags($str)
|
||||||
|
{
|
||||||
|
return preg_replace('#<img\s.*?(?:src\s*=\s*["\']?([^"\'<>\s]*)["\']?[^>]*)?>#is', '$1', $str);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encodes PHP tags in a string.
|
||||||
|
*
|
||||||
|
* $str = Security::encode_php_tags($str);
|
||||||
|
*
|
||||||
|
* @param string $str string to sanitize
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function encode_php_tags($str)
|
||||||
|
{
|
||||||
|
return str_replace(array('<?', '?>'), array('<?', '?>'), $str);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A port of phputf8 to a unified file/class. Checks PHP status to ensure that
|
* A port of phputf8 to a unified file/class. Checks PHP status to ensure that
|
||||||
* UTF-8 support is available and normalize global variables to UTF-8. It also
|
* UTF-8 support is available and normalize global variables to UTF-8. It also
|
||||||
@@ -27,10 +32,8 @@
|
|||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! preg_match('/^.$/u', 'ñ'))
|
if (! preg_match('/^.$/u', 'ñ')) {
|
||||||
{
|
trigger_error(
|
||||||
trigger_error
|
|
||||||
(
|
|
||||||
'<a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support. ' .
|
'<a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support. ' .
|
||||||
'See <a href="http://php.net/manual/reference.pcre.pattern.modifiers.php">PCRE Pattern Modifiers</a> ' .
|
'See <a href="http://php.net/manual/reference.pcre.pattern.modifiers.php">PCRE Pattern Modifiers</a> ' .
|
||||||
'for more information. This application cannot be run without UTF-8 support.',
|
'for more information. This application cannot be run without UTF-8 support.',
|
||||||
@@ -38,10 +41,8 @@ if ( ! preg_match('/^.$/u', 'ñ'))
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! extension_loaded('iconv'))
|
if (! extension_loaded('iconv')) {
|
||||||
{
|
trigger_error(
|
||||||
trigger_error
|
|
||||||
(
|
|
||||||
'The <a href="http://php.net/iconv">iconv</a> extension is not loaded. ' .
|
'The <a href="http://php.net/iconv">iconv</a> extension is not loaded. ' .
|
||||||
'Without iconv, strings cannot be properly translated to UTF-8 from user input. ' .
|
'Without iconv, strings cannot be properly translated to UTF-8 from user input. ' .
|
||||||
'This application cannot be run without UTF-8 support.',
|
'This application cannot be run without UTF-8 support.',
|
||||||
@@ -49,10 +50,8 @@ if ( ! extension_loaded('iconv'))
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extension_loaded('mbstring') AND (ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING))
|
if (extension_loaded('mbstring') and (ini_get('mbstring.func_overload') & 2)) {
|
||||||
{
|
trigger_error(
|
||||||
trigger_error
|
|
||||||
(
|
|
||||||
'The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP\'s native string functions. ' .
|
'The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP\'s native string functions. ' .
|
||||||
'Disable this by setting mbstring.func_overload to 0, 1, 4 or 5 in php.ini or a .htaccess file.' .
|
'Disable this by setting mbstring.func_overload to 0, 1, 4 or 5 in php.ini or a .htaccess file.' .
|
||||||
'This application cannot be run without UTF-8 support.',
|
'This application cannot be run without UTF-8 support.',
|
||||||
@@ -66,14 +65,11 @@ define('PCRE_UNICODE_PROPERTIES', (bool) preg_match('/^\pL$/u', 'ñ'));
|
|||||||
error_reporting($ER);
|
error_reporting($ER);
|
||||||
|
|
||||||
// SERVER_UTF8 ? use mb_* functions : use non-native functions
|
// SERVER_UTF8 ? use mb_* functions : use non-native functions
|
||||||
if (extension_loaded('mbstring'))
|
if (extension_loaded('mbstring')) {
|
||||||
{
|
|
||||||
mb_internal_encoding('UTF-8');
|
mb_internal_encoding('UTF-8');
|
||||||
define('SERVER_UTF8', TRUE);
|
define('SERVER_UTF8', true);
|
||||||
}
|
} else {
|
||||||
else
|
define('SERVER_UTF8', false);
|
||||||
{
|
|
||||||
define('SERVER_UTF8', FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert all global variables to UTF-8.
|
// Convert all global variables to UTF-8.
|
||||||
@@ -82,16 +78,17 @@ $_POST = utf8::clean($_POST);
|
|||||||
$_COOKIE = utf8::clean($_COOKIE);
|
$_COOKIE = utf8::clean($_COOKIE);
|
||||||
$_SERVER = utf8::clean($_SERVER);
|
$_SERVER = utf8::clean($_SERVER);
|
||||||
|
|
||||||
if (PHP_SAPI == 'cli')
|
if (PHP_SAPI == 'cli') {
|
||||||
{
|
|
||||||
// Convert command line arguments
|
// Convert command line arguments
|
||||||
$_SERVER['argv'] = utf8::clean($_SERVER['argv']);
|
$_SERVER['argv'] = utf8::clean($_SERVER['argv']);
|
||||||
}
|
}
|
||||||
|
|
||||||
final class utf8 {
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
||||||
|
final class utf8
|
||||||
|
{
|
||||||
// Called methods
|
// Called methods
|
||||||
static $called = array();
|
private static $called = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively cleans arrays, objects, and strings. Removes ASCII control
|
* Recursively cleans arrays, objects, and strings. Removes ASCII control
|
||||||
@@ -103,21 +100,16 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function clean($str)
|
public static function clean($str)
|
||||||
{
|
{
|
||||||
if (is_array($str) OR is_object($str))
|
if (is_array($str) or is_object($str)) {
|
||||||
{
|
foreach ($str as $key => $val) {
|
||||||
foreach ($str as $key => $val)
|
|
||||||
{
|
|
||||||
// Recursion!
|
// Recursion!
|
||||||
$str[self::clean($key)] = self::clean($val);
|
$str[self::clean($key)] = self::clean($val);
|
||||||
}
|
}
|
||||||
}
|
} elseif (is_string($str) and $str !== '') {
|
||||||
elseif (is_string($str) AND $str !== '')
|
|
||||||
{
|
|
||||||
// Remove control characters
|
// Remove control characters
|
||||||
$str = self::strip_ascii_ctrl($str);
|
$str = self::strip_ascii_ctrl($str);
|
||||||
|
|
||||||
if ( ! self::is_ascii($str))
|
if (! self::is_ascii($str)) {
|
||||||
{
|
|
||||||
// Disable notices
|
// Disable notices
|
||||||
$ER = error_reporting(~E_NOTICE);
|
$ER = error_reporting(~E_NOTICE);
|
||||||
|
|
||||||
@@ -177,12 +169,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function transliterate_to_ascii($str, $case = 0)
|
public static function transliterate_to_ascii($str, $case = 0)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _transliterate_to_ascii($str, $case);
|
return _transliterate_to_ascii($str, $case);
|
||||||
@@ -197,12 +188,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strlen($str)
|
public static function strlen($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strlen($str);
|
return _strlen($str);
|
||||||
@@ -222,12 +212,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strpos($str, $search, $offset = 0)
|
public static function strpos($str, $search, $offset = 0)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strpos($str, $search, $offset);
|
return _strpos($str, $search, $offset);
|
||||||
@@ -247,12 +236,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strrpos($str, $search, $offset = 0)
|
public static function strrpos($str, $search, $offset = 0)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strrpos($str, $search, $offset);
|
return _strrpos($str, $search, $offset);
|
||||||
@@ -269,14 +257,13 @@ final class utf8 {
|
|||||||
* @param integer length limit
|
* @param integer length limit
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function substr($str, $offset, $length = NULL)
|
public static function substr($str, $offset, $length = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _substr($str, $offset, $length);
|
return _substr($str, $offset, $length);
|
||||||
@@ -293,14 +280,13 @@ final class utf8 {
|
|||||||
* @param integer offset
|
* @param integer offset
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function substr_replace($str, $replacement, $offset, $length = NULL)
|
public static function substr_replace($str, $replacement, $offset, $length = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _substr_replace($str, $replacement, $offset, $length);
|
return _substr_replace($str, $replacement, $offset, $length);
|
||||||
@@ -317,12 +303,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strtolower($str)
|
public static function strtolower($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strtolower($str);
|
return _strtolower($str);
|
||||||
@@ -339,12 +324,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strtoupper($str)
|
public static function strtoupper($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strtoupper($str);
|
return _strtoupper($str);
|
||||||
@@ -361,12 +345,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function ucfirst($str)
|
public static function ucfirst($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _ucfirst($str);
|
return _ucfirst($str);
|
||||||
@@ -383,12 +366,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function ucwords($str)
|
public static function ucwords($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _ucwords($str);
|
return _ucwords($str);
|
||||||
@@ -408,12 +390,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strcasecmp($str1, $str2)
|
public static function strcasecmp($str1, $str2)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strcasecmp($str1, $str2);
|
return _strcasecmp($str1, $str2);
|
||||||
@@ -434,14 +415,13 @@ final class utf8 {
|
|||||||
* @return string if the input was a string
|
* @return string if the input was a string
|
||||||
* @return array if the input was an array
|
* @return array if the input was an array
|
||||||
*/
|
*/
|
||||||
public static function str_ireplace($search, $replace, $str, & $count = NULL)
|
public static function str_ireplace($search, $replace, $str, &$count = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _str_ireplace($search, $replace, $str, $count);
|
return _str_ireplace($search, $replace, $str, $count);
|
||||||
@@ -461,12 +441,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function stristr($str, $search)
|
public static function stristr($str, $search)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _stristr($str, $search);
|
return _stristr($str, $search);
|
||||||
@@ -484,14 +463,13 @@ final class utf8 {
|
|||||||
* @param integer length of the string to examine
|
* @param integer length of the string to examine
|
||||||
* @return integer length of the initial segment that contains characters in the mask
|
* @return integer length of the initial segment that contains characters in the mask
|
||||||
*/
|
*/
|
||||||
public static function strspn($str, $mask, $offset = NULL, $length = NULL)
|
public static function strspn($str, $mask, $offset = null, $length = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strspn($str, $mask, $offset, $length);
|
return _strspn($str, $mask, $offset, $length);
|
||||||
@@ -509,14 +487,13 @@ final class utf8 {
|
|||||||
* @param integer length of the string to examine
|
* @param integer length of the string to examine
|
||||||
* @return integer length of the initial segment that contains characters not in the mask
|
* @return integer length of the initial segment that contains characters not in the mask
|
||||||
*/
|
*/
|
||||||
public static function strcspn($str, $mask, $offset = NULL, $length = NULL)
|
public static function strcspn($str, $mask, $offset = null, $length = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strcspn($str, $mask, $offset, $length);
|
return _strcspn($str, $mask, $offset, $length);
|
||||||
@@ -536,12 +513,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)
|
public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _str_pad($str, $final_str_length, $pad_str, $pad_type);
|
return _str_pad($str, $final_str_length, $pad_str, $pad_type);
|
||||||
@@ -559,12 +535,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function str_split($str, $split_length = 1)
|
public static function str_split($str, $split_length = 1)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _str_split($str, $split_length);
|
return _str_split($str, $split_length);
|
||||||
@@ -581,12 +556,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function strrev($str)
|
public static function strrev($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _strrev($str);
|
return _strrev($str);
|
||||||
@@ -603,14 +577,13 @@ final class utf8 {
|
|||||||
* @param string string of characters to remove
|
* @param string string of characters to remove
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function trim($str, $charlist = NULL)
|
public static function trim($str, $charlist = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _trim($str, $charlist);
|
return _trim($str, $charlist);
|
||||||
@@ -626,14 +599,13 @@ final class utf8 {
|
|||||||
* @param string string of characters to remove
|
* @param string string of characters to remove
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function ltrim($str, $charlist = NULL)
|
public static function ltrim($str, $charlist = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _ltrim($str, $charlist);
|
return _ltrim($str, $charlist);
|
||||||
@@ -649,14 +621,13 @@ final class utf8 {
|
|||||||
* @param string string of characters to remove
|
* @param string string of characters to remove
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function rtrim($str, $charlist = NULL)
|
public static function rtrim($str, $charlist = null)
|
||||||
{
|
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
|
||||||
{
|
{
|
||||||
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _rtrim($str, $charlist);
|
return _rtrim($str, $charlist);
|
||||||
@@ -673,12 +644,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function ord($chr)
|
public static function ord($chr)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _ord($chr);
|
return _ord($chr);
|
||||||
@@ -701,12 +671,11 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function to_unicode($str)
|
public static function to_unicode($str)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _to_unicode($str);
|
return _to_unicode($str);
|
||||||
@@ -729,15 +698,14 @@ final class utf8 {
|
|||||||
*/
|
*/
|
||||||
public static function from_unicode($arr)
|
public static function from_unicode($arr)
|
||||||
{
|
{
|
||||||
if ( ! isset(self::$called[__FUNCTION__]))
|
if (! isset(self::$called[__FUNCTION__])) {
|
||||||
{
|
|
||||||
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
require SYSPATH . 'core/utf8/' . __FUNCTION__ . EXT;
|
||||||
|
|
||||||
// Function has been called
|
// Function has been called
|
||||||
self::$called[__FUNCTION__] = TRUE;
|
self::$called[__FUNCTION__] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _from_unicode($arr);
|
return _from_unicode($arr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End utf8
|
// End utf8
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* utf8::from_unicode
|
* utf8::from_unicode
|
||||||
*
|
*
|
||||||
@@ -14,51 +19,37 @@ function _from_unicode($arr)
|
|||||||
|
|
||||||
$keys = array_keys($arr);
|
$keys = array_keys($arr);
|
||||||
|
|
||||||
foreach ($keys as $k)
|
foreach ($keys as $k) {
|
||||||
{
|
|
||||||
// ASCII range (including control chars)
|
// ASCII range (including control chars)
|
||||||
if (($arr[$k] >= 0) AND ($arr[$k] <= 0x007f))
|
if (($arr[$k] >= 0) and ($arr[$k] <= 0x007f)) {
|
||||||
{
|
|
||||||
echo chr($arr[$k]);
|
echo chr($arr[$k]);
|
||||||
}
|
} elseif ($arr[$k] <= 0x07ff) {
|
||||||
// 2 byte sequence
|
// 2 byte sequence
|
||||||
elseif ($arr[$k] <= 0x07ff)
|
|
||||||
{
|
|
||||||
echo chr(0xc0 | ($arr[$k] >> 6));
|
echo chr(0xc0 | ($arr[$k] >> 6));
|
||||||
echo chr(0x80 | ($arr[$k] & 0x003f));
|
echo chr(0x80 | ($arr[$k] & 0x003f));
|
||||||
}
|
} elseif ($arr[$k] == 0xFEFF) {
|
||||||
// Byte order mark (skip)
|
// Byte order mark (skip)
|
||||||
elseif ($arr[$k] == 0xFEFF)
|
|
||||||
{
|
|
||||||
// nop -- zap the BOM
|
// nop -- zap the BOM
|
||||||
}
|
} elseif ($arr[$k] >= 0xD800 and $arr[$k] <= 0xDFFF) {
|
||||||
// Test for illegal surrogates
|
// Test for illegal surrogates
|
||||||
elseif ($arr[$k] >= 0xD800 AND $arr[$k] <= 0xDFFF)
|
|
||||||
{
|
|
||||||
// Found a surrogate
|
// Found a surrogate
|
||||||
trigger_error('utf8::from_unicode: Illegal surrogate at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);
|
trigger_error('utf8::from_unicode: Illegal surrogate at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
} elseif ($arr[$k] <= 0xffff) {
|
||||||
// 3 byte sequence
|
// 3 byte sequence
|
||||||
elseif ($arr[$k] <= 0xffff)
|
|
||||||
{
|
|
||||||
echo chr(0xe0 | ($arr[$k] >> 12));
|
echo chr(0xe0 | ($arr[$k] >> 12));
|
||||||
echo chr(0x80 | (($arr[$k] >> 6) & 0x003f));
|
echo chr(0x80 | (($arr[$k] >> 6) & 0x003f));
|
||||||
echo chr(0x80 | ($arr[$k] & 0x003f));
|
echo chr(0x80 | ($arr[$k] & 0x003f));
|
||||||
}
|
} elseif ($arr[$k] <= 0x10ffff) {
|
||||||
// 4 byte sequence
|
// 4 byte sequence
|
||||||
elseif ($arr[$k] <= 0x10ffff)
|
|
||||||
{
|
|
||||||
echo chr(0xf0 | ($arr[$k] >> 18));
|
echo chr(0xf0 | ($arr[$k] >> 18));
|
||||||
echo chr(0x80 | (($arr[$k] >> 12) & 0x3f));
|
echo chr(0x80 | (($arr[$k] >> 12) & 0x3f));
|
||||||
echo chr(0x80 | (($arr[$k] >> 6) & 0x3f));
|
echo chr(0x80 | (($arr[$k] >> 6) & 0x3f));
|
||||||
echo chr(0x80 | ($arr[$k] & 0x3f));
|
echo chr(0x80 | ($arr[$k] & 0x3f));
|
||||||
}
|
} else {
|
||||||
// Out of range
|
// Out of range
|
||||||
else
|
|
||||||
{
|
|
||||||
trigger_error('utf8::from_unicode: Codepoint out of Unicode range at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);
|
trigger_error('utf8::from_unicode: Codepoint out of Unicode range at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::ltrim
|
* utf8::ltrim
|
||||||
*
|
*
|
||||||
@@ -8,13 +12,15 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _ltrim($str, $charlist = NULL)
|
function _ltrim($str, $charlist = null)
|
||||||
{
|
{
|
||||||
if ($charlist === NULL)
|
if ($charlist === null) {
|
||||||
return ltrim($str);
|
return ltrim($str);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($charlist))
|
if (utf8::is_ascii($charlist)) {
|
||||||
return ltrim($str, $charlist);
|
return ltrim($str, $charlist);
|
||||||
|
}
|
||||||
|
|
||||||
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
|
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::ord
|
* utf8::ord
|
||||||
*
|
*
|
||||||
@@ -12,77 +16,65 @@ function _ord($chr)
|
|||||||
{
|
{
|
||||||
$ord0 = ord($chr);
|
$ord0 = ord($chr);
|
||||||
|
|
||||||
if ($ord0 >= 0 AND $ord0 <= 127)
|
if ($ord0 >= 0 and $ord0 <= 127) {
|
||||||
{
|
|
||||||
return $ord0;
|
return $ord0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset($chr[1]))
|
if (! isset($chr[1])) {
|
||||||
{
|
|
||||||
trigger_error('Short sequence - at least 2 bytes expected, only 1 seen', E_USER_WARNING);
|
trigger_error('Short sequence - at least 2 bytes expected, only 1 seen', E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ord1 = ord($chr[1]);
|
$ord1 = ord($chr[1]);
|
||||||
|
|
||||||
if ($ord0 >= 192 AND $ord0 <= 223)
|
if ($ord0 >= 192 and $ord0 <= 223) {
|
||||||
{
|
|
||||||
return ($ord0 - 192) * 64 + ($ord1 - 128);
|
return ($ord0 - 192) * 64 + ($ord1 - 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset($chr[2]))
|
if (! isset($chr[2])) {
|
||||||
{
|
|
||||||
trigger_error('Short sequence - at least 3 bytes expected, only 2 seen', E_USER_WARNING);
|
trigger_error('Short sequence - at least 3 bytes expected, only 2 seen', E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ord2 = ord($chr[2]);
|
$ord2 = ord($chr[2]);
|
||||||
|
|
||||||
if ($ord0 >= 224 AND $ord0 <= 239)
|
if ($ord0 >= 224 and $ord0 <= 239) {
|
||||||
{
|
|
||||||
return ($ord0 - 224) * 4096 + ($ord1 - 128) * 64 + ($ord2 - 128);
|
return ($ord0 - 224) * 4096 + ($ord1 - 128) * 64 + ($ord2 - 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset($chr[3]))
|
if (! isset($chr[3])) {
|
||||||
{
|
|
||||||
trigger_error('Short sequence - at least 4 bytes expected, only 3 seen', E_USER_WARNING);
|
trigger_error('Short sequence - at least 4 bytes expected, only 3 seen', E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ord3 = ord($chr[3]);
|
$ord3 = ord($chr[3]);
|
||||||
|
|
||||||
if ($ord0 >= 240 AND $ord0 <= 247)
|
if ($ord0 >= 240 and $ord0 <= 247) {
|
||||||
{
|
|
||||||
return ($ord0 - 240) * 262144 + ($ord1 - 128) * 4096 + ($ord2 - 128) * 64 + ($ord3 - 128);
|
return ($ord0 - 240) * 262144 + ($ord1 - 128) * 4096 + ($ord2 - 128) * 64 + ($ord3 - 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset($chr[4]))
|
if (! isset($chr[4])) {
|
||||||
{
|
|
||||||
trigger_error('Short sequence - at least 5 bytes expected, only 4 seen', E_USER_WARNING);
|
trigger_error('Short sequence - at least 5 bytes expected, only 4 seen', E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ord4 = ord($chr[4]);
|
$ord4 = ord($chr[4]);
|
||||||
|
|
||||||
if ($ord0 >= 248 AND $ord0 <= 251)
|
if ($ord0 >= 248 and $ord0 <= 251) {
|
||||||
{
|
|
||||||
return ($ord0 - 248) * 16777216 + ($ord1 - 128) * 262144 + ($ord2 - 128) * 4096 + ($ord3 - 128) * 64 + ($ord4 - 128);
|
return ($ord0 - 248) * 16777216 + ($ord1 - 128) * 262144 + ($ord2 - 128) * 4096 + ($ord3 - 128) * 64 + ($ord4 - 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset($chr[5]))
|
if (! isset($chr[5])) {
|
||||||
{
|
|
||||||
trigger_error('Short sequence - at least 6 bytes expected, only 5 seen', E_USER_WARNING);
|
trigger_error('Short sequence - at least 6 bytes expected, only 5 seen', E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ord0 >= 252 AND $ord0 <= 253)
|
if ($ord0 >= 252 and $ord0 <= 253) {
|
||||||
{
|
|
||||||
return ($ord0 - 252) * 1073741824 + ($ord1 - 128) * 16777216 + ($ord2 - 128) * 262144 + ($ord3 - 128) * 4096 + ($ord4 - 128) * 64 + (ord($chr[5]) - 128);
|
return ($ord0 - 252) * 1073741824 + ($ord1 - 128) * 16777216 + ($ord2 - 128) * 262144 + ($ord3 - 128) * 4096 + ($ord4 - 128) * 64 + (ord($chr[5]) - 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ord0 >= 254 AND $ord0 <= 255)
|
if ($ord0 >= 254 and $ord0 <= 255) {
|
||||||
{
|
|
||||||
trigger_error('Invalid UTF-8 with surrogate ordinal ' . $ord0, E_USER_WARNING);
|
trigger_error('Invalid UTF-8 with surrogate ordinal ' . $ord0, E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::rtrim
|
* utf8::rtrim
|
||||||
*
|
*
|
||||||
@@ -8,13 +12,15 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _rtrim($str, $charlist = NULL)
|
function _rtrim($str, $charlist = null)
|
||||||
{
|
{
|
||||||
if ($charlist === NULL)
|
if ($charlist === null) {
|
||||||
return rtrim($str);
|
return rtrim($str);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($charlist))
|
if (utf8::is_ascii($charlist)) {
|
||||||
return rtrim($str, $charlist);
|
return rtrim($str, $charlist);
|
||||||
|
}
|
||||||
|
|
||||||
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
|
$charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::str_ireplace
|
* utf8::str_ireplace
|
||||||
*
|
*
|
||||||
@@ -8,39 +12,30 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _str_ireplace($search, $replace, $str, & $count = NULL)
|
function _str_ireplace($search, $replace, $str, &$count = null)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($search) AND utf8::is_ascii($replace) AND utf8::is_ascii($str))
|
if (utf8::is_ascii($search) and utf8::is_ascii($replace) and utf8::is_ascii($str)) {
|
||||||
return str_ireplace($search, $replace, $str, $count);
|
return str_ireplace($search, $replace, $str, $count);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($str))
|
if (is_array($str)) {
|
||||||
{
|
foreach ($str as $key => $val) {
|
||||||
foreach ($str as $key => $val)
|
|
||||||
{
|
|
||||||
$str[$key] = utf8::str_ireplace($search, $replace, $val, $count);
|
$str[$key] = utf8::str_ireplace($search, $replace, $val, $count);
|
||||||
}
|
}
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($search))
|
if (is_array($search)) {
|
||||||
{
|
|
||||||
$keys = array_keys($search);
|
$keys = array_keys($search);
|
||||||
|
|
||||||
foreach ($keys as $k)
|
foreach ($keys as $k) {
|
||||||
{
|
if (is_array($replace)) {
|
||||||
if (is_array($replace))
|
if (array_key_exists($k, $replace)) {
|
||||||
{
|
|
||||||
if (array_key_exists($k, $replace))
|
|
||||||
{
|
|
||||||
$str = utf8::str_ireplace($search[$k], $replace[$k], $str, $count);
|
$str = utf8::str_ireplace($search[$k], $replace[$k], $str, $count);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$str = utf8::str_ireplace($search[$k], '', $str, $count);
|
$str = utf8::str_ireplace($search[$k], '', $str, $count);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$str = utf8::str_ireplace($search[$k], $replace, $str, $count);
|
$str = utf8::str_ireplace($search[$k], $replace, $str, $count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,8 +48,7 @@ function _str_ireplace($search, $replace, $str, & $count = NULL)
|
|||||||
$total_matched_strlen = 0;
|
$total_matched_strlen = 0;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while (preg_match('/(.*?)'.preg_quote($search, '/').'/s', $str_lower, $matches))
|
while (preg_match('/(.*?)' . preg_quote($search, '/') . '/s', $str_lower, $matches)) {
|
||||||
{
|
|
||||||
$matched_strlen = strlen($matches[0]);
|
$matched_strlen = strlen($matches[0]);
|
||||||
$str_lower = substr($str_lower, $matched_strlen);
|
$str_lower = substr($str_lower, $matched_strlen);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::str_pad
|
* utf8::str_pad
|
||||||
*
|
*
|
||||||
@@ -10,35 +14,30 @@
|
|||||||
*/
|
*/
|
||||||
function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)
|
function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($pad_str))
|
if (utf8::is_ascii($str) and utf8::is_ascii($pad_str)) {
|
||||||
{
|
|
||||||
return str_pad($str, $final_str_length, $pad_str, $pad_type);
|
return str_pad($str, $final_str_length, $pad_str, $pad_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
$str_length = utf8::strlen($str);
|
$str_length = utf8::strlen($str);
|
||||||
|
|
||||||
if ($final_str_length <= 0 OR $final_str_length <= $str_length)
|
if ($final_str_length <= 0 or $final_str_length <= $str_length) {
|
||||||
{
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pad_str_length = utf8::strlen($pad_str);
|
$pad_str_length = utf8::strlen($pad_str);
|
||||||
$pad_length = $final_str_length - $str_length;
|
$pad_length = $final_str_length - $str_length;
|
||||||
|
|
||||||
if ($pad_type == STR_PAD_RIGHT)
|
if ($pad_type == STR_PAD_RIGHT) {
|
||||||
{
|
|
||||||
$repeat = ceil($pad_length / $pad_str_length);
|
$repeat = ceil($pad_length / $pad_str_length);
|
||||||
return utf8::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);
|
return utf8::substr($str . str_repeat($pad_str, $repeat), 0, $final_str_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pad_type == STR_PAD_LEFT)
|
if ($pad_type == STR_PAD_LEFT) {
|
||||||
{
|
|
||||||
$repeat = ceil($pad_length / $pad_str_length);
|
$repeat = ceil($pad_length / $pad_str_length);
|
||||||
return utf8::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;
|
return utf8::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)) . $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pad_type == STR_PAD_BOTH)
|
if ($pad_type == STR_PAD_BOTH) {
|
||||||
{
|
|
||||||
$pad_length /= 2;
|
$pad_length /= 2;
|
||||||
$pad_length_left = floor($pad_length);
|
$pad_length_left = floor($pad_length);
|
||||||
$pad_length_right = ceil($pad_length);
|
$pad_length_right = ceil($pad_length);
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::str_split
|
* utf8::str_split
|
||||||
*
|
*
|
||||||
@@ -12,18 +16,15 @@ function _str_split($str, $split_length = 1)
|
|||||||
{
|
{
|
||||||
$split_length = (int) $split_length;
|
$split_length = (int) $split_length;
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
{
|
|
||||||
return str_split($str, $split_length);
|
return str_split($str, $split_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($split_length < 1)
|
if ($split_length < 1) {
|
||||||
{
|
return false;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (utf8::strlen($str) <= $split_length)
|
if (utf8::strlen($str) <= $split_length) {
|
||||||
{
|
|
||||||
return array($str);
|
return array($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strcasecmp
|
* utf8::strcasecmp
|
||||||
*
|
*
|
||||||
@@ -10,8 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
function _strcasecmp($str1, $str2)
|
function _strcasecmp($str1, $str2)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str1) AND utf8::is_ascii($str2))
|
if (utf8::is_ascii($str1) and utf8::is_ascii($str2)) {
|
||||||
return strcasecmp($str1, $str2);
|
return strcasecmp($str1, $str2);
|
||||||
|
}
|
||||||
|
|
||||||
$str1 = utf8::strtolower($str1);
|
$str1 = utf8::strtolower($str1);
|
||||||
$str2 = utf8::strtolower($str2);
|
$str2 = utf8::strtolower($str2);
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strcspn
|
* utf8::strcspn
|
||||||
*
|
*
|
||||||
@@ -8,16 +12,17 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _strcspn($str, $mask, $offset = NULL, $length = NULL)
|
function _strcspn($str, $mask, $offset = null, $length = null)
|
||||||
{
|
{
|
||||||
if ($str == '' OR $mask == '')
|
if ($str == '' or $mask == '') {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($mask))
|
if (utf8::is_ascii($str) and utf8::is_ascii($mask)) {
|
||||||
return ($offset === NULL) ? strcspn($str, $mask) : (($length === NULL) ? strcspn($str, $mask, $offset) : strcspn($str, $mask, $offset, $length));
|
return ($offset === null) ? strcspn($str, $mask) : (($length === null) ? strcspn($str, $mask, $offset) : strcspn($str, $mask, $offset, $length));
|
||||||
|
}
|
||||||
|
|
||||||
if ($str !== NULL OR $length !== NULL)
|
if ($str !== null or $length !== null) {
|
||||||
{
|
|
||||||
$str = utf8::substr($str, $offset, $length);
|
$str = utf8::substr($str, $offset, $length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::stristr
|
* utf8::stristr
|
||||||
*
|
*
|
||||||
@@ -10,19 +14,22 @@
|
|||||||
*/
|
*/
|
||||||
function _stristr($str, $search)
|
function _stristr($str, $search)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($search))
|
if (utf8::is_ascii($str) and utf8::is_ascii($search)) {
|
||||||
return stristr($str, $search);
|
return stristr($str, $search);
|
||||||
|
}
|
||||||
|
|
||||||
if ($search == '')
|
if ($search == '') {
|
||||||
return $str;
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
$str_lower = utf8::strtolower($str);
|
$str_lower = utf8::strtolower($str);
|
||||||
$search_lower = utf8::strtolower($search);
|
$search_lower = utf8::strtolower($search);
|
||||||
|
|
||||||
preg_match('/^(.*?)' . preg_quote($search, '/') . '/s', $str_lower, $matches);
|
preg_match('/^(.*?)' . preg_quote($search, '/') . '/s', $str_lower, $matches);
|
||||||
|
|
||||||
if (isset($matches[1]))
|
if (isset($matches[1])) {
|
||||||
return substr($str, strlen($matches[1]));
|
return substr($str, strlen($matches[1]));
|
||||||
|
}
|
||||||
return FALSE;
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strlen
|
* utf8::strlen
|
||||||
*
|
*
|
||||||
@@ -11,11 +15,13 @@
|
|||||||
function _strlen($str)
|
function _strlen($str)
|
||||||
{
|
{
|
||||||
// Try mb_strlen() first because it's faster than combination of is_ascii() and strlen()
|
// Try mb_strlen() first because it's faster than combination of is_ascii() and strlen()
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_strlen($str);
|
return mb_strlen($str);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return strlen($str);
|
return strlen($str);
|
||||||
|
}
|
||||||
|
|
||||||
return strlen(utf8_decode($str));
|
return strlen(utf8_decode($str));
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strpos
|
* utf8::strpos
|
||||||
*
|
*
|
||||||
@@ -12,19 +16,20 @@ function _strpos($str, $search, $offset = 0)
|
|||||||
{
|
{
|
||||||
$offset = (int) $offset;
|
$offset = (int) $offset;
|
||||||
|
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_strpos($str, $search, $offset);
|
return mb_strpos($str, $search, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($search))
|
if (utf8::is_ascii($str) and utf8::is_ascii($search)) {
|
||||||
return strpos($str, $search, $offset);
|
return strpos($str, $search, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
if ($offset == 0)
|
if ($offset == 0) {
|
||||||
{
|
|
||||||
$array = explode($search, $str, 2);
|
$array = explode($search, $str, 2);
|
||||||
return isset($array[1]) ? utf8::strlen($array[0]) : FALSE;
|
return isset($array[1]) ? utf8::strlen($array[0]) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = utf8::substr($str, $offset);
|
$str = utf8::substr($str, $offset);
|
||||||
$pos = utf8::strpos($str, $search);
|
$pos = utf8::strpos($str, $search);
|
||||||
return ($pos === FALSE) ? FALSE : $pos + $offset;
|
return ($pos === false) ? false : $pos + $offset;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strrev
|
* utf8::strrev
|
||||||
*
|
*
|
||||||
@@ -10,8 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
function _strrev($str)
|
function _strrev($str)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return strrev($str);
|
return strrev($str);
|
||||||
|
}
|
||||||
|
|
||||||
preg_match_all('/./us', $str, $matches);
|
preg_match_all('/./us', $str, $matches);
|
||||||
return implode('', array_reverse($matches[0]));
|
return implode('', array_reverse($matches[0]));
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strrpos
|
* utf8::strrpos
|
||||||
*
|
*
|
||||||
@@ -12,19 +16,20 @@ function _strrpos($str, $search, $offset = 0)
|
|||||||
{
|
{
|
||||||
$offset = (int) $offset;
|
$offset = (int) $offset;
|
||||||
|
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_strrpos($str, $search, $offset);
|
return mb_strrpos($str, $search, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($search))
|
if (utf8::is_ascii($str) and utf8::is_ascii($search)) {
|
||||||
return strrpos($str, $search, $offset);
|
return strrpos($str, $search, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
if ($offset == 0)
|
if ($offset == 0) {
|
||||||
{
|
|
||||||
$array = explode($search, $str, -1);
|
$array = explode($search, $str, -1);
|
||||||
return isset($array[0]) ? utf8::strlen(implode($search, $array)) : FALSE;
|
return isset($array[0]) ? utf8::strlen(implode($search, $array)) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$str = utf8::substr($str, $offset);
|
$str = utf8::substr($str, $offset);
|
||||||
$pos = utf8::strrpos($str, $search);
|
$pos = utf8::strrpos($str, $search);
|
||||||
return ($pos === FALSE) ? FALSE : $pos + $offset;
|
return ($pos === false) ? false : $pos + $offset;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strspn
|
* utf8::strspn
|
||||||
*
|
*
|
||||||
@@ -8,16 +12,17 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _strspn($str, $mask, $offset = NULL, $length = NULL)
|
function _strspn($str, $mask, $offset = null, $length = null)
|
||||||
{
|
{
|
||||||
if ($str == '' OR $mask == '')
|
if ($str == '' or $mask == '') {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str) AND utf8::is_ascii($mask))
|
if (utf8::is_ascii($str) and utf8::is_ascii($mask)) {
|
||||||
return ($offset === NULL) ? strspn($str, $mask) : (($length === NULL) ? strspn($str, $mask, $offset) : strspn($str, $mask, $offset, $length));
|
return ($offset === null) ? strspn($str, $mask) : (($length === null) ? strspn($str, $mask, $offset) : strspn($str, $mask, $offset, $length));
|
||||||
|
}
|
||||||
|
|
||||||
if ($offset !== NULL OR $length !== NULL)
|
if ($offset !== null or $length !== null) {
|
||||||
{
|
|
||||||
$str = utf8::substr($str, $offset, $length);
|
$str = utf8::substr($str, $offset, $length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strtolower
|
* utf8::strtolower
|
||||||
*
|
*
|
||||||
@@ -10,16 +14,17 @@
|
|||||||
*/
|
*/
|
||||||
function _strtolower($str)
|
function _strtolower($str)
|
||||||
{
|
{
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_strtolower($str);
|
return mb_strtolower($str);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return strtolower($str);
|
return strtolower($str);
|
||||||
|
}
|
||||||
|
|
||||||
static $UTF8_UPPER_TO_LOWER = NULL;
|
static $UTF8_UPPER_TO_LOWER = null;
|
||||||
|
|
||||||
if ($UTF8_UPPER_TO_LOWER === NULL)
|
if ($UTF8_UPPER_TO_LOWER === null) {
|
||||||
{
|
|
||||||
$UTF8_UPPER_TO_LOWER = array(
|
$UTF8_UPPER_TO_LOWER = array(
|
||||||
0x0041 => 0x0061, 0x03A6 => 0x03C6, 0x0162 => 0x0163, 0x00C5 => 0x00E5, 0x0042 => 0x0062,
|
0x0041 => 0x0061, 0x03A6 => 0x03C6, 0x0162 => 0x0163, 0x00C5 => 0x00E5, 0x0042 => 0x0062,
|
||||||
0x0139 => 0x013A, 0x00C1 => 0x00E1, 0x0141 => 0x0142, 0x038E => 0x03CD, 0x0100 => 0x0101,
|
0x0139 => 0x013A, 0x00C1 => 0x00E1, 0x0141 => 0x0142, 0x038E => 0x03CD, 0x0100 => 0x0101,
|
||||||
@@ -69,13 +74,12 @@ function _strtolower($str)
|
|||||||
|
|
||||||
$uni = utf8::to_unicode($str);
|
$uni = utf8::to_unicode($str);
|
||||||
|
|
||||||
if ($uni === FALSE)
|
if ($uni === false) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for ($i = 0, $c = count($uni); $i < $c; $i++)
|
for ($i = 0, $c = count($uni); $i < $c; $i++) {
|
||||||
{
|
if (isset($UTF8_UPPER_TO_LOWER[$uni[$i]])) {
|
||||||
if (isset($UTF8_UPPER_TO_LOWER[$uni[$i]]))
|
|
||||||
{
|
|
||||||
$uni[$i] = $UTF8_UPPER_TO_LOWER[$uni[$i]];
|
$uni[$i] = $UTF8_UPPER_TO_LOWER[$uni[$i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::strtoupper
|
* utf8::strtoupper
|
||||||
*
|
*
|
||||||
@@ -10,16 +14,17 @@
|
|||||||
*/
|
*/
|
||||||
function _strtoupper($str)
|
function _strtoupper($str)
|
||||||
{
|
{
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_strtoupper($str);
|
return mb_strtoupper($str);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return strtoupper($str);
|
return strtoupper($str);
|
||||||
|
}
|
||||||
|
|
||||||
static $UTF8_LOWER_TO_UPPER = NULL;
|
static $UTF8_LOWER_TO_UPPER = null;
|
||||||
|
|
||||||
if ($UTF8_LOWER_TO_UPPER === NULL)
|
if ($UTF8_LOWER_TO_UPPER === null) {
|
||||||
{
|
|
||||||
$UTF8_LOWER_TO_UPPER = array(
|
$UTF8_LOWER_TO_UPPER = array(
|
||||||
0x0061 => 0x0041, 0x03C6 => 0x03A6, 0x0163 => 0x0162, 0x00E5 => 0x00C5, 0x0062 => 0x0042,
|
0x0061 => 0x0041, 0x03C6 => 0x03A6, 0x0163 => 0x0162, 0x00E5 => 0x00C5, 0x0062 => 0x0042,
|
||||||
0x013A => 0x0139, 0x00E1 => 0x00C1, 0x0142 => 0x0141, 0x03CD => 0x038E, 0x0101 => 0x0100,
|
0x013A => 0x0139, 0x00E1 => 0x00C1, 0x0142 => 0x0141, 0x03CD => 0x038E, 0x0101 => 0x0100,
|
||||||
@@ -69,13 +74,12 @@ function _strtoupper($str)
|
|||||||
|
|
||||||
$uni = utf8::to_unicode($str);
|
$uni = utf8::to_unicode($str);
|
||||||
|
|
||||||
if ($uni === FALSE)
|
if ($uni === false) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for ($i = 0, $c = count($uni); $i < $c; $i++)
|
for ($i = 0, $c = count($uni); $i < $c; $i++) {
|
||||||
{
|
if (isset($UTF8_LOWER_TO_UPPER[$uni[$i]])) {
|
||||||
if (isset($UTF8_LOWER_TO_UPPER[$uni[$i]]))
|
|
||||||
{
|
|
||||||
$uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]];
|
$uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::substr
|
* utf8::substr
|
||||||
*
|
*
|
||||||
@@ -8,34 +12,37 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _substr($str, $offset, $length = NULL)
|
function _substr($str, $offset, $length = null)
|
||||||
{
|
{
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return ($length === NULL) ? mb_substr($str, $offset) : mb_substr($str, $offset, $length);
|
return ($length === null) ? mb_substr($str, $offset) : mb_substr($str, $offset, $length);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return ($length === NULL) ? substr($str, $offset) : substr($str, $offset, $length);
|
return ($length === null) ? substr($str, $offset) : substr($str, $offset, $length);
|
||||||
|
}
|
||||||
|
|
||||||
// Normalize params
|
// Normalize params
|
||||||
$str = (string) $str;
|
$str = (string) $str;
|
||||||
$strlen = utf8::strlen($str);
|
$strlen = utf8::strlen($str);
|
||||||
$offset = (int) ($offset < 0) ? max(0, $strlen + $offset) : $offset; // Normalize to positive offset
|
$offset = (int) ($offset < 0) ? max(0, $strlen + $offset) : $offset; // Normalize to positive offset
|
||||||
$length = ($length === NULL) ? NULL : (int) $length;
|
$length = ($length === null) ? null : (int) $length;
|
||||||
|
|
||||||
// Impossible
|
// Impossible
|
||||||
if ($length === 0 OR $offset >= $strlen OR ($length < 0 AND $length <= $offset - $strlen))
|
if ($length === 0 or $offset >= $strlen or ($length < 0 and $length <= $offset - $strlen)) {
|
||||||
return '';
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
// Whole string
|
// Whole string
|
||||||
if ($offset == 0 AND ($length === NULL OR $length >= $strlen))
|
if ($offset == 0 and ($length === null or $length >= $strlen)) {
|
||||||
return $str;
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
// Build regex
|
// Build regex
|
||||||
$regex = '^';
|
$regex = '^';
|
||||||
|
|
||||||
// Create an offset expression
|
// Create an offset expression
|
||||||
if ($offset > 0)
|
if ($offset > 0) {
|
||||||
{
|
|
||||||
// PCRE repeating quantifiers must be less than 65536, so repeat when necessary
|
// PCRE repeating quantifiers must be less than 65536, so repeat when necessary
|
||||||
$x = (int) ($offset / 65535);
|
$x = (int) ($offset / 65535);
|
||||||
$y = (int) ($offset % 65535);
|
$y = (int) ($offset % 65535);
|
||||||
@@ -44,13 +51,10 @@ function _substr($str, $offset, $length = NULL)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a length expression
|
// Create a length expression
|
||||||
if ($length === NULL)
|
if ($length === null) {
|
||||||
{
|
|
||||||
$regex .= '(.*)'; // No length set, grab it all
|
$regex .= '(.*)'; // No length set, grab it all
|
||||||
}
|
} elseif ($length > 0) {
|
||||||
// Find length from the left (positive length)
|
// Find length from the left (positive length)
|
||||||
elseif ($length > 0)
|
|
||||||
{
|
|
||||||
// Reduce length so that it can't go beyond the end of the string
|
// Reduce length so that it can't go beyond the end of the string
|
||||||
$length = min($strlen - $offset, $length);
|
$length = min($strlen - $offset, $length);
|
||||||
|
|
||||||
@@ -59,10 +63,8 @@ function _substr($str, $offset, $length = NULL)
|
|||||||
$regex .= '(';
|
$regex .= '(';
|
||||||
$regex .= ($x == 0) ? '' : '(?:.{65535}){' . $x . '}';
|
$regex .= ($x == 0) ? '' : '(?:.{65535}){' . $x . '}';
|
||||||
$regex .= '.{' . $y . '})';
|
$regex .= '.{' . $y . '})';
|
||||||
}
|
} else {
|
||||||
// Find length from the right (negative length)
|
// Find length from the right (negative length)
|
||||||
else
|
|
||||||
{
|
|
||||||
$x = (int) (-$length / 65535);
|
$x = (int) (-$length / 65535);
|
||||||
$y = (int) (-$length % 65535);
|
$y = (int) (-$length % 65535);
|
||||||
$regex .= '(.*)';
|
$regex .= '(.*)';
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::substr_replace
|
* utf8::substr_replace
|
||||||
*
|
*
|
||||||
@@ -8,12 +12,13 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _substr_replace($str, $replacement, $offset, $length = NULL)
|
function _substr_replace($str, $replacement, $offset, $length = null)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return ($length === NULL) ? substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length);
|
return ($length === null) ? substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length);
|
||||||
|
}
|
||||||
|
|
||||||
$length = ($length === NULL) ? utf8::strlen($str) : (int) $length;
|
$length = ($length === null) ? utf8::strlen($str) : (int) $length;
|
||||||
preg_match_all('/./us', $str, $str_array);
|
preg_match_all('/./us', $str, $str_array);
|
||||||
preg_match_all('/./us', $replacement, $replacement_array);
|
preg_match_all('/./us', $replacement, $replacement_array);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::to_unicode
|
* utf8::to_unicode
|
||||||
*
|
*
|
||||||
@@ -18,46 +22,35 @@ function _to_unicode($str)
|
|||||||
|
|
||||||
$len = strlen($str);
|
$len = strlen($str);
|
||||||
|
|
||||||
for ($i = 0; $i < $len; $i++)
|
for ($i = 0; $i < $len; $i++) {
|
||||||
{
|
|
||||||
$in = ord($str[$i]);
|
$in = ord($str[$i]);
|
||||||
|
|
||||||
if ($mState == 0)
|
if ($mState == 0) {
|
||||||
{
|
|
||||||
// When mState is zero we expect either a US-ASCII character or a
|
// When mState is zero we expect either a US-ASCII character or a
|
||||||
// multi-octet sequence.
|
// multi-octet sequence.
|
||||||
if (0 == (0x80 & $in))
|
if (0 == (0x80 & $in)) {
|
||||||
{
|
|
||||||
// US-ASCII, pass straight through.
|
// US-ASCII, pass straight through.
|
||||||
$out[] = $in;
|
$out[] = $in;
|
||||||
$mBytes = 1;
|
$mBytes = 1;
|
||||||
}
|
} elseif (0xC0 == (0xE0 & $in)) {
|
||||||
elseif (0xC0 == (0xE0 & $in))
|
|
||||||
{
|
|
||||||
// First octet of 2 octet sequence
|
// First octet of 2 octet sequence
|
||||||
$mUcs4 = $in;
|
$mUcs4 = $in;
|
||||||
$mUcs4 = ($mUcs4 & 0x1F) << 6;
|
$mUcs4 = ($mUcs4 & 0x1F) << 6;
|
||||||
$mState = 1;
|
$mState = 1;
|
||||||
$mBytes = 2;
|
$mBytes = 2;
|
||||||
}
|
} elseif (0xE0 == (0xF0 & $in)) {
|
||||||
elseif (0xE0 == (0xF0 & $in))
|
|
||||||
{
|
|
||||||
// First octet of 3 octet sequence
|
// First octet of 3 octet sequence
|
||||||
$mUcs4 = $in;
|
$mUcs4 = $in;
|
||||||
$mUcs4 = ($mUcs4 & 0x0F) << 12;
|
$mUcs4 = ($mUcs4 & 0x0F) << 12;
|
||||||
$mState = 2;
|
$mState = 2;
|
||||||
$mBytes = 3;
|
$mBytes = 3;
|
||||||
}
|
} elseif (0xF0 == (0xF8 & $in)) {
|
||||||
elseif (0xF0 == (0xF8 & $in))
|
|
||||||
{
|
|
||||||
// First octet of 4 octet sequence
|
// First octet of 4 octet sequence
|
||||||
$mUcs4 = $in;
|
$mUcs4 = $in;
|
||||||
$mUcs4 = ($mUcs4 & 0x07) << 18;
|
$mUcs4 = ($mUcs4 & 0x07) << 18;
|
||||||
$mState = 3;
|
$mState = 3;
|
||||||
$mBytes = 4;
|
$mBytes = 4;
|
||||||
}
|
} elseif (0xF8 == (0xFC & $in)) {
|
||||||
elseif (0xF8 == (0xFC & $in))
|
|
||||||
{
|
|
||||||
// First octet of 5 octet sequence.
|
// First octet of 5 octet sequence.
|
||||||
//
|
//
|
||||||
// This is illegal because the encoded codepoint must be either
|
// This is illegal because the encoded codepoint must be either
|
||||||
@@ -69,27 +62,20 @@ function _to_unicode($str)
|
|||||||
$mUcs4 = ($mUcs4 & 0x03) << 24;
|
$mUcs4 = ($mUcs4 & 0x03) << 24;
|
||||||
$mState = 4;
|
$mState = 4;
|
||||||
$mBytes = 5;
|
$mBytes = 5;
|
||||||
}
|
} elseif (0xFC == (0xFE & $in)) {
|
||||||
elseif (0xFC == (0xFE & $in))
|
|
||||||
{
|
|
||||||
// First octet of 6 octet sequence, see comments for 5 octet sequence.
|
// First octet of 6 octet sequence, see comments for 5 octet sequence.
|
||||||
$mUcs4 = $in;
|
$mUcs4 = $in;
|
||||||
$mUcs4 = ($mUcs4 & 1) << 30;
|
$mUcs4 = ($mUcs4 & 1) << 30;
|
||||||
$mState = 5;
|
$mState = 5;
|
||||||
$mBytes = 6;
|
$mBytes = 6;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Current octet is neither in the US-ASCII range nor a legal first octet of a multi-octet sequence.
|
// Current octet is neither in the US-ASCII range nor a legal first octet of a multi-octet sequence.
|
||||||
trigger_error('utf8::to_unicode: Illegal sequence identifier in UTF-8 at byte ' . $i, E_USER_WARNING);
|
trigger_error('utf8::to_unicode: Illegal sequence identifier in UTF-8 at byte ' . $i, E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// When mState is non-zero, we expect a continuation of the multi-octet sequence
|
// When mState is non-zero, we expect a continuation of the multi-octet sequence
|
||||||
if (0x80 == (0xC0 & $in))
|
if (0x80 == (0xC0 & $in)) {
|
||||||
{
|
|
||||||
// Legal continuation
|
// Legal continuation
|
||||||
$shift = ($mState - 1) * 6;
|
$shift = ($mState - 1) * 6;
|
||||||
$tmp = $in;
|
$tmp = $in;
|
||||||
@@ -97,26 +83,25 @@ function _to_unicode($str)
|
|||||||
$mUcs4 |= $tmp;
|
$mUcs4 |= $tmp;
|
||||||
|
|
||||||
// End of the multi-octet sequence. mUcs4 now contains the final Unicode codepoint to be output
|
// End of the multi-octet sequence. mUcs4 now contains the final Unicode codepoint to be output
|
||||||
if (0 == --$mState)
|
if (0 == --$mState) {
|
||||||
{
|
|
||||||
// Check for illegal sequences and codepoints
|
// Check for illegal sequences and codepoints
|
||||||
|
|
||||||
// From Unicode 3.1, non-shortest form is illegal
|
// From Unicode 3.1, non-shortest form is illegal
|
||||||
if (((2 == $mBytes) AND ($mUcs4 < 0x0080)) OR
|
if (
|
||||||
((3 == $mBytes) AND ($mUcs4 < 0x0800)) OR
|
((2 == $mBytes) and ($mUcs4 < 0x0080)) or
|
||||||
((4 == $mBytes) AND ($mUcs4 < 0x10000)) OR
|
((3 == $mBytes) and ($mUcs4 < 0x0800)) or
|
||||||
(4 < $mBytes) OR
|
((4 == $mBytes) and ($mUcs4 < 0x10000)) or
|
||||||
|
(4 < $mBytes) or
|
||||||
// From Unicode 3.2, surrogate characters are illegal
|
// From Unicode 3.2, surrogate characters are illegal
|
||||||
(($mUcs4 & 0xFFFFF800) == 0xD800) OR
|
(($mUcs4 & 0xFFFFF800) == 0xD800) or
|
||||||
// Codepoints outside the Unicode range are illegal
|
// Codepoints outside the Unicode range are illegal
|
||||||
($mUcs4 > 0x10FFFF))
|
($mUcs4 > 0x10FFFF)
|
||||||
{
|
) {
|
||||||
trigger_error('utf8::to_unicode: Illegal sequence or codepoint in UTF-8 at byte ' . $i, E_USER_WARNING);
|
trigger_error('utf8::to_unicode: Illegal sequence or codepoint in UTF-8 at byte ' . $i, E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0xFEFF != $mUcs4)
|
if (0xFEFF != $mUcs4) {
|
||||||
{
|
|
||||||
// BOM is legal but we don't want to output it
|
// BOM is legal but we don't want to output it
|
||||||
$out[] = $mUcs4;
|
$out[] = $mUcs4;
|
||||||
}
|
}
|
||||||
@@ -126,13 +111,11 @@ function _to_unicode($str)
|
|||||||
$mUcs4 = 0;
|
$mUcs4 = 0;
|
||||||
$mBytes = 1;
|
$mBytes = 1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// ((0xC0 & (*in) != 0x80) AND (mState != 0))
|
// ((0xC0 & (*in) != 0x80) AND (mState != 0))
|
||||||
// Incomplete multi-octet sequence
|
// Incomplete multi-octet sequence
|
||||||
trigger_error('utf8::to_unicode: Incomplete multi-octet sequence in UTF-8 at byte ' . $i, E_USER_WARNING);
|
trigger_error('utf8::to_unicode: Incomplete multi-octet sequence in UTF-8 at byte ' . $i, E_USER_WARNING);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::transliterate_to_ascii
|
* utf8::transliterate_to_ascii
|
||||||
*
|
*
|
||||||
@@ -10,13 +14,11 @@
|
|||||||
*/
|
*/
|
||||||
function _transliterate_to_ascii($str, $case = 0)
|
function _transliterate_to_ascii($str, $case = 0)
|
||||||
{
|
{
|
||||||
static $UTF8_LOWER_ACCENTS = NULL;
|
static $UTF8_LOWER_ACCENTS = null;
|
||||||
static $UTF8_UPPER_ACCENTS = NULL;
|
static $UTF8_UPPER_ACCENTS = null;
|
||||||
|
|
||||||
if ($case <= 0)
|
if ($case <= 0) {
|
||||||
{
|
if ($UTF8_LOWER_ACCENTS === null) {
|
||||||
if ($UTF8_LOWER_ACCENTS === NULL)
|
|
||||||
{
|
|
||||||
$UTF8_LOWER_ACCENTS = array(
|
$UTF8_LOWER_ACCENTS = array(
|
||||||
'à' => 'a', 'ô' => 'o', 'ď' => 'd', 'ḟ' => 'f', 'ë' => 'e', 'š' => 's', 'ơ' => 'o',
|
'à' => 'a', 'ô' => 'o', 'ď' => 'd', 'ḟ' => 'f', 'ë' => 'e', 'š' => 's', 'ơ' => 'o',
|
||||||
'ß' => 'ss', 'ă' => 'a', 'ř' => 'r', 'ț' => 't', 'ň' => 'n', 'ā' => 'a', 'ķ' => 'k',
|
'ß' => 'ss', 'ă' => 'a', 'ř' => 'r', 'ț' => 't', 'ň' => 'n', 'ā' => 'a', 'ķ' => 'k',
|
||||||
@@ -43,10 +45,8 @@ function _transliterate_to_ascii($str, $case = 0)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($case >= 0)
|
if ($case >= 0) {
|
||||||
{
|
if ($UTF8_UPPER_ACCENTS === null) {
|
||||||
if ($UTF8_UPPER_ACCENTS === NULL)
|
|
||||||
{
|
|
||||||
$UTF8_UPPER_ACCENTS = array(
|
$UTF8_UPPER_ACCENTS = array(
|
||||||
'À' => 'A', 'Ô' => 'O', 'Ď' => 'D', 'Ḟ' => 'F', 'Ë' => 'E', 'Š' => 'S', 'Ơ' => 'O',
|
'À' => 'A', 'Ô' => 'O', 'Ď' => 'D', 'Ḟ' => 'F', 'Ë' => 'E', 'Š' => 'S', 'Ơ' => 'O',
|
||||||
'Ă' => 'A', 'Ř' => 'R', 'Ț' => 'T', 'Ň' => 'N', 'Ā' => 'A', 'Ķ' => 'K', 'Ĕ' => 'E',
|
'Ă' => 'A', 'Ř' => 'R', 'Ț' => 'T', 'Ň' => 'N', 'Ā' => 'A', 'Ķ' => 'K', 'Ĕ' => 'E',
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::trim
|
* utf8::trim
|
||||||
*
|
*
|
||||||
@@ -8,10 +12,11 @@
|
|||||||
* @copyright (c) 2005 Harry Fuecks
|
* @copyright (c) 2005 Harry Fuecks
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
|
||||||
*/
|
*/
|
||||||
function _trim($str, $charlist = NULL)
|
function _trim($str, $charlist = null)
|
||||||
{
|
{
|
||||||
if ($charlist === NULL)
|
if ($charlist === null) {
|
||||||
return trim($str);
|
return trim($str);
|
||||||
|
}
|
||||||
|
|
||||||
return utf8::ltrim(utf8::rtrim($str, $charlist), $charlist);
|
return utf8::ltrim(utf8::rtrim($str, $charlist), $charlist);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::ucfirst
|
* utf8::ucfirst
|
||||||
*
|
*
|
||||||
@@ -10,8 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
function _ucfirst($str)
|
function _ucfirst($str)
|
||||||
{
|
{
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return ucfirst($str);
|
return ucfirst($str);
|
||||||
|
}
|
||||||
|
|
||||||
preg_match('/^(.?)(.*)$/us', $str, $matches);
|
preg_match('/^(.?)(.*)$/us', $str, $matches);
|
||||||
return utf8::strtoupper($matches[1]) . $matches[2];
|
return utf8::strtoupper($matches[1]) . $matches[2];
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
/**
|
/**
|
||||||
* utf8::ucwords
|
* utf8::ucwords
|
||||||
*
|
*
|
||||||
@@ -10,11 +14,13 @@
|
|||||||
*/
|
*/
|
||||||
function _ucwords($str)
|
function _ucwords($str)
|
||||||
{
|
{
|
||||||
if (SERVER_UTF8)
|
if (SERVER_UTF8) {
|
||||||
return mb_convert_case($str, MB_CASE_TITLE);
|
return mb_convert_case($str, MB_CASE_TITLE);
|
||||||
|
}
|
||||||
|
|
||||||
if (utf8::is_ascii($str))
|
if (utf8::is_ascii($str)) {
|
||||||
return ucwords($str);
|
return ucwords($str);
|
||||||
|
}
|
||||||
|
|
||||||
// [\x0c\x09\x0b\x0a\x0d\x20] matches form feeds, horizontal tabs, vertical tabs, linefeeds and carriage returns.
|
// [\x0c\x09\x0b\x0a\x0d\x20] matches form feeds, horizontal tabs, vertical tabs, linefeeds and carriage returns.
|
||||||
// This corresponds to the definition of a 'word' defined at http://php.net/ucwords
|
// This corresponds to the definition of a 'word' defined at http://php.net/ucwords
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array helper class.
|
* Array helper class.
|
||||||
*
|
*
|
||||||
@@ -9,8 +17,8 @@
|
|||||||
* @copyright (c) 2007-2008 Kohana Team
|
* @copyright (c) 2007-2008 Kohana Team
|
||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
*/
|
*/
|
||||||
class arr_Core {
|
class arr_Core
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Return a callback array from a string, eg: limit[10,20] would become
|
* Return a callback array from a string, eg: limit[10,20] would become
|
||||||
* array('limit', array('10', '20'))
|
* array('limit', array('10', '20'))
|
||||||
@@ -21,22 +29,19 @@ class arr_Core {
|
|||||||
public static function callback_string($str)
|
public static function callback_string($str)
|
||||||
{
|
{
|
||||||
// command[param,param]
|
// command[param,param]
|
||||||
if (preg_match('/([^\[]*+)\[(.+)\]/', (string) $str, $match))
|
if (preg_match('/([^\[]*+)\[(.+)\]/', (string) $str, $match)) {
|
||||||
{
|
|
||||||
// command
|
// command
|
||||||
$command = $match[1];
|
$command = $match[1];
|
||||||
|
|
||||||
// param,param
|
// param,param
|
||||||
$params = preg_split('/(?<!\\\\),/', $match[2]);
|
$params = preg_split('/(?<!\\\\),/', $match[2]);
|
||||||
$params = str_replace('\,', ',', $params);
|
$params = str_replace('\,', ',', $params);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// command
|
// command
|
||||||
$command = $str;
|
$command = $str;
|
||||||
|
|
||||||
// No params
|
// No params
|
||||||
$params = NULL;
|
$params = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($command, $params);
|
return array($command, $params);
|
||||||
@@ -51,14 +56,12 @@ class arr_Core {
|
|||||||
* if your subkeys might not match, you need to pass FALSE here!
|
* if your subkeys might not match, you need to pass FALSE here!
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function rotate($source_array, $keep_keys = TRUE)
|
public static function rotate($source_array, $keep_keys = true)
|
||||||
{
|
{
|
||||||
$new_array = array();
|
$new_array = array();
|
||||||
foreach ($source_array as $key => $value)
|
foreach ($source_array as $key => $value) {
|
||||||
{
|
$value = ($keep_keys === true) ? $value : array_values($value);
|
||||||
$value = ($keep_keys === TRUE) ? $value : array_values($value);
|
foreach ($value as $k => $v) {
|
||||||
foreach ($value as $k => $v)
|
|
||||||
{
|
|
||||||
$new_array[$k][$key] = $v;
|
$new_array[$k][$key] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,8 +78,9 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function remove($key, &$array)
|
public static function remove($key, &$array)
|
||||||
{
|
{
|
||||||
if ( ! array_key_exists($key, $array))
|
if (! array_key_exists($key, $array)) {
|
||||||
return NULL;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$val = $array[$key];
|
$val = $array[$key];
|
||||||
unset($array[$key]);
|
unset($array[$key]);
|
||||||
@@ -100,15 +104,11 @@ class arr_Core {
|
|||||||
$keys = array_slice(func_get_args(), 1);
|
$keys = array_slice(func_get_args(), 1);
|
||||||
|
|
||||||
$found = array();
|
$found = array();
|
||||||
foreach ($keys as $key)
|
foreach ($keys as $key) {
|
||||||
{
|
if (isset($search[$key])) {
|
||||||
if (isset($search[$key]))
|
|
||||||
{
|
|
||||||
$found[$key] = $search[$key];
|
$found[$key] = $search[$key];
|
||||||
}
|
} else {
|
||||||
else
|
$found[$key] = null;
|
||||||
{
|
|
||||||
$found[$key] = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,9 +125,9 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function unshift_assoc(array &$array, $key, $val)
|
public static function unshift_assoc(array &$array, $key, $val)
|
||||||
{
|
{
|
||||||
$array = array_reverse($array, TRUE);
|
$array = array_reverse($array, true);
|
||||||
$array[$key] = $val;
|
$array[$key] = $val;
|
||||||
$array = array_reverse($array, TRUE);
|
$array = array_reverse($array, true);
|
||||||
|
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
@@ -142,8 +142,7 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function map_recursive($callback, array $array)
|
public static function map_recursive($callback, array $array)
|
||||||
{
|
{
|
||||||
foreach ($array as $key => $val)
|
foreach ($array as $key => $val) {
|
||||||
{
|
|
||||||
// Map the callback to the key
|
// Map the callback to the key
|
||||||
$array[$key] = is_array($val) ? arr::map_recursive($callback, $val) : call_user_func($callback, $val);
|
$array[$key] = is_array($val) ? arr::map_recursive($callback, $val) : call_user_func($callback, $val);
|
||||||
}
|
}
|
||||||
@@ -157,35 +156,28 @@ class arr_Core {
|
|||||||
* @param boolean $sort sort the array now
|
* @param boolean $sort sort the array now
|
||||||
* @return integer|FALSE the index of the match or FALSE when not found
|
* @return integer|FALSE the index of the match or FALSE when not found
|
||||||
*/
|
*/
|
||||||
public static function binary_search($needle, $haystack, $sort = FALSE)
|
public static function binary_search($needle, $haystack, $sort = false)
|
||||||
{
|
|
||||||
if ($sort)
|
|
||||||
{
|
{
|
||||||
|
if ($sort) {
|
||||||
sort($haystack);
|
sort($haystack);
|
||||||
}
|
}
|
||||||
|
|
||||||
$high = count($haystack) - 1;
|
$high = count($haystack) - 1;
|
||||||
$low = 0;
|
$low = 0;
|
||||||
|
|
||||||
while ($low <= $high)
|
while ($low <= $high) {
|
||||||
{
|
|
||||||
$mid = ($low + $high) >> 1;
|
$mid = ($low + $high) >> 1;
|
||||||
|
|
||||||
if ($haystack[$mid] < $needle)
|
if ($haystack[$mid] < $needle) {
|
||||||
{
|
|
||||||
$low = $mid + 1;
|
$low = $mid + 1;
|
||||||
}
|
} elseif ($haystack[$mid] > $needle) {
|
||||||
elseif ($haystack[$mid] > $needle)
|
|
||||||
{
|
|
||||||
$high = $mid - 1;
|
$high = $mid - 1;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return $mid;
|
return $mid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,30 +193,20 @@ class arr_Core {
|
|||||||
$total = func_num_args();
|
$total = func_num_args();
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
for ($i = 0; $i < $total; $i++)
|
for ($i = 0; $i < $total; $i++) {
|
||||||
{
|
foreach (func_get_arg($i) as $key => $val) {
|
||||||
foreach (func_get_arg($i) as $key => $val)
|
if (isset($result[$key])) {
|
||||||
{
|
if (is_array($val)) {
|
||||||
if (isset($result[$key]))
|
|
||||||
{
|
|
||||||
if (is_array($val))
|
|
||||||
{
|
|
||||||
// Arrays are merged recursively
|
// Arrays are merged recursively
|
||||||
$result[$key] = arr::merge($result[$key], $val);
|
$result[$key] = arr::merge($result[$key], $val);
|
||||||
}
|
} elseif (is_int($key)) {
|
||||||
elseif (is_int($key))
|
|
||||||
{
|
|
||||||
// Indexed arrays are appended
|
// Indexed arrays are appended
|
||||||
array_push($result, $val);
|
array_push($result, $val);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Associative arrays are replaced
|
// Associative arrays are replaced
|
||||||
$result[$key] = $val;
|
$result[$key] = $val;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// New values are added
|
// New values are added
|
||||||
$result[$key] = $val;
|
$result[$key] = $val;
|
||||||
}
|
}
|
||||||
@@ -244,17 +226,13 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function overwrite($array1, $array2)
|
public static function overwrite($array1, $array2)
|
||||||
{
|
{
|
||||||
foreach (array_intersect_key($array2, $array1) as $key => $value)
|
foreach (array_intersect_key($array2, $array1) as $key => $value) {
|
||||||
{
|
|
||||||
$array1[$key] = $value;
|
$array1[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (func_num_args() > 2)
|
if (func_num_args() > 2) {
|
||||||
{
|
foreach (array_slice(func_get_args(), 2) as $array2) {
|
||||||
foreach (array_slice(func_get_args(), 2) as $array2)
|
foreach (array_intersect_key($array2, $array1) as $key => $value) {
|
||||||
{
|
|
||||||
foreach (array_intersect_key($array2, $array1) as $key => $value)
|
|
||||||
{
|
|
||||||
$array1[$key] = $value;
|
$array1[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -272,12 +250,12 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function range($step = 10, $max = 100)
|
public static function range($step = 10, $max = 100)
|
||||||
{
|
{
|
||||||
if ($step < 1)
|
if ($step < 1) {
|
||||||
return array();
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$array = array();
|
$array = array();
|
||||||
for ($i = $step; $i <= $max; $i += $step)
|
for ($i = $step; $i <= $max; $i += $step) {
|
||||||
{
|
|
||||||
$array[$i] = $i;
|
$array[$i] = $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,12 +270,10 @@ class arr_Core {
|
|||||||
*/
|
*/
|
||||||
public static function to_object(array $array, $class = 'stdClass')
|
public static function to_object(array $array, $class = 'stdClass')
|
||||||
{
|
{
|
||||||
$object = new $class;
|
$object = new $class();
|
||||||
|
|
||||||
foreach ($array as $key => $value)
|
foreach ($array as $key => $value) {
|
||||||
{
|
if (is_array($value)) {
|
||||||
if (is_array($value))
|
|
||||||
{
|
|
||||||
// Convert the array to an object
|
// Convert the array to an object
|
||||||
$value = arr::to_object($value, $class);
|
$value = arr::to_object($value, $class);
|
||||||
}
|
}
|
||||||
@@ -308,5 +284,5 @@ class arr_Core {
|
|||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End arr
|
// End arr
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
<?php
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
defined('SYSPATH') or die('No direct access allowed.');
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cookie helper class.
|
* Cookie helper class.
|
||||||
*
|
*
|
||||||
@@ -9,8 +16,8 @@
|
|||||||
* @copyright (c) 2007-2008 Kohana Team
|
* @copyright (c) 2007-2008 Kohana Team
|
||||||
* @license http://kohanaphp.com/license.html
|
* @license http://kohanaphp.com/license.html
|
||||||
*/
|
*/
|
||||||
class cookie_Core {
|
class cookie_Core
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Sets a cookie with the given parameters.
|
* Sets a cookie with the given parameters.
|
||||||
*
|
*
|
||||||
@@ -23,10 +30,11 @@ class cookie_Core {
|
|||||||
* @param boolean HTTP only (requires PHP 5.2 or higher)
|
* @param boolean HTTP only (requires PHP 5.2 or higher)
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function set($name, $value = NULL, $expire = NULL, $path = NULL, $domain = NULL, $secure = NULL, $httponly = NULL)
|
public static function set($name, $value = null, $expire = null, $path = null, $domain = null, $secure = null, $httponly = null)
|
||||||
{
|
{
|
||||||
if (headers_sent())
|
if (headers_sent()) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// If the name param is an array, we import it
|
// If the name param is an array, we import it
|
||||||
is_array($name) and extract($name, EXTR_OVERWRITE);
|
is_array($name) and extract($name, EXTR_OVERWRITE);
|
||||||
@@ -34,10 +42,8 @@ class cookie_Core {
|
|||||||
// Fetch default options
|
// Fetch default options
|
||||||
$config = Kohana::config('cookie');
|
$config = Kohana::config('cookie');
|
||||||
|
|
||||||
foreach (array('value', 'expire', 'domain', 'path', 'secure', 'httponly') as $item)
|
foreach (array('value', 'expire', 'domain', 'path', 'secure', 'httponly') as $item) {
|
||||||
{
|
if ($$item === null and isset($config[$item])) {
|
||||||
if ($$item === NULL AND isset($config[$item]))
|
|
||||||
{
|
|
||||||
$$item = $config[$item];
|
$$item = $config[$item];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,7 +62,7 @@ class cookie_Core {
|
|||||||
* @param boolean use XSS cleaning on the value
|
* @param boolean use XSS cleaning on the value
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function get($name, $default = NULL, $xss_clean = FALSE)
|
public static function get($name, $default = null, $xss_clean = false)
|
||||||
{
|
{
|
||||||
return Input::instance()->cookie($name, $default, $xss_clean);
|
return Input::instance()->cookie($name, $default, $xss_clean);
|
||||||
}
|
}
|
||||||
@@ -69,16 +75,17 @@ class cookie_Core {
|
|||||||
* @param string URL domain
|
* @param string URL domain
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function delete($name, $path = NULL, $domain = NULL)
|
public static function delete($name, $path = null, $domain = null)
|
||||||
{
|
{
|
||||||
if ( ! isset($_COOKIE[$name]))
|
if (! isset($_COOKIE[$name])) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the cookie from globals
|
// Delete the cookie from globals
|
||||||
unset($_COOKIE[$name]);
|
unset($_COOKIE[$name]);
|
||||||
|
|
||||||
// Sets the cookie value to an empty string, and the expiration to 24 hours ago
|
// Sets the cookie value to an empty string, and the expiration to 24 hours ago
|
||||||
return cookie::set($name, '', -86400, $path, $domain, FALSE, FALSE);
|
return cookie::set($name, '', -86400, $path, $domain, false, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // End cookie
|
// End cookie
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user