svn commit: samba r4029 - in branches/SAMBA_3_0/packaging/Solaris: .

jerry at samba.org jerry at samba.org
Wed Dec 1 21:01:27 GMT 2004


Author: jerry
Date: 2004-12-01 21:01:27 +0000 (Wed, 01 Dec 2004)
New Revision: 4029

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4029

Log:
solaris packaging fixes from Rob
Modified:
   branches/SAMBA_3_0/packaging/Solaris/makepkg.sh


Changeset:
Modified: branches/SAMBA_3_0/packaging/Solaris/makepkg.sh
===================================================================
--- branches/SAMBA_3_0/packaging/Solaris/makepkg.sh	2004-12-01 20:11:31 UTC (rev 4028)
+++ branches/SAMBA_3_0/packaging/Solaris/makepkg.sh	2004-12-01 21:01:27 UTC (rev 4029)
@@ -48,9 +48,11 @@
 	echo f none lib/libsmbclient.so 0755 root other
 	echo f none include/libsmbclient.h 0644 root other
 
-	echo "#\n# smbwrapper\n#"
-	echo f none lib/smbwrapper.so 0755 root other
-	echo f none bin/smbsh 0755 root other
+	if [ -f lib/smbwrapper.so -a -f bin/smbsh ]; then
+		echo "#\n# smbwrapper\n#"
+		echo f none lib/smbwrapper.so 0755 root other
+		echo f none bin/smbsh 0755 root other
+	fi
 
 	echo "#\n# nss_winbind.so\n#"
 	echo f none /lib/nss_winbind.so.1=lib/nss_winbind.so.1 0755 root other
@@ -100,13 +102,14 @@
 ## BEGIN MAIN 
 #####################################################################
 
-TMPINSTALLDIR=/export/build
-
 # Try to guess the distribution base..
-CURR_DIR=`pwd`
-DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'`
-echo "Assuming Samba distribution is rooted at $DISTR_BASE.."
+DISTR_BASE=`dirname \`pwd\` |sed -e 's@/packaging$@@'`
+echo "Distribution base:  $DISTR_BASE"
 
+TMPINSTALLDIR="/tmp/`basename $DISTR_BASE`-build"
+echo "Temp install dir:   $TMPINSTALLDIR"
+echo "Install directory:  $INSTALL_BASE"
+
 ##
 ## first build the source
 ##
@@ -114,7 +117,7 @@
 cd $DISTR_BASE/source
 
 if [ "x$1" != "xnobuild" ]; then
-	./configure --prefix=$INSTALL_DIR \
+	./configure --prefix=$INSTALL_BASE \
 		--with-acl-support \
 		--with-included-popt \
 		--localstatedir=/var/lib/samba \
@@ -130,11 +133,11 @@
 	fi
 fi
 	
+mkdir $TMPINSTALLDIR
 make DESTDIR=$TMPINSTALLDIR install
 
 ## clear out *.old
-( cd $TMPINSTALLDIR; du -a | grep \.old$ | awk '{print "rm -rf "$2}' | sh )
-
+find $TMPINSTALLDIR -name \*.old |while read x; do rm -rf "$x"; done
  
 ##
 ## Now get the install locations
@@ -157,10 +160,13 @@
 if [ -f nsswitch/pam_winbind.so ]; then
 	cp -fp nsswitch/pam_winbind.so $TMPINSTALLDIR/$LIBDIR/pam_winbind.so
 fi
+if [ -f bin/smbwrapper.so ]; then
+	cp -fp bin/smbwrapper.so $TMPINSTALLDIR/$INSTALL_BASE/lib
+fi
+if [ -f bin/smbsh ]; then
+	cp -fp bin/smbsh $TMPINSTALLDIR/$INSTALL_BASE/bin
+fi
 
-cp -p bin/smbwrapper.so $TMPINSTALLDIR/$INSTALL_BASE/lib
-cp -p bin/smbsh $TMPINSTALLDIR/$INSTALL_BASE/bin
-
 mkdir -p $TMPINSTALLDIR/$INSTALL_BASE/docs
 cp -p ../docs/*pdf $TMPINSTALLDIR/$INSTALL_BASE/docs
 



More information about the samba-cvs mailing list