summaryrefslogtreecommitdiff
path: root/packaging/RedHat
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-07-16 05:34:56 +0000
committerGerald Carter <jerry@samba.org>2003-07-16 05:34:56 +0000
commit4a090ba06a54f5da179ac02bb307cc03d08831bf (patch)
treeed652ef36be7f16682c358816334f969a22f1c27 /packaging/RedHat
parent95fe82670032a3a43571b46d7bbf2c26bc8cdcd9 (diff)
downloadsamba-4a090ba06a54f5da179ac02bb307cc03d08831bf.tar.gz
samba-4a090ba06a54f5da179ac02bb307cc03d08831bf.tar.bz2
samba-4a090ba06a54f5da179ac02bb307cc03d08831bf.zip
trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE (This used to be commit adb98e7b7cd0f025b52c570e4034eebf4047b1ad)
Diffstat (limited to 'packaging/RedHat')
-rw-r--r--packaging/RedHat/makerpms.sh.tmpl46
-rw-r--r--packaging/RedHat/winbind.init12
2 files changed, 23 insertions, 35 deletions
diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl
index 9d71452db8..dc82033b06 100644
--- a/packaging/RedHat/makerpms.sh.tmpl
+++ b/packaging/RedHat/makerpms.sh.tmpl
@@ -28,6 +28,7 @@ SRCDIR=${SRCDIR:-/usr/src/redhat/SOURCES}
USERID=`id -u`
GRPID=`id -g`
VERSION='PVERSION'
+SPECFILE="samba3.spec"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpm"
@@ -36,24 +37,21 @@ echo The RPM Version on this machine is: $RPMVER
case $RPMVER in
2*)
echo Building for RPM v2.x
- sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec
- sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2-devel.spec > samba-devel.spec
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba.spec > $SPECFILE
;;
3*)
echo Building for RPM v3.x
- sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba.spec
- sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2-devel.spec > samba-devel.spec
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba.spec > $SPECFILE
;;
- 4.1*)
- echo Building for RPM v4.1
- RPM="rpmbuild"
- sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba.spec
- sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2-devel.spec > samba-devel.spec
+ 4.0*)
+ ## catch rpm v4.0.x first
+ echo Building for RPM v4.0
+ sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE
;;
- 4*)
- echo Building for RPM v4.x
- sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba.spec
- sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2-devel.spec > samba-devel.spec
+ 4.*)
+ echo Building for RPM v4.1 or later
+ RPM="rpmbuild"
+ sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba.spec > $SPECFILE
;;
*)
echo "Unknown RPM version: `rpm --version`"
@@ -64,27 +62,13 @@ esac
( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
-# We do this to make sure that the package always has the current version in it''s name
-if [ z$1 = z"devel" ]; then
- (cd ../../.. ; mv samba samba-${VERSION} )
-fi
-
( cd ../../.. ; tar --exclude=CVS -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 )
-cp -av samba.spec ${SPECDIR}
-cp -av samba-devel.spec ${SPECDIR}
+cp -av $SPECFILE ${SPECDIR}
-if [ z$1 = "zdevel" ]; then
- echo Restoring source samba directory name
- ( cd ../../.. ; mv samba-${VERSION} samba )
- echo Getting Ready to build Developmental Build
- cd ${SPECDIR}
- ${RPM} -ba -v samba-devel.spec
-else
- echo Getting Ready to build release package
- cd ${SPECDIR}
- ${RPM} -ba -v --clean --rmsource samba.spec
-fi
+echo Getting Ready to build release package
+cd ${SPECDIR}
+${RPM} -ba -v --clean --rmsource $SPECFILE
echo Done.
diff --git a/packaging/RedHat/winbind.init b/packaging/RedHat/winbind.init
index 291c351df3..17ddbd502b 100644
--- a/packaging/RedHat/winbind.init
+++ b/packaging/RedHat/winbind.init
@@ -20,16 +20,20 @@ fi
[ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists.
-[ -f /etc/samba/smb.conf ] || exit 0
+[ -f $CONFIG ] || exit 0
RETVAL=0
+CONFIG=/usr/local/samba/lib/smb.conf
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/samba/sbin:/usr/local/samba/bin
+export PATH
+
start() {
echo -n "Starting Winbind services: "
RETVAL=1
- if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
- daemon winbindd
+ if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then
+ daemon winbindd
RETVAL=$?
fi
echo
@@ -40,7 +44,7 @@ start() {
stop() {
echo -n "Shutting down Winbind services: "
RETVAL=1
- if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
+ if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then
killproc winbindd
RETVAL=$?
fi