Add CPE support. While here, modernize plist and use @sample

This commit is contained in:
Mark Felder 2014-10-07 19:51:33 +00:00
parent bfa6325392
commit bc85500b87
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370392
3 changed files with 18 additions and 28 deletions

View File

@ -20,7 +20,9 @@ XYMONUSER?= xymon
XYMONHOSTIP?= 127.0.0.1
MAKE_JOBS_UNSAFE= yes
USES= gmake
USES= cpe gmake
CPE_VENDOR= xymon
CPE_PRODUCT= xymon
CONFIGURE_ENV= MAKE=${MAKE_CMD}
MAKE_ENV+= XYMONUSER="${XYMONUSER}"
MAKE_ENV+= XYMONHOSTIP="${XYMONHOSTIP}"
@ -35,10 +37,4 @@ CONFIG_FILES= clientlaunch.cfg xymonclient.cfg localclient.cfg
do-configure:
${CP} ${FILESDIR}/Makefile ${WRKSRC}/
post-install:
.for i in ${CONFIG_FILES}
${CP} -np ${STAGEDIR}${WWWDIR}/etc/${i}.DIST \
${STAGEDIR}${WWWDIR}/etc/${i} || ${TRUE}
.endfor
.include <bsd.port.mk>

View File

@ -5,7 +5,7 @@
if test ! -d $(INSTALLROOT)$(XYMONHOME)/ext ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/ext ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/ext ; fi
if test ! -d $(INSTALLROOT)$(XYMONHOME)/local ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)/local ; chmod 755 $(INSTALLROOT)$(XYMONHOME)/local; fi
- if test ! -f $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg ; then cp localclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/ ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg; fi
+ if test ! -f $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.DIST ; then cp localclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.DIST ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.DIST; fi
+ if test ! -f $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.sample ; then cp localclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.sample ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/localclient.cfg.sample; fi
if test ! -f $(INSTALLROOT)$(XYMONHOME)/local/README; then cp README-local $(INSTALLROOT)$(XYMONHOME)/local/README ; chmod 644 $(INSTALLROOT)$(XYMONHOME)/local/README; fi
chmod 755 runclient.sh $(PROGRAMS) xymonclient*.sh $(COMMONTOOLS) $(EXTRATOOLS)
cp -fp runclient.sh $(INSTALLROOT)$(XYMONHOME)
@ -14,9 +14,9 @@
- ../build/merge-sects clientlaunch.cfg $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg
- ../build/merge-lines xymonclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg
- chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg
+ ../build/merge-sects clientlaunch.cfg $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg.DIST
+ ../build/merge-lines xymonclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg.DIST
+ chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg.DIST $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg.DIST
+ ../build/merge-sects clientlaunch.cfg $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg.sample
+ ../build/merge-lines xymonclient.cfg $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg.sample
+ chmod 644 $(INSTALLROOT)$(XYMONHOME)/etc/clientlaunch.cfg.sample $(INSTALLROOT)$(XYMONHOME)/etc/xymonclient.cfg.sample
ifndef PKGBUILD
chown -R $(XYMONUSER) $(INSTALLROOT)$(XYMONHOME)

View File

@ -22,26 +22,20 @@
%%WWWDIR%%/client/bin/xymonlaunch
%%WWWDIR%%/client/bin/logfetch
%%WWWDIR%%/client/bin/msgcache
@unexec if cmp -s %D/%%WWWDIR%%/client/etc/clientlaunch.cfg %D/%%WWWDIR%%/client/etc/clientlaunch.cfg.DIST; then rm -f %D/%%WWWDIR%%/client/etc/clientlaunch.cfg; fi
@unexec if cmp -s %D/%%WWWDIR%%/client/etc/xymonclient.cfg %D/%%WWWDIR%%/client/etc/xymonclient.cfg.DIST; then rm -f %D/%%WWWDIR%%/client/etc/xymonclient.cfg; fi
@unexec if cmp -s %D/%%WWWDIR%%/client/etc/localclient.cfg %D/%%WWWDIR%%/client/etc/localclient.cfg.DIST; then rm -f %D/%%WWWDIR%%/client/etc/localclient.cfg; fi
%%WWWDIR%%/client/etc/clientlaunch.cfg.DIST
@exec [ ! -f %B/clientlaunch.cfg ] && cp %B/%f %B/clientlaunch.cfg
%%WWWDIR%%/client/etc/xymonclient.cfg.DIST
@exec [ ! -f %B/xymonclient.cfg ] && cp %B/%f %B/xymonclient.cfg
%%WWWDIR%%/client/etc/localclient.cfg.DIST
@exec [ ! -f %B/localclient.cfg ] && cp %B/%f %B/localclient.cfg
@sample %%WWWDIR%%/client/etc/clientlaunch.cfg.sample
@sample %%WWWDIR%%/client/etc/xymonclient.cfg.sample
@sample %%WWWDIR%%/client/etc/localclient.cfg.sample
%%WWWDIR%%/client/local/README
%%WWWDIR%%/client/runclient.sh
@exec chown -R %%XYMONUSER%% %D/%%WWWDIR%%/client
@exec mkdir -p %D/%%WWWDIR%%/client/ext
@exec mkdir -p %D/%%WWWDIR%%/client/logs
@exec mkdir -p %D/%%WWWDIR%%/client/tmp
@dirrm %%WWWDIR%%/client/tmp
@dirrm %%WWWDIR%%/client/logs
@dirrm %%WWWDIR%%/client/local
@dirrm %%WWWDIR%%/client/ext
@dirrm %%WWWDIR%%/client/etc
@dirrm %%WWWDIR%%/client/bin
@dirrm %%WWWDIR%%/client
@dirrmtry %%WWWDIR%%
@dir %%WWWDIR%%/client/tmp
@dir %%WWWDIR%%/client/logs
@dir %%WWWDIR%%/client/local
@dir %%WWWDIR%%/client/ext
@dir %%WWWDIR%%/client/etc
@dir %%WWWDIR%%/client/bin
@dir %%WWWDIR%%/client
@dir %%WWWDIR%%