aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am12
-rw-r--r--pkg/solaris/pkginfo.in2
-rwxr-xr-xpkg/solaris/solpkg2
3 files changed, 7 insertions, 9 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
sed "s/%%{VER}/${VER}/;s/%%{REL}/${REL}/;" $? > $@
# Solaris pkgmk
-BUILDDIR := $(shell pwd)/build-solaris
-PACKDIR := $(shell pwd)/build-pkg
-PKGSCRIPT := $(shell pwd)/pkg/solaris/solpkg
-PKGPFX := $(shell echo ${prefix} |sed -e 's@^/usr/local@@')
-VERSION=@PACKAGE_VERSION@
+BUILDDIR = build-solaris
+PACKDIR = build-pkg
+PKGSCRIPT = pkg/solaris/solpkg
solpkg:
if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
$(MAKE) all
- $(MAKE) DESTDIR=$(BUILDDIR) prefix=$(PKGPFX) install
+ $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
$(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
- cd $(BUILDDIR) && $(PERL) $(PKGSCRIPT) $(PACKDIR)
+ cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
pkgclean:
rm -rf $(BUILDDIR) $(PACKDIR)
diff --git a/pkg/solaris/pkginfo.in b/pkg/solaris/pkginfo.in
index 9211fcf8..c9dcced0 100644
--- a/pkg/solaris/pkginfo.in
+++ b/pkg/solaris/pkginfo.in
@@ -7,6 +7,6 @@ CATEGORY="application"
VENDOR="Nagios Plugin Development Team"
EMAIL="nagiosplug-devel@lists.sourceforge.net"
PSTAMP="nag@REV_TIMESTAMP@"
-BASEDIR="/usr/local"
+BASEDIR="/"
CLASSES="none"
diff --git a/pkg/solaris/solpkg b/pkg/solaris/solpkg
index 0b82bce0..00846d09 100755
--- a/pkg/solaris/solpkg
+++ b/pkg/solaris/solpkg
@@ -18,7 +18,7 @@ if ($pwd =~ '\/usr\/local') {
die "Wrong location, please cd to <PKGBASE>/usr/local/ and run again.\n"
if ($pwd eq "");
-open (PREPROTO,"$find . -print |$pkgproto |") ||
+open (PREPROTO,"$find . -print |$egrep -v \"^.(/usr(/local)|/opt)?\$\" | $pkgproto |") ||
die "Unable to read prototype information ($!)\n";
open (PROTO,">$prototype") ||
die "Unable to write file prototype ($!)\n";