INSTALL_BASE=/opt/samba
-SBINPROS="smbd nmbd winbindd swat"
-BINPROGS="findsmb nmblookup pdbedit rpcclient smbclient smbcquotas smbspool smbtar tdbbackup testparm wbinfo net ntlm_auth profiles smbcacls smbcontrol smbpasswd smbstatus smbtree tdbdump testprns"
+SBINPROGS="smbd nmbd winbindd swat"
+BINPROGS="findsmb nmblookup pdbedit rpcclient smbclient smbcquotas smbspool smbtar tdbbackup testparm wbinfo net ntlm_auth profiles smbcacls smbcontrol smbpasswd smbstatus smbtree tdbdump"
MSGFILES="de.msg en.msg fr.msg it.msg ja.msg nl.msg pl.msg tr.msg"
VFSLIBS="audit.so default_quota.so extd_audit.so full_audit.so readonly.so shadow_copy.so cap.so expand_msdfs.so fake_perms.so netatalk.so recycle.so"
DATFILES="lowcase.dat upcase.dat valid.dat"
for file in $MSGFILES; do
echo f none lib/$file 0644 root other
done
- for file in $VFSLIBS; do
- echo f none lib/vfs/$file 0755 root other
- done
for file in $DATFILES; do
echo f none lib/$file 0644 root other
done
+ for file in $VFSLIBS; do
+ echo f none lib/vfs/$file 0755 root other
+ done
for file in $CHARSETLIBS; do
echo f none lib/charset/$file 0755 root other
done
echo f none lib/libsmbclient.so 0755 root other
echo f none include/libsmbclient.h 0644 root other
- echo "#\n# nss_winbind.so\n#"
- echo f none /usr/lib/nss_winbind.so.1=lib/libnss_winbind.so 0755 root other
- echo s none /lib/nss_winbind.so.1=../usr/lib/nss_winbind.so.1 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 and nss_wins.so\n#"
+ echo f none /lib/nss_winbind.so.1=lib/nss_winbind.so.1 0755 root other
+ echo f none /lib/nss_wins.so.1=lib/nss_wins.so.1 0755 root other
+ # echo s none /lib/nss_winbind.so.1=/usr/lib/nss_winbind.so.1 0755 root other
+ # echo s none /lib/nss_wins.so.1=/usr/lib/nss_wins.so.1 0755 root other
if [ -f lib/pam_winbind.so ]; then
echo f none /usr/lib/security/pam_winbind.so=lib/pam_winbind.so 0755 root other
fi
- # Add the manpages
echo "#\n# man pages \n#"
- echo d none /usr ? ? ?
- echo d none /usr/share ? ? ?
- echo d none /usr/share/man ? ? ?
# Create directories for man page sections if nonexistent
cd man
for i in 1 2 3 4 5 6 7 8 9; do
- manpages=`ls *.$i 2>/dev/null`
+ manpages=`ls man$i 2>/dev/null`
if [ $? -eq 0 ]; then
- echo d none /usr/share/man/man$i ? ? ?
+ echo d none man/man${i} ? ? ?
for manpage in $manpages; do
- echo f none /usr/share/man/man${i}/${manpage}=docs/manpages/$manpage 0644 root other
+ echo f none man/man${i}/${manpage} 0644 root other
done
fi
done
done
# Create entries for docs for the beginner
- echo s none docs/using_samba=$BASEDIR/swat/help/using_samba
+ echo 's none docs/using_samba=$BASEDIR/swat/using_samba'
for file in docs/*pdf; do
echo f none $file 0644 root other
done
## BEGIN MAIN
#####################################################################
-TMPINSTALLDIR=$HOME/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
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 \
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
BINDIR=`bin/smbd -b | grep BINDIR | grep -v SBINDIR | awk '{print $2}'`
SWATDIR=`bin/smbd -b | grep SWATDIR | awk '{print $2}'`
CONFIGFILE=`bin/smbd -b | grep CONFIGFILE | awk '{print $2}'`
+LOCKDIR=`bin/smbd -b | grep LOCKDIR | awk '{print $2}'`
CONFIGDIR=`dirname $CONFIGFILE`
LOGFILEBASE=`bin/smbd -b | grep LOGFILEBASE | awk '{print $2}'`
LIBDIR=`bin/smbd -b | grep LIBDIR | awk '{print $2}'`
DOCDIR=$INSTALL_BASE/docs
##
-## copy some misc files that are ont done as part of 'make install'
+## copy some misc files that are not done as part of 'make install'
##
-cp -fp nsswitch/libnss_winbind.so $TMPINSTALLDIR/$LIBDIR/libnss_winbind.so
+cp -fp nsswitch/libnss_wins.so $TMPINSTALLDIR/$LIBDIR/nss_wins.so.1
+cp -fp nsswitch/libnss_winbind.so $TMPINSTALLDIR/$LIBDIR/nss_winbind.so.1
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
mkdir -p $TMPINSTALLDIR/$INSTALL_BASE/docs
cp -p ../docs/*pdf $TMPINSTALLDIR/$INSTALL_BASE/docs
##
## Start building the prototype file
##
-echo "SBINDIR=sbin" >> pkginfo
-echo "BINDIR=bin" >> pkginfo
-echo "SWATDIR=swat" >> pkginfo
echo "CONFIGDIR=$CONFIGDIR" >> pkginfo
echo "LOGFILEBASE=$LOGFILEBASE" >> pkginfo
-echo "LIBDIR=lib" >> pkginfo
+echo "LOCKDIR=$LOCKDIR" >> pkginfo
echo "PIDDIR=$PIDDIR" >> pkginfo
-echo "DOCDIR=docs" >> pkginfo
echo "PRIVATE_DIR=$PRIVATE_DIR" >> pkginfo
cp prototype.master prototype