Makefile.in 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ###################################
  2. # Makefile for NRPE Solaris Package
  3. #
  4. # Last Modified: 2 Dec 2011
  5. ###################################
  6. TARGET_OS=@TARGET_OS@
  7. TARGET_VER=@TARGET_VER@
  8. TARGET_ARCH=@TARGET_ARCH@
  9. TARGET_PLATFORM=@TARGET_PLATFORM@
  10. SOLARIS_CONFIG_OPTS=--prefix=/opt/nagios --sysconfdir=/etc/nagios --enable-command-args
  11. PKG_NAME=NGOSnrpe
  12. PKG_VERSION=@PKG_VERSION@
  13. PKG_FILE=@PACKAGE_NAME@-$(PKG_VERSION)-$(TARGET_PLATFORM)-$(TARGET_ARCH)-local
  14. TOPDIR=@top_builddir@
  15. PKGDIR=@builddir@/pkg
  16. SRCDIR=@builddir@/build/src
  17. INSTALLDIR=@builddir@/install
  18. ABSINSTALLDIR=@abs_builddir@/install
  19. build:
  20. if [ ! -d build ] ; then mkdir build ; fi
  21. if [ ! -d install ] ; then mkdir install ; fi
  22. cd build; ../../../configure $(SOLARIS_CONFIG_OPTS); $(MAKE) all; DESTDIR=$(ABSINSTALLDIR) $(MAKE) install install-daemon-config
  23. prototype: $(PKGDIR)
  24. @echo "i pkginfo" > $(PKGDIR)/prototype
  25. @echo "i copyright=../$(TOPDIR)/LEGAL" >> $(PKGDIR)/prototype
  26. @echo "i preinstall" >> $(PKGDIR)/prototype
  27. @echo "i i.config" >> $(PKGDIR)/prototype
  28. @echo "i r.config" >> $(PKGDIR)/prototype
  29. @echo "i i.manifest=/usr/sadm/install/scripts/i.manifest" >> $(PKGDIR)/prototype
  30. @echo "i r.manifest=/usr/sadm/install/scripts/r.manifest" >> $(PKGDIR)/prototype
  31. @echo "d none /etc/nagios 0755 nagios nagios" >> $(PKGDIR)/prototype
  32. @echo "f config /etc/nagios/nrpe.cfg=$(INSTALLDIR)/etc/nagios/nrpe.cfg 0600 nagios nagios" >> $(PKGDIR)/prototype
  33. @echo "d none /opt/nagios/bin 0755 nagios bin" >> $(PKGDIR)/prototype
  34. @echo "f none /opt/nagios/bin/nrpe=$(SRCDIR)/nrpe 0755 nagios bin" >> $(PKGDIR)/prototype
  35. @echo "d none /opt/nagios/libexec 0755 nagios bin" >> $(PKGDIR)/prototype
  36. @echo "f none /opt/nagios/libexec/check_nrpe=$(SRCDIR)/check_nrpe 0755 nagios bin" >> $(PKGDIR)/prototype
  37. @echo "f none /lib/svc/method/nrpe=$(PKGDIR)/nrpe 0555 root bin" >> $(PKGDIR)/prototype
  38. @echo "d none /var/svc/manifest/application/nagios 0755 root sys" >> $(PKGDIR)/prototype
  39. @echo "f manifest /var/svc/manifest/application/nagios/nrpe.xml=$(PKGDIR)/nrpe.xml 0444 root sys" >> $(PKGDIR)/prototype
  40. pkginfo: $(PKGDIR)
  41. @echo PKG="$(PKG_NAME)" > $(PKGDIR)/pkginfo
  42. @echo NAME="Nagios Remote Plugin Executor $(PKG_VERSION)" >> $(PKGDIR)/pkginfo
  43. @echo VERSION="$(PKG_VERSION)" >> $(PKGDIR)/pkginfo
  44. @echo ARCH="$(TARGET_ARCH)" >> $(PKGDIR)/pkginfo
  45. @echo CATEGORY="utility" >> $(PKGDIR)/pkginfo
  46. @echo CLASSES="none config manifest" >> $(PKGDIR)/pkginfo
  47. @echo VENDOR="www.nagios.org" >> $(PKGDIR)/pkginfo
  48. @echo EMAIL="nagios-users@lists.sourceforge.net" >> $(PKGDIR)/pkginfo
  49. @echo ISTATES="S s 1 2 3" >> $(PKGDIR)/pkginfo
  50. @echo RSTATES="S s 1 2 3" >> $(PKGDIR)/pkginfo
  51. @echo BASEDIR="/" >> $(PKGDIR)/pkginfo
  52. $(PKG_FILE): pkginfo prototype
  53. pkgmk -o -d $(PKGDIR) -f $(PKGDIR)/prototype -r .
  54. pkgtrans ./pkg $(PKG_FILE) $(PKG_NAME)
  55. pkg: $(PKG_FILE)
  56. all: pkg
  57. clean:
  58. rm -rf build install package
  59. rm -rf $(PKGDIR)/$(PKG_NAME)
  60. rm -f $(PKGDIR)/prototype $(PKGDIR)/pkginfo
  61. rm -f $(PKGDIR)/$(PKG_FILE)
  62. rm -f core
  63. rm -f *~ */*~
  64. distclean: clean
  65. rm -f Makefile
  66. rm -f config.log
  67. devclean: distclean