Selaa lähdekoodia

Commit files which were inadvertently omitted from the previous commit.

Eric Stanley 14 vuotta sitten
vanhempi
commit
48b42a6d1d
3 muutettua tiedostoa jossa 9 lisäystä ja 4 poistoa
  1. 1 0
      Makefile.am
  2. 1 1
      pkg/solaris/pkginfo.in
  3. 7 3
      pkg/solaris/solpkg

+ 1 - 0
Makefile.am

@@ -46,6 +46,7 @@ solpkg:
 	$(MAKE) all
 	$(MAKE) all
 	$(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
 	$(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
 	$(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
 	$(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
+	$(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
 	cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
 	cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
 
 
 THANKS: THANKS.in
 THANKS: THANKS.in

+ 1 - 1
pkg/solaris/pkginfo.in

@@ -1,4 +1,4 @@
-PKG="NAGplugin"
+PKG="NGOSplugin"
 NAME="nagios-plugins"
 NAME="nagios-plugins"
 DESC="Nagios network monitoring plugins"
 DESC="Nagios network monitoring plugins"
 ARCH="@PKG_ARCH@"
 ARCH="@PKG_ARCH@"

+ 7 - 3
pkg/solaris/solpkg

@@ -8,6 +8,7 @@ $pkgmk = "/usr/bin/pkgmk";
 $pkgtrans = "/usr/bin/pkgtrans";
 $pkgtrans = "/usr/bin/pkgtrans";
 $prototype = "prototype";
 $prototype = "prototype";
 $pkginfo = "pkginfo";
 $pkginfo = "pkginfo";
+$preinstall = "preinstall";
 $egrep = "/usr/bin/egrep";
 $egrep = "/usr/bin/egrep";
 
 
 # Sanity check
 # Sanity check
@@ -24,17 +25,19 @@ open (PREPROTO,"$find . -print |$egrep -v \"^\.(/usr(/local)?|/opt)?\$\" | $pkgp
 open (PROTO,">$prototype") ||
 open (PROTO,">$prototype") ||
 	die "Unable to write file prototype ($!)\n";
 	die "Unable to write file prototype ($!)\n";
 print PROTO "i pkginfo=./$pkginfo\n";
 print PROTO "i pkginfo=./$pkginfo\n";
+print PROTO "i preinstall=./$preinstall\n";
 while (<PREPROTO>) {
 while (<PREPROTO>) {
 	# Read in the prototype information
 	# Read in the prototype information
 	chomp;
 	chomp;
 	$thisline = $_;
 	$thisline = $_;
 	if ($thisline =~ " prototype "
 	if ($thisline =~ " prototype "
-	  or $thisline =~ " pkginfo ") {
+	  or $thisline =~ " pkginfo "
+	  or $thisline =~ " preinstall ") {
 	    # Don't do anything as they aren't important
 	    # Don't do anything as they aren't important
 	} elsif ($thisline =~ "^[fd] ") {
 	} elsif ($thisline =~ "^[fd] ") {
 	  # Change the ownership of files and directories
 	  # Change the ownership of files and directories
 	  ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
 	  ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
-	  print PROTO "$dir $none $file $mode bin bin\n";
+	  print PROTO "$dir $none $file $mode $user bin\n";
 	} else {
 	} else {
 	  # Symlinks and other stuff should be printed also
 	  # Symlinks and other stuff should be printed also
 	  print PROTO "$thisline\n";
 	  print PROTO "$thisline\n";
@@ -58,6 +61,7 @@ while (<PKGINFO>) {
 	$thisline = $_;
 	$thisline = $_;
 	($var,$value) = split /=/,$thisline;
 	($var,$value) = split /=/,$thisline;
 	if ("$var" eq "NAME" 
 	if ("$var" eq "NAME" 
+	  or "$var" eq "PKG"
 	  or "$var" eq "VERSION"
 	  or "$var" eq "VERSION"
 	  or "$var" eq "ARCH") {
 	  or "$var" eq "ARCH") {
 		$tmp = lc($var);
 		$tmp = lc($var);
@@ -77,5 +81,5 @@ $packagename = "$name-$version-$os-$arch-local";
 
 
 print "Building package\n";
 print "Building package\n";
 system ("$pkgmk -o -r `pwd` -d $pkgdevice");
 system ("$pkgmk -o -r `pwd` -d $pkgdevice");
-system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename)");
+system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename $pkg)");
 print "Done. ($packagename)\n";
 print "Done. ($packagename)\n";