diff options
author | Steve Wills <swills@FreeBSD.org> | 2012-09-28 13:41:47 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2012-09-28 13:41:47 +0000 |
commit | 9a8d00c6351712084f12a1e7bb127a717dbbc543 (patch) | |
tree | 1058d088b07df4a5a967cbc78fed310b234e3a03 /net-mgmt/p5-FusionInventory-Agent | |
parent | 24329c088ef6423e9f2b5ed19129b8b552f67a03 (diff) |
Notes
Diffstat (limited to 'net-mgmt/p5-FusionInventory-Agent')
-rw-r--r-- | net-mgmt/p5-FusionInventory-Agent/Makefile | 27 | ||||
-rw-r--r-- | net-mgmt/p5-FusionInventory-Agent/files/patch-Makefile.PL | 15 | ||||
-rw-r--r-- | net-mgmt/p5-FusionInventory-Agent/pkg-plist | 3 |
3 files changed, 33 insertions, 12 deletions
diff --git a/net-mgmt/p5-FusionInventory-Agent/Makefile b/net-mgmt/p5-FusionInventory-Agent/Makefile index 99967cb1e00a..eb757c9eed02 100644 --- a/net-mgmt/p5-FusionInventory-Agent/Makefile +++ b/net-mgmt/p5-FusionInventory-Agent/Makefile @@ -15,18 +15,8 @@ PKGNAMEPREFIX= p5- MAINTAINER= g.veniamin@googlemail.com COMMENT= Agent for OCS Inventory server and FusionInventory for GLPI servers -OPTIONS= CUPS "Enable CUPS" OFF \ - HTTP "Enable HTTP daemon mode" OFF \ - ZLIB "Enable Zlib compression" ON \ - SSL "Enable SSL" OFF \ - DMIDECODE "Enable dmidecode hardware information" ON \ - PCIUTILS "Enable pciutils hardware information" ON \ - NMAP "Enable NMAP network inventory" OFF - LICENSE= GPLv2 -USE_GMAKE= yes - BUILD_DEPENDS= p5-Text-Template>=0:${PORTSDIR}/textproc/p5-Text-Template \ p5-ExtUtils-MakeMaker>=6.59:${PORTSDIR}/devel/p5-ExtUtils-MakeMaker \ p5-UNIVERSAL-require>=0:${PORTSDIR}/devel/p5-UNIVERSAL-require \ @@ -36,7 +26,6 @@ BUILD_DEPENDS= p5-Text-Template>=0:${PORTSDIR}/textproc/p5-Text-Template \ p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ p5-File-Which>=0:${PORTSDIR}/sysutils/p5-File-Which RUN_DEPENDS:= ${BUILD_DEPENDS} - TEST_DEPENDS= p5-Test-Exception>=0:${PORTSDIR}/devel/p5-Test-Exception \ p5-Test-MockModule>=0:${PORTSDIR}/devel/p5-Test-MockModule \ p5-HTTP-Server-Simple>=0:${PORTSDIR}/www/p5-HTTP-Server-Simple \ @@ -44,9 +33,18 @@ TEST_DEPENDS= p5-Test-Exception>=0:${PORTSDIR}/devel/p5-Test-Exception \ p5-HTTP-Proxy>=0:${PORTSDIR}/www/p5-HTTP-Proxy \ p5-IPC-Run>=0:${PORTSDIR}/devel/p5-IPC-Run \ p5-YAML>=0:${PORTSDIR}/textproc/p5-YAML \ - p5-IO-Capture>=0:${PORTSDIR}/devel/p5-IO-Capture \ + p5-IO-Capture>=0:${PORTSDIR}/devel/p5-IO-Capture + +OPTIONS= CUPS "Enable CUPS" OFF \ + HTTP "Enable HTTP daemon mode" OFF \ + ZLIB "Enable Zlib compression" ON \ + SSL "Enable SSL" OFF \ + DMIDECODE "Enable dmidecode hardware information" ON \ + PCIUTILS "Enable pciutils hardware information" ON \ + NMAP "Enable NMAP network inventory" OFF PERL_CONFIGURE= yes +USE_GMAKE= yes MAN1= fusioninventory-agent.1 \ fusioninventory-injector.1 @@ -125,4 +123,9 @@ post-patch-script: @${FIND} ${WRKSRC} -type f \( -name '*.orig' \) -delete @${ECHO_MSG} " [ DONE ]" +post-install: + @if [ ! -f ${PREFIX}/etc/fusioninventory/agent.cfg ]; then \ + ${CP} -p ${PREFIX}/etc/fusioninventory/agent.cfg.sample ${PREFIX}/etc/fusioninventory/agent.cfg ; \ + fi + .include <bsd.port.post.mk> diff --git a/net-mgmt/p5-FusionInventory-Agent/files/patch-Makefile.PL b/net-mgmt/p5-FusionInventory-Agent/files/patch-Makefile.PL new file mode 100644 index 000000000000..c5f3dd4c4091 --- /dev/null +++ b/net-mgmt/p5-FusionInventory-Agent/files/patch-Makefile.PL @@ -0,0 +1,15 @@ +--- Makefile.PL.orig 2012-09-27 23:53:24.000000000 +0000 ++++ Makefile.PL 2012-09-27 23:55:38.000000000 +0000 +@@ -151,11 +151,7 @@ + + config_install : + install -d -m 755 $(DESTDIR)$(SYSCONFDIR) +- if [ -f $(DESTDIR)/$(SYSCONFDIR)/agent.cfg ]; then \ +- install -m 644 etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg.new; \ +- else \ +- install -m 644 etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg; \ +- fi ++ install -m 644 etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg.sample + + data_install : + install -d -m 755 $(DESTDIR)$(DATADIR) diff --git a/net-mgmt/p5-FusionInventory-Agent/pkg-plist b/net-mgmt/p5-FusionInventory-Agent/pkg-plist index 29098233fcdf..1c0605d58d7c 100644 --- a/net-mgmt/p5-FusionInventory-Agent/pkg-plist +++ b/net-mgmt/p5-FusionInventory-Agent/pkg-plist @@ -1,5 +1,8 @@ bin/fusioninventory-agent bin/fusioninventory-injector +@unexec if cmp -s %D/etc/fusioninventory/agent.cfg.sample %D/etc/fusioninventory/agent.cfg; then rm -f %D/etc/fusioninventory/agent.cfg; fi +etc/fusioninventory/agent.cfg.sample +@exec if [ ! -f %D/etc/fusioninventory/agent.cfg ] ; then cp -p %D/etc/fusioninventory/agent.cfg.sample %D/etc/fusioninventory/agent.cfg; fi share/fusioninventory/lib/FusionInventory/Agent.pm share/fusioninventory/lib/FusionInventory/Agent/Config.pm share/fusioninventory/lib/FusionInventory/Agent/HTTP/Client.pm |