diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 760d8e79..02514aa0 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -18,19 +18,17 @@ nagios-plugins.spec: nagios-plugins.spec.in | |||
18 | sed "s/%%{VER}/${VER}/;s/%%{REL}/${REL}/;" $? > $@ | 18 | sed "s/%%{VER}/${VER}/;s/%%{REL}/${REL}/;" $? > $@ |
19 | 19 | ||
20 | # Solaris pkgmk | 20 | # Solaris pkgmk |
21 | BUILDDIR := $(shell pwd)/build-solaris | 21 | BUILDDIR = build-solaris |
22 | PACKDIR := $(shell pwd)/build-pkg | 22 | PACKDIR = build-pkg |
23 | PKGSCRIPT := $(shell pwd)/pkg/solaris/solpkg | 23 | PKGSCRIPT = pkg/solaris/solpkg |
24 | PKGPFX := $(shell echo ${prefix} |sed -e 's@^/usr/local@@') | ||
25 | VERSION=@PACKAGE_VERSION@ | ||
26 | 24 | ||
27 | solpkg: | 25 | solpkg: |
28 | if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi | 26 | if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi |
29 | if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi | 27 | if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi |
30 | $(MAKE) all | 28 | $(MAKE) all |
31 | $(MAKE) DESTDIR=$(BUILDDIR) prefix=$(PKGPFX) install | 29 | $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install |
32 | $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) | 30 | $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) |
33 | cd $(BUILDDIR) && $(PERL) $(PKGSCRIPT) $(PACKDIR) | 31 | cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) |
34 | 32 | ||
35 | pkgclean: | 33 | pkgclean: |
36 | rm -rf $(BUILDDIR) $(PACKDIR) | 34 | rm -rf $(BUILDDIR) $(PACKDIR) |