--- build-solaris-package	Fri Nov  5 11:54:38 2004
+++ build-solaris-package2	Fri Nov  5 11:53:05 2004
@@ -14,11 +14,9 @@
    set -x # be verbose
 fi
 
-
 # TMP is where we are temporarily installing the package to
 TMP=`pwd`/pkgroot
 
-
 # PKG is the internal and external name for the package
 PKG=OSSsnmp
 
@@ -29,8 +27,6 @@
 # VARDIR is the persistent dir from configure
 VARDIR=/var/snmp/agent
 
-expandedprefix=${TMP}/${prefix}
-
 PERL=${PERL:=`which perl`}
 MAKE=${MAKE:=`which make`}
 
@@ -40,7 +36,7 @@
 
 # install to temporary package build root
 cd ../..
-$MAKE install prefix=${expandedprefix} exec_prefix=${expandedprefix} || exit 1
+$MAKE install INSTALL_PREFIX=${TMP} || exit 1
 
 # We now have the main software installed, copy over the auxillary files
 cd -
@@ -54,11 +50,6 @@
 LD_LIBRARY_PATH=$TMP$prefix/lib:$LD_LIBRARY_PATH $TMP/$prefix/bin/snmptranslate\
   -M$TMP/$prefix/share/snmp/mibs -m SNMPv2-SMI .1 >&- || exit $? # create MIB index
 
-# to be honest: I dont know if below is still necessary - it used to be
-chmod 0755 `find $TMP -type d` # directories
-chmod 0755 `file \`find $TMP -type f\` | sed 's/:	/;/' | egrep ';ELF |;executable' | cut -d';' -f1`
-chmod 0644 `file \`find $TMP -type f\` | sed 's/:	/;/' | egrep -v ';ELF |;executable' | cut -d';' -f1`
-
 # package
 version=`../../net-snmp-config --version`
 os=`uname -s`
@@ -91,7 +82,7 @@
 #i postinstall=./preinstall-postremove
 i depend
 # set default mode, owner and group
-! default 0644 bin bin
+! default 0644 root sys
 d snmp /etc 0755 root sys
 d snmp /etc/init.d 0755 root sys
 f snmp /etc/init.d/snmpd=./snmpd-init.d 0755 root sys
@@ -112,7 +103,6 @@
    rm -rf snmpd-init.d $PKG $TMP pkginfo prototype depend 
 fi
 
-
 echo "build was successfull"
 exit 0
 
