1997-09-05 02:28:41 +00:00
#!/bin/sh
1997-10-31 17:33:04 +00:00
# This file goes through all the necessary steps to build a release package.
1998-11-16 16:36:57 +00:00
# syntax:
2001-08-21 23:56:04 +00:00
# mkrelease.sh [clean]
1998-11-16 16:36:57 +00:00
#
# You can specify clean to do a make clean before building. Make clean
# will also run configure and generate the required Makefile.
#
2001-12-22 00:54:10 +00:00
# This will build an smbd.noquota, smbd.profile, nmbd.profile and the
# entire package with quota support and acl support.
1997-10-31 17:33:04 +00:00
1998-05-08 17:30:48 +00:00
doclean = ""
1998-10-29 01:15:14 +00:00
SGI_ABI = -n32
1999-12-13 13:27:58 +00:00
ISA = -mips3
1998-11-10 21:58:19 +00:00
CC = cc
1998-05-08 17:30:48 +00:00
1998-11-16 16:36:57 +00:00
if [ ! -f ../../source/Makefile ] ; then
doclean = "clean"
fi
2002-04-02 05:54:55 +00:00
if [ " $1 " = "clean" ] || [ " $1 " = "cleanonly" ] ; then
1998-05-08 17:30:48 +00:00
doclean = $1
shift
fi
1999-12-13 13:27:58 +00:00
export SGI_ABI ISA CC
1998-11-16 13:47:22 +00:00
2002-04-02 05:54:55 +00:00
if [ " $doclean " = "clean" ] || [ " $doclean " = "cleanonly" ] ; then
1998-04-29 13:45:27 +00:00
cd ../../source
1998-10-29 01:15:14 +00:00
if [ -f Makefile ] ; then
make distclean
fi
2001-12-22 00:54:10 +00:00
rm -rf bin/*.profile bin/*.noquota
1998-04-29 13:45:27 +00:00
cd ../packaging/SGI
1998-05-08 17:30:48 +00:00
rm -rf bins catman html codepages swat samba.idb samba.spec
2002-04-02 05:54:55 +00:00
if [ " $doclean " = "cleanonly" ] ; then exit 0 ; fi
1998-04-29 13:45:27 +00:00
fi
1997-09-05 02:28:41 +00:00
# create the catman versions of the manual pages
#
1998-10-29 01:15:14 +00:00
if [ " $doclean " = "clean" ] ; then
echo Making manual pages
./mkman
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat making manual pages\n " ;
exit $errstat ;
fi
1997-12-01 14:50:52 +00:00
fi
1997-09-05 02:28:41 +00:00
1998-08-07 18:56:12 +00:00
cd ../../source
1998-11-16 16:36:57 +00:00
if [ " $doclean " = "clean" ] ; then
1998-10-29 01:15:14 +00:00
echo Create SGI specific Makefile
2001-12-22 00:54:10 +00:00
./configure --prefix= /usr/samba --sbindir= /usr/samba/bin --mandir= /usr/share/catman --with-acl-support --with-quotas --with-smbwrapper
1998-10-29 01:15:14 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating Makefile\n " ;
exit $errstat ;
fi
1997-12-01 14:50:52 +00:00
fi
1998-08-07 18:56:12 +00:00
# build the sources
#
echo Making binaries
2001-12-22 00:54:10 +00:00
echo "===================== Making Profile versions ======================="
2001-08-21 23:56:04 +00:00
make clean
2001-12-05 21:49:51 +00:00
make headers
2002-02-07 20:09:17 +00:00
make -P "CFLAGS=-O -g3 -woff 1188 -D WITH_PROFILE" bin/smbd bin/nmbd
2001-08-21 23:56:04 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat building profile sources\n " ;
exit $errstat ;
fi
mv bin/smbd bin/smbd.profile
mv bin/nmbd bin/nmbd.profile
2001-12-05 21:49:51 +00:00
2001-12-22 00:54:10 +00:00
echo "===================== Making No Quota versions ======================="
2001-08-21 23:56:04 +00:00
make clean
2001-12-22 00:54:10 +00:00
make headers
2002-02-07 20:09:17 +00:00
make -P "CFLAGS=-O -g3 -woff 1188 -D QUOTAOBJS=smbd/noquotas.o" bin/smbd
2001-12-05 21:49:51 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat building noquota sources\n " ;
exit $errstat ;
fi
mv bin/smbd bin/smbd.noquota
2001-12-22 00:54:10 +00:00
echo "===================== Making Regular versions ======================="
2002-04-02 05:54:55 +00:00
make -P "CFLAGS=-O -g3 -woff 1188" all libsmbclient
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat building sources\n " ;
exit $errstat ;
fi
1997-09-05 02:28:41 +00:00
cd ../packaging/SGI
# generate the packages
#
echo Generating Inst Packages
1997-10-31 17:33:04 +00:00
./spec.pl # create the samba.spec file
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating samba.spec\n " ;
exit $errstat ;
fi
1997-10-31 17:33:04 +00:00
./idb.pl # create the samba.idb file
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating samba.idb\n " ;
exit $errstat ;
fi
2003-08-15 02:28:59 +00:00
sort +4 samba.idb > xxx
mv xxx samba.idb
1997-12-01 14:50:52 +00:00
1997-09-05 02:28:41 +00:00
if [ ! -d bins ] ; then
mkdir bins
fi
1997-10-31 17:33:04 +00:00
# do the packaging
1998-08-07 19:01:59 +00:00
/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all
1997-09-05 02:28:41 +00:00