diff options
author | pav <pav@FreeBSD.org> | 2005-11-02 06:08:04 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-11-02 06:08:04 +0800 |
commit | 205615ebffee0debcb1651002cbf4ae713dd9bb3 (patch) | |
tree | d78478cb0111e4dc5be2519f04b4bd89a3903160 /net-mgmt | |
parent | a6ea15175470760a7a4e279013a95c8c68142d6b (diff) | |
download | freebsd-ports-gnome-205615ebffee0debcb1651002cbf4ae713dd9bb3.tar.gz freebsd-ports-gnome-205615ebffee0debcb1651002cbf4ae713dd9bb3.tar.zst freebsd-ports-gnome-205615ebffee0debcb1651002cbf4ae713dd9bb3.zip |
- Make startup scripts real rcng scripts
- Fix pkg-message usage too
PR: ports/80245 (based on)
Approved by: maintainer's silence over past few months
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/zabbix/Makefile | 26 | ||||
-rw-r--r-- | net-mgmt/zabbix/files/pkg-message.in (renamed from net-mgmt/zabbix/pkg-message) | 2 | ||||
-rw-r--r-- | net-mgmt/zabbix/files/zabbix_agent.sh.in (renamed from net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample) | 6 | ||||
-rw-r--r-- | net-mgmt/zabbix/files/zabbix_suckerd.sh.in (renamed from net-mgmt/zabbix/scripts/zabbix.sh.sample) | 6 | ||||
-rw-r--r-- | net-mgmt/zabbix/pkg-plist | 2 | ||||
-rw-r--r-- | net-mgmt/zabbix2/Makefile | 26 | ||||
-rw-r--r-- | net-mgmt/zabbix2/files/pkg-message.in (renamed from net-mgmt/zabbix2/pkg-message) | 2 | ||||
-rw-r--r-- | net-mgmt/zabbix2/files/zabbix_agent.sh.in (renamed from net-mgmt/zabbix/scripts/zabbix-agent.sh.sample) | 6 | ||||
-rw-r--r-- | net-mgmt/zabbix2/files/zabbix_suckerd.sh.in (renamed from net-mgmt/zabbix2/scripts/zabbix.sh.sample) | 6 | ||||
-rw-r--r-- | net-mgmt/zabbix2/pkg-plist | 2 |
10 files changed, 18 insertions, 66 deletions
diff --git a/net-mgmt/zabbix/Makefile b/net-mgmt/zabbix/Makefile index c5b62da6c941..25bf62306c5c 100644 --- a/net-mgmt/zabbix/Makefile +++ b/net-mgmt/zabbix/Makefile @@ -7,7 +7,7 @@ PORTNAME= zabbix PORTVERSION= 1.0 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES?= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -25,10 +25,10 @@ OPTIONS= PGSQL "Use a PostgreSQL backend" off \ .ifdef(ZABBIX_AGENT_ONLY) PKGNAMESUFFIX= -agent PLIST= ${MASTERDIR}/pkg-plist.agent -PKGMESSAGE= nonexistent .else # ZABBIX_AGENT_ONLY LIB_DEPENDS= netsnmp.7:${PORTSDIR}/net-mgmt/net-snmp USE_PHP= gd snmp sockets +SUB_FILES= pkg-message .endif # ZABBIX_AGENT_ONLY .include <bsd.port.pre.mk> @@ -55,10 +55,12 @@ CONFIGURE_ARGS= --with-mysql CONFIGURE_ARGS+=--with-net-snmp .endif # ZABBIX_AGENT_ONLY -PKGMESSAGE= ${WRKDIR}/pkg-message +USE_RC_SUBR= zabbix_agent.sh +.if !defined(ZABBIX_AGENT_ONLY) +USE_RC_SUBR+= zabbix_suckerd.sh +.endif USE_REINPLACE= yes -USE_RC_SUBR= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include @@ -69,17 +71,7 @@ ZABBIX_BINARIES+= zabbix_suckerd zabbix_trapper zabbix_trapperd ZABBIX_CONFIGS+= zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf .endif -SCRIPT_REGEX= -e 's|%PREFIX%|${PREFIX}|g' -e 's|%LOCALBASE%|${LOCALBASE}|g' - pre-patch: -.if !defined(ZABBIX_AGENT_ONLY) - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/pkg-message > ${PKGMESSAGE} - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/scripts/zabbix.sh.sample > \ - ${WRKDIR}/zabbix.sh.sample -.endif - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/scripts/zabbix-agent.sh.sample > \ - ${WRKDIR}/zabbix-agent.sh.sample - .ifndef(ZABBIX_AGENT_ONLY) post-patch: @${REINPLACE_CMD} 's|%LOCALBASE%|${LOCALBASE}|' ${WRKSRC}/src/zabbix_sucker/zabbix_sucker.c @@ -106,18 +98,12 @@ do-install: .ifndef(ZABBIX_AGENT_ONLY) ${MKDIR} ${PREFIX}/share/zabbix ${MKDIR} ${PREFIX}/share/zabbix/create - ${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \ - ${PREFIX}/share/zabbix/create ${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix ${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create ${CP} -Rf ${WRKSRC}/upgrades/dbpatches ${PREFIX}/share/zabbix ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \ ${PREFIX}/share/zabbix/create - ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \ - ${PREFIX}/etc/rc.d .endif - ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \ - ${PREFIX}/etc/rc.d ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL .ifndef(ZABBIX_AGENT_ONLY) @${CAT} ${PKGMESSAGE} diff --git a/net-mgmt/zabbix/pkg-message b/net-mgmt/zabbix/files/pkg-message.in index 13c338ed4d4d..99c664bc233a 100644 --- a/net-mgmt/zabbix/pkg-message +++ b/net-mgmt/zabbix/files/pkg-message.in @@ -1,7 +1,7 @@ ==================================================== ACHTUNG!!! -Run dbsetup.sh from %PREFIX%/share/zabbix/create +Run dbsetup.sh from %%PREFIX%%/share/zabbix/create to setup database tables. Arguments, given to it will be passed to mysql client, allowing connection do non-local MySQL server diff --git a/net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample b/net-mgmt/zabbix/files/zabbix_agent.sh.in index 1001c6cb694f..3d6b3f081e1d 100644 --- a/net-mgmt/zabbix2/scripts/zabbix-agent.sh.sample +++ b/net-mgmt/zabbix/files/zabbix_agent.sh.in @@ -1,10 +1,6 @@ #!/bin/sh -prefix=%PREFIX% - -zabbix_agentd_enable="YES" - -. %LOCALBASE%/etc/rc.subr +. %%RC_SUBR%% name="zabbix_agentd" rcvar=`set_rcvar` diff --git a/net-mgmt/zabbix/scripts/zabbix.sh.sample b/net-mgmt/zabbix/files/zabbix_suckerd.sh.in index 01a0fbce27ef..e038375d80b8 100644 --- a/net-mgmt/zabbix/scripts/zabbix.sh.sample +++ b/net-mgmt/zabbix/files/zabbix_suckerd.sh.in @@ -1,10 +1,6 @@ #!/bin/sh -prefix=%PREFIX% - -zabbix_suckerd_enable="YES" - -. %LOCALBASE%/etc/rc.subr +. %%RC_SUBR%% name="zabbix_suckerd" rcvar=`set_rcvar` diff --git a/net-mgmt/zabbix/pkg-plist b/net-mgmt/zabbix/pkg-plist index e197b32ccfe6..c2c4ab66dfa5 100644 --- a/net-mgmt/zabbix/pkg-plist +++ b/net-mgmt/zabbix/pkg-plist @@ -3,8 +3,6 @@ etc/zabbix/zabbix_agentd.conf.sample etc/zabbix/zabbix_suckerd.conf.sample etc/zabbix/zabbix_trapper.conf.sample etc/zabbix/zabbix_trapperd.conf.sample -etc/rc.d/zabbix.sh.sample -etc/rc.d/zabbix-agent.sh.sample bin/zabbix_agent bin/zabbix_agentd bin/zabbix_sender diff --git a/net-mgmt/zabbix2/Makefile b/net-mgmt/zabbix2/Makefile index c5b62da6c941..25bf62306c5c 100644 --- a/net-mgmt/zabbix2/Makefile +++ b/net-mgmt/zabbix2/Makefile @@ -7,7 +7,7 @@ PORTNAME= zabbix PORTVERSION= 1.0 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES?= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -25,10 +25,10 @@ OPTIONS= PGSQL "Use a PostgreSQL backend" off \ .ifdef(ZABBIX_AGENT_ONLY) PKGNAMESUFFIX= -agent PLIST= ${MASTERDIR}/pkg-plist.agent -PKGMESSAGE= nonexistent .else # ZABBIX_AGENT_ONLY LIB_DEPENDS= netsnmp.7:${PORTSDIR}/net-mgmt/net-snmp USE_PHP= gd snmp sockets +SUB_FILES= pkg-message .endif # ZABBIX_AGENT_ONLY .include <bsd.port.pre.mk> @@ -55,10 +55,12 @@ CONFIGURE_ARGS= --with-mysql CONFIGURE_ARGS+=--with-net-snmp .endif # ZABBIX_AGENT_ONLY -PKGMESSAGE= ${WRKDIR}/pkg-message +USE_RC_SUBR= zabbix_agent.sh +.if !defined(ZABBIX_AGENT_ONLY) +USE_RC_SUBR+= zabbix_suckerd.sh +.endif USE_REINPLACE= yes -USE_RC_SUBR= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS=-I${LOCALBASE}/include @@ -69,17 +71,7 @@ ZABBIX_BINARIES+= zabbix_suckerd zabbix_trapper zabbix_trapperd ZABBIX_CONFIGS+= zabbix_suckerd.conf zabbix_trapper.conf zabbix_trapperd.conf .endif -SCRIPT_REGEX= -e 's|%PREFIX%|${PREFIX}|g' -e 's|%LOCALBASE%|${LOCALBASE}|g' - pre-patch: -.if !defined(ZABBIX_AGENT_ONLY) - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/pkg-message > ${PKGMESSAGE} - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/scripts/zabbix.sh.sample > \ - ${WRKDIR}/zabbix.sh.sample -.endif - @${SED} ${SCRIPT_REGEX} ${PKGDIR}/scripts/zabbix-agent.sh.sample > \ - ${WRKDIR}/zabbix-agent.sh.sample - .ifndef(ZABBIX_AGENT_ONLY) post-patch: @${REINPLACE_CMD} 's|%LOCALBASE%|${LOCALBASE}|' ${WRKSRC}/src/zabbix_sucker/zabbix_sucker.c @@ -106,18 +98,12 @@ do-install: .ifndef(ZABBIX_AGENT_ONLY) ${MKDIR} ${PREFIX}/share/zabbix ${MKDIR} ${PREFIX}/share/zabbix/create - ${INSTALL_DATA} ${MASTERDIR}/scripts/dbsetup.sh \ - ${PREFIX}/share/zabbix/create ${CP} -Rf ${WRKSRC}/frontends/* ${PREFIX}/share/zabbix ${CP} -Rf ${WRKSRC}/create/* ${PREFIX}/share/zabbix/create ${CP} -Rf ${WRKSRC}/upgrades/dbpatches ${PREFIX}/share/zabbix ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh \ ${PREFIX}/share/zabbix/create - ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix.sh.sample \ - ${PREFIX}/etc/rc.d .endif - ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/zabbix-agent.sh.sample \ - ${PREFIX}/etc/rc.d ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL .ifndef(ZABBIX_AGENT_ONLY) @${CAT} ${PKGMESSAGE} diff --git a/net-mgmt/zabbix2/pkg-message b/net-mgmt/zabbix2/files/pkg-message.in index 13c338ed4d4d..99c664bc233a 100644 --- a/net-mgmt/zabbix2/pkg-message +++ b/net-mgmt/zabbix2/files/pkg-message.in @@ -1,7 +1,7 @@ ==================================================== ACHTUNG!!! -Run dbsetup.sh from %PREFIX%/share/zabbix/create +Run dbsetup.sh from %%PREFIX%%/share/zabbix/create to setup database tables. Arguments, given to it will be passed to mysql client, allowing connection do non-local MySQL server diff --git a/net-mgmt/zabbix/scripts/zabbix-agent.sh.sample b/net-mgmt/zabbix2/files/zabbix_agent.sh.in index 1001c6cb694f..3d6b3f081e1d 100644 --- a/net-mgmt/zabbix/scripts/zabbix-agent.sh.sample +++ b/net-mgmt/zabbix2/files/zabbix_agent.sh.in @@ -1,10 +1,6 @@ #!/bin/sh -prefix=%PREFIX% - -zabbix_agentd_enable="YES" - -. %LOCALBASE%/etc/rc.subr +. %%RC_SUBR%% name="zabbix_agentd" rcvar=`set_rcvar` diff --git a/net-mgmt/zabbix2/scripts/zabbix.sh.sample b/net-mgmt/zabbix2/files/zabbix_suckerd.sh.in index 01a0fbce27ef..e038375d80b8 100644 --- a/net-mgmt/zabbix2/scripts/zabbix.sh.sample +++ b/net-mgmt/zabbix2/files/zabbix_suckerd.sh.in @@ -1,10 +1,6 @@ #!/bin/sh -prefix=%PREFIX% - -zabbix_suckerd_enable="YES" - -. %LOCALBASE%/etc/rc.subr +. %%RC_SUBR%% name="zabbix_suckerd" rcvar=`set_rcvar` diff --git a/net-mgmt/zabbix2/pkg-plist b/net-mgmt/zabbix2/pkg-plist index e197b32ccfe6..c2c4ab66dfa5 100644 --- a/net-mgmt/zabbix2/pkg-plist +++ b/net-mgmt/zabbix2/pkg-plist @@ -3,8 +3,6 @@ etc/zabbix/zabbix_agentd.conf.sample etc/zabbix/zabbix_suckerd.conf.sample etc/zabbix/zabbix_trapper.conf.sample etc/zabbix/zabbix_trapperd.conf.sample -etc/rc.d/zabbix.sh.sample -etc/rc.d/zabbix-agent.sh.sample bin/zabbix_agent bin/zabbix_agentd bin/zabbix_sender |