sync up packaging scripts
[kai/samba.git] / packaging / SGI / mkrelease.sh
index a85a64569bc243e592202660ce8dc9bede073366..7412a02d4f9653434f19b7a30c7cd50cbd7e564c 100755 (executable)
@@ -7,8 +7,8 @@
 # You can specify clean to do a make clean before building. Make clean
 # will also run configure and generate the required Makefile.
 #
-# You can specify which targets to build. If targets are specified, the
-# specified targets will be built but inst packages will not be generated.
+# This will build an smbd.noquota, smbd.profile, nmbd.profile and the
+# entire package with quota support and acl support.
 
 doclean=""
 SGI_ABI=-n32
@@ -31,6 +31,7 @@ if [ "$doclean" = "clean" ]; then
   if [ -f Makefile ]; then
     make distclean
   fi
+  rm -rf bin/*.profile bin/*.noquota
   cd ../packaging/SGI
   rm -rf bins catman html codepages swat samba.idb samba.spec
 fi
@@ -50,7 +51,7 @@ fi
 cd ../../source
 if [ "$doclean" = "clean" ]; then
   echo Create SGI specific Makefile
-  ./configure --prefix=/usr/samba --sbindir='${exec_prefix}/bin' --mandir=/usr/share/catman --with-acl-support
+  ./configure --prefix=/usr/samba --sbindir=/usr/samba/bin --mandir=/usr/share/catman --with-acl-support --with-quotas --with-smbwrapper
   errstat=$?
   if [ $errstat -ne 0 ]; then
     echo "Error $errstat creating Makefile\n";
@@ -63,6 +64,7 @@ fi
 #
 echo Making binaries
 
+echo "=====================  Making Profile versions ======================="
 make clean
 make headers
 make -P "CFLAGS=-O -g3 -D WITH_PROFILE" bin/smbd bin/nmbd
@@ -74,7 +76,9 @@ fi
 mv  bin/smbd bin/smbd.profile
 mv  bin/nmbd bin/nmbd.profile
 
+echo "=====================  Making No Quota versions ======================="
 make clean
+make headers
 make -P "CFLAGS=-O -g3 -D QUOTAOBJS=smbd/noquotas.o" bin/smbd
 errstat=$?
 if [ $errstat -ne 0 ]; then
@@ -83,7 +87,21 @@ if [ $errstat -ne 0 ]; then
 fi
 mv  bin/smbd bin/smbd.noquota
 
-make -P "CFLAGS=-O -g3" all
+echo "=====================  Making smbwrapper.32.so ======================="
+# cannot use -mips3 with 32 bit shared libraries so reset the ISA variable
+# just for this object
+ISA=
+export ISA
+make -P "CFLAGS=-O -g3" bin/smbwrapper.32.so
+errstat=$?
+if [ $errstat -ne 0 ]; then
+  echo "Error $errstat building sources\n";
+  exit $errstat;
+fi
+ISA=-mips3
+export ISA
+echo "=====================  Making Regular versions ======================="
+make -P "CFLAGS=-O -g3" all nsswitch/libnss_wins.so
 errstat=$?
 if [ $errstat -ne 0 ]; then
   echo "Error $errstat building sources\n";
@@ -92,13 +110,6 @@ fi
 
 cd ../packaging/SGI
 
-#
-# Don't generate packages if targets were specified
-#
-if [ "$1" != "" ]; then
-  exit 0;
-fi
-
 # generate the packages
 #
 echo Generating Inst Packages