svn commit: r313373 - in head/net-mgmt/nagiosql: . files
Olli Hauer
ohauer at FreeBSD.org
Sun Mar 3 19:56:49 UTC 2013
Author: ohauer
Date: Sun Mar 3 19:56:48 2013
New Revision: 313373
URL: http://svnweb.freebsd.org/changeset/ports/313373
Log:
update to nagiosql 3.2.0_SP2
- use OPTIONS-NG
- make php5-ftp to optional (I suspect local file or SSH is the preferred config distribuiton methode)
- remove all patch files, they are already included in the re-rolled sourcefile
- use DISTSUBDIR (unluckily distversion does not increment with applied patches)
- WWWGROUP is not defined it is WWWGRP (Makefile)
- define WRKSRC
- use COPYTREE_SHARE instead cp
- use post-install script to create $ETCDIR structure
additional for fresh install (adjust paths in sql script)
- change default nagiosql paths from /etc/nagiosql -> ${ETCDIR}
- change default nagios paths from /etc/nagios -> ${LOCALBASE}/etc/nagios
PR: 175457
Submitted by: ohauer
Approved by: maintainer timeout
Added:
head/net-mgmt/nagiosql/files/pkg-install.in (contents, props changed)
Deleted:
head/net-mgmt/nagiosql/files/patch-nagiosql32-admin-contacts.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-admin-hosts.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-admin-services.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-admin-templatedefinitions.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-functions-config__class.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-functions-import__class.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-functions-prepend__adm.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-functions-prepend__content.php
head/net-mgmt/nagiosql/files/patch-nagiosql32-templates-admin-user.tpl.htm
Modified:
head/net-mgmt/nagiosql/Makefile
head/net-mgmt/nagiosql/distinfo (contents, props changed)
head/net-mgmt/nagiosql/files/pkg-message.in (contents, props changed)
head/net-mgmt/nagiosql/pkg-plist (contents, props changed)
Modified: head/net-mgmt/nagiosql/Makefile
==============================================================================
--- head/net-mgmt/nagiosql/Makefile Sun Mar 3 18:12:06 2013 (r313372)
+++ head/net-mgmt/nagiosql/Makefile Sun Mar 3 19:56:48 2013 (r313373)
@@ -1,15 +1,13 @@
-# New ports collection makefile for: nagiosql
-# Date created: 7 Dec 2010
-# Whom: Chris St Denis <chris at smartt.com>
-#
+# Created by: Chris St Denis <chris at smartt.com>
# $FreeBSD$
-#
PORTNAME= nagiosql
PORTVERSION= 3.2.0
+PORTREVISION= 1
CATEGORIES= net-mgmt www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/NagiosQL%20${PORTVERSION}/
DISTNAME= ${PORTNAME}_${PORTVERSION:S/.//g}
+DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}_SP2
MAINTAINER= chris at smartt.com
COMMENT= A web based administration tool for Nagios
@@ -22,36 +20,62 @@ RUN_DEPENDS= nagios:${PORTSDIR}/net-mgmt
USE_BZIP2= yes
USE_MYSQL= yes
USE_GETTEXT= yes
-USE_PHP= mysql gettext ftp session simplexml
-IGNORE_WITH_PHP=4
+USE_PHP= mysql gettext session simplexml
WANT_PHP_WEB= yes
+USERS?= nagios
+GROUPS?= nagios
+NAGIOSUSER?= nagios
+
NO_BUILD= yes
-NO_WRKSUBDIR= yes
-PKGMESSAGE= ${WRKDIR}/pkg-message
-SUB_FILES= pkg-message
+WRKSRC= ${WRKDIR}/${PORTNAME}32
+
+SUB_FILES= pkg-message pkg-install
+SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} NAGIOSUSER=${NAGIOSUSER}
PEARDIR?= ${LOCALBASE}/share/pear
-OPTIONS= CURL "Configure with cURL support" off \
- SSH2 "Configure with SSH2 support" off
+OPTIONS_DEFINE= CURL FTP SSH2
+CURL_DESC= Configure with cURL support
+FTP_DESC= Configure with FTP support
+SSH2_DESC= Configure with SSH2 support
-#.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if defined(WITH_CURL)
+.if ${PORT_OPTIONS:MCURL}
USE_PHP+= curl
.endif
-.if defined(WITH_SSH2)
+.if ${PORT_OPTIONS:MFTP}
+USE_PHP+= ftp
+.endif
+
+.if ${PORT_OPTIONS:MSSH2}
USE_PHP+= ssh2
.endif
+post-patch:
+ ${REINPLACE_CMD} -e "s|\'/etc/nagiosql/|\'${ETCDIR}/|g" \
+ -e "s|/opt/nagios/etc/objects/|${LOCALBASE}/etc/nagios/objects/|" \
+ -e "s|/opt/nagios/bin/nagios|${LOCALBASE}/bin/nagios|" \
+ -e "s|/var/nagios/nagios.lock|/var/spool/nagios/nagios.lock|" \
+ -e "s|/var/nagios/rw/nagios.cmd|/var/spool/nagios/rw/nagios.cmd|" \
+ -e "s|nagios/etc/|etc/nagios/|" \
+ -e "s|nagiosql/etc/|${ETCDIR}/|" \
+ -e "s|\>/etc/nagiosql|\>${ETCDIR}|g" \
+ -e "s|\>/etc/nagios/|\>${LOCALBASE}/etc/nagios/|g" \
+ ${WRKSRC}/install/sql/nagiosQL_v32_db_mysql.sql
+
+ ${REINPLACE_CMD} -e "s|\"/etc/|\"${LOCALBASE}/etc/|" \
+ ${WRKSRC}/install/install.php
+
do-install:
- ${MKDIR} ${WWWDIR}
- ${CP} -R ${WRKSRC}/${PORTNAME}32/ ${WWWDIR}
- ${CHOWN} ${WWWOWN}:${WWWGROUP} ${WWWDIR}/config
+ @${MKDIR} ${WWWDIR}
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR} "! ( -name *\.orig -o -name *\.bak )")
+ @${CHOWN} ${WWWOWN}:${WWWGRP} ${WWWDIR}/config
post-install:
+ @${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
Modified: head/net-mgmt/nagiosql/distinfo
==============================================================================
--- head/net-mgmt/nagiosql/distinfo Sun Mar 3 18:12:06 2013 (r313372)
+++ head/net-mgmt/nagiosql/distinfo Sun Mar 3 19:56:48 2013 (r313373)
@@ -1,2 +1,2 @@
-SHA256 (nagiosql_320.tar.bz2) = a5259d2342752949f005533eec5a68c10e7476b83f192e972d9edcd3ec92d5d1
-SIZE (nagiosql_320.tar.bz2) = 921396
+SHA256 (nagiosql/3.2.0_SP2/nagiosql_320.tar.bz2) = 32a019ec6b13342257787d83839c5913f87534d840e96ebde8d663e656833d4d
+SIZE (nagiosql/3.2.0_SP2/nagiosql_320.tar.bz2) = 996713
Added: head/net-mgmt/nagiosql/files/pkg-install.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/nagiosql/files/pkg-install.in Sun Mar 3 19:56:48 2013 (r313373)
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+WWWOWN=%%WWWOWN%%
+WWWGRP=%%WWWGRP%%
+NAGIOSUSER=%%NAGIOSUSER%%
+
+ETCDIR=%%ETCDIR%%
+WWWDIR=%%WWWDIR%%
+
+if [ "$2" = "POST-INSTALL" ]; then
+ echo "=========== p o s t - i n s t a l l ================="
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/ssh
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/hosts
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/services
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/backup
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/backup/hosts
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/backup/services
+ install -m 750 -o ${WWWOWN} -g ${NAGIOSUSER} -d ${ETCDIR}/backup/ssh
+ chown ${WWWOWN}:${WWWGRP} ${WWWDIR}/config
+fi
Modified: head/net-mgmt/nagiosql/files/pkg-message.in
==============================================================================
--- head/net-mgmt/nagiosql/files/pkg-message.in Sun Mar 3 18:12:06 2013 (r313372)
+++ head/net-mgmt/nagiosql/files/pkg-message.in Sun Mar 3 19:56:48 2013 (r313373)
@@ -1,5 +1,5 @@
=======================================================================
-Nagiosql is now installed. If you intall it for the first time,
+Nagiosql is now installed. If you install it for the first time,
you may have to add an alias in apache config for it.
Alias /nagiosql/ "%%WWWDIR%%/"
Modified: head/net-mgmt/nagiosql/pkg-plist
==============================================================================
--- head/net-mgmt/nagiosql/pkg-plist Sun Mar 3 18:12:06 2013 (r313372)
+++ head/net-mgmt/nagiosql/pkg-plist Sun Mar 3 19:56:48 2013 (r313373)
@@ -8,7 +8,6 @@
%%WWWDIR%%/admin/configtargets.php
%%WWWDIR%%/admin/contactgroups.php
%%WWWDIR%%/admin/contacts.php
-%%WWWDIR%%/admin/contacts.php.orig
%%WWWDIR%%/admin/contacttemplates.php
%%WWWDIR%%/admin/datadomain.php
%%WWWDIR%%/admin/delbackup.php
@@ -22,7 +21,6 @@
%%WWWDIR%%/admin/hostextinfo.php
%%WWWDIR%%/admin/hostgroups.php
%%WWWDIR%%/admin/hosts.php
-%%WWWDIR%%/admin/hosts.php.orig
%%WWWDIR%%/admin/hosttemplates.php
%%WWWDIR%%/admin/import.php
%%WWWDIR%%/admin/index.html
@@ -38,13 +36,11 @@
%%WWWDIR%%/admin/serviceextinfo.php
%%WWWDIR%%/admin/servicegroups.php
%%WWWDIR%%/admin/services.php
-%%WWWDIR%%/admin/services.php.orig
%%WWWDIR%%/admin/servicetemplates.php
%%WWWDIR%%/admin/settings.php
%%WWWDIR%%/admin/specials.php
%%WWWDIR%%/admin/support.php
%%WWWDIR%%/admin/templatedefinitions.php
-%%WWWDIR%%/admin/templatedefinitions.php.orig
%%WWWDIR%%/admin/timedefinitions.php
%%WWWDIR%%/admin/timeperiods.php
%%WWWDIR%%/admin/tools.php
@@ -66,6 +62,10 @@
%%WWWDIR%%/config/locale/en_GB/LC_MESSAGES/en_GB.po
%%WWWDIR%%/config/locale/en_GB/LC_MESSAGES/index.html
%%WWWDIR%%/config/locale/en_GB/index.html
+%%WWWDIR%%/config/locale/es_AR/LC_MESSAGES/es_AR.mo
+%%WWWDIR%%/config/locale/es_AR/LC_MESSAGES/es_AR.po
+%%WWWDIR%%/config/locale/es_AR/LC_MESSAGES/index.html
+%%WWWDIR%%/config/locale/es_AR/index.html
%%WWWDIR%%/config/locale/es_ES/LC_MESSAGES/es_ES.mo
%%WWWDIR%%/config/locale/es_ES/LC_MESSAGES/es_ES.po
%%WWWDIR%%/config/locale/es_ES/LC_MESSAGES/index.html
@@ -78,10 +78,18 @@
%%WWWDIR%%/config/locale/it_IT/LC_MESSAGES/it_IT.mo
%%WWWDIR%%/config/locale/it_IT/LC_MESSAGES/it_IT.po
%%WWWDIR%%/config/locale/it_IT/index.html
+%%WWWDIR%%/config/locale/ja_JP/LC_MESSAGES/index.html
+%%WWWDIR%%/config/locale/ja_JP/LC_MESSAGES/ja_JP.mo
+%%WWWDIR%%/config/locale/ja_JP/LC_MESSAGES/ja_JP.po
+%%WWWDIR%%/config/locale/ja_JP/index.html
%%WWWDIR%%/config/locale/nl_NL/LC_MESSAGES/index.html
%%WWWDIR%%/config/locale/nl_NL/LC_MESSAGES/nl_NL.mo
%%WWWDIR%%/config/locale/nl_NL/LC_MESSAGES/nl_NL.po
%%WWWDIR%%/config/locale/nl_NL/index.html
+%%WWWDIR%%/config/locale/pl_PL/LC_MESSAGES/index.html
+%%WWWDIR%%/config/locale/pl_PL/LC_MESSAGES/pl_PL.mo
+%%WWWDIR%%/config/locale/pl_PL/LC_MESSAGES/pl_PL.po
+%%WWWDIR%%/config/locale/pl_PL/index.html
%%WWWDIR%%/config/locale/pt_BR/LC_MESSAGES/index.html
%%WWWDIR%%/config/locale/pt_BR/LC_MESSAGES/pt_BR.mo
%%WWWDIR%%/config/locale/pt_BR/LC_MESSAGES/pt_BR.po
@@ -104,17 +112,13 @@
%%WWWDIR%%/favicon.ico
%%WWWDIR%%/functions/common.js
%%WWWDIR%%/functions/config_class.php
-%%WWWDIR%%/functions/config_class.php.orig
%%WWWDIR%%/functions/content_class.php
%%WWWDIR%%/functions/data_class.php
%%WWWDIR%%/functions/import_class.php
-%%WWWDIR%%/functions/import_class.php.orig
%%WWWDIR%%/functions/mysql_class.php
%%WWWDIR%%/functions/nag_class.php
%%WWWDIR%%/functions/prepend_adm.php
-%%WWWDIR%%/functions/prepend_adm.php.orig
%%WWWDIR%%/functions/prepend_content.php
-%%WWWDIR%%/functions/prepend_content.php.orig
%%WWWDIR%%/functions/prepend_scripting.php
%%WWWDIR%%/functions/tinyMCE/jscripts/tiny_mce/langs/en.js
%%WWWDIR%%/functions/tinyMCE/jscripts/tiny_mce/license.txt
@@ -355,7 +359,6 @@
%%WWWDIR%%/templates/admin/support.tpl.htm
%%WWWDIR%%/templates/admin/timeperiods.tpl.htm
%%WWWDIR%%/templates/admin/user.tpl.htm
-%%WWWDIR%%/templates/admin/user.tpl.htm.orig
%%WWWDIR%%/templates/admin/verify.tpl.htm
%%WWWDIR%%/templates/files/commands.tpl.dat
%%WWWDIR%%/templates/files/contactgroups.tpl.dat
@@ -463,14 +466,20 @@
@dirrm %%WWWDIR%%/config/locale/ru_RU
@dirrm %%WWWDIR%%/config/locale/pt_BR/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/pt_BR
+ at dirrm %%WWWDIR%%/config/locale/pl_PL/LC_MESSAGES
+ at dirrm %%WWWDIR%%/config/locale/pl_PL
@dirrm %%WWWDIR%%/config/locale/nl_NL/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/nl_NL
+ at dirrm %%WWWDIR%%/config/locale/ja_JP/LC_MESSAGES
+ at dirrm %%WWWDIR%%/config/locale/ja_JP
@dirrm %%WWWDIR%%/config/locale/it_IT/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/it_IT
@dirrm %%WWWDIR%%/config/locale/fr_FR/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/fr_FR
@dirrm %%WWWDIR%%/config/locale/es_ES/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/es_ES
+ at dirrm %%WWWDIR%%/config/locale/es_AR/LC_MESSAGES
+ at dirrm %%WWWDIR%%/config/locale/es_AR
@dirrm %%WWWDIR%%/config/locale/en_GB/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/en_GB
@dirrm %%WWWDIR%%/config/locale/de_DE/LC_MESSAGES
@@ -478,6 +487,14 @@
@dirrm %%WWWDIR%%/config/locale/da_DK/LC_MESSAGES
@dirrm %%WWWDIR%%/config/locale/da_DK
@dirrm %%WWWDIR%%/config/locale
- at dirrm %%WWWDIR%%/config
+ at dirrmtry %%WWWDIR%%/config
@dirrm %%WWWDIR%%/admin
- at dirrm %%WWWDIR%%
+ at dirrmtry %%WWWDIR%%
+ at dirrmtry %%ETCDIR%%/ssh
+ at dirrmtry %%ETCDIR%%/services
+ at dirrmtry %%ETCDIR%%/hosts
+ at dirrmtry %%ETCDIR%%/backup/ssh
+ at dirrmtry %%ETCDIR%%/backup/services
+ at dirrmtry %%ETCDIR%%/backup/hosts
+ at dirrmtry %%ETCDIR%%/backup
+ at dirrmtry %%ETCDIR%%
More information about the svn-ports-all
mailing list