Code

include getloadavg sources, add some Solaris pkg build support
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>
Fri, 25 Oct 2002 02:31:03 +0000 (02:31 +0000)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>
Fri, 25 Oct 2002 02:31:03 +0000 (02:31 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@158 f882894a-f735-0410-b71e-b25c423dba1c

Makefile.am
plugins/Makefile.am

index af0e86e9b0f32892ebe09f7c4fa7598b0fe34dad..9e0415e14f9f345e5f19f14714183afcd792a3c6 100644 (file)
@@ -3,7 +3,7 @@
 SUBDIRS = plugins plugins-scripts
 
 EXTRA_DIST = REQUIREMENTS acconfig.h subst.in subst.sh Helper.pm       \
-contrib nagios-plugins.spec.in
+contrib nagios-plugins.spec.in getloadavg.m4
 
 dist-hook:
        sed "s/PACKAGE_VERSION/@PACKAGE_VERSION@/;s/PACKAGE_RELEASE/@PACKAGE_RELEASE@/;" $(srcdir)/nagios-plugins.spec.in > $(distdir)/nagios-plugins.spec
@@ -11,3 +11,33 @@ dist-hook:
 test:
        cd plugins; $(MAKE) test
        cd plugins-scripts; $(MAKE) test
+
+# Solaris pkgmk
+PACKDIR=build-pkg
+VERSION=@PACKAGE_VERSION@
+
+Prototype:
+       if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
+       cd build-solaris
+       $(MAKE) all
+       $(MAKE) DESTDIR=../$(PACKDIR) install
+       cd ..
+       echo i pkginfo> Prototype
+       if [ -f checkinstall ] ; then echo i checkinstall>> Prototype; fi
+       if [ -f preinstall ] ; then echo i preinstall>> Prototype; fi
+       if [ -f postinstall ] ; then echo i postinstall>> Prototype; fi
+       pkgproto $(PACKDIR)=/ | sed -e "s|$(LOGNAME) $(GROUP)$$|root root|" | egrep -v "(s|d) none (/|/etc|/var|/usr|/usr/local) " >> Prototype
+
+pkgmap: ../Prototype
+       mkdir -p $(PACKDIR)/nagiosp
+       cd $(PACKDIR)/nagiosp
+       pkgmk -o -r / -f ../Prototype -d $(PACKDIR) nagiosp
+       cd ..
+
+nagios.SPARC.pkg.tar.gz: pkgmap
+       cd $(PACKDIR) && tar -cf - nagiosp | gzip -9 -c > ../nagiosp.SPARC.pkg.tar.gz
+
+pkgset: nagiosp.SPARC.pkg.tar.gz
+
+pkgclean:
+       rm -rf Prototype nagiosp.SPARC.pkg.tar.gz
index 420ed059b44acabb03caf62dc5d770b59b63c8cb..95258ed7a337b4e5321f7c38dc117a447bdab243 100644 (file)
@@ -15,7 +15,8 @@ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \
        check_swap check_fping check_ldap check_game check_dig \
        check_nagios check_by_ssh check_dns check_nt
 
-EXTRA_DIST = t utils.c netutils.c popen.c getopt.h getopt.c getopt1.c snprintf.c
+EXTRA_DIST = t utils.c netutils.c popen.c getopt.h getopt.c getopt1.c \
+       snprintf.c getloadavg.c
 
 PLUGINHDRS = common.h config.h