1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
nixpkgs/pkgs/servers/samba/builder.sh
Wouter den Breejen 4b04ed1b84 Fixed some samba issue
svn path=/nixpkgs/trunk/; revision=9259
2007-09-05 16:45:51 +00:00

51 lines
1.1 KiB
Bash
Executable file

source $stdenv/setup
configureFlags="--prefix=$out --exec-prefix=$out"
#TODO: Check also for their dependencies...
if test "$pie"; then
configureFlags="--enable-pie $configureFlags"
fi
if test "$socketWrapper"; then
configureFlags="--enable-socket-wrapper $configureFlags"
fi
if test "$cups"; then
configureFlags="--enable-cups $configureFlags"
fi
if test "$iprint"; then
configureFlags="--enable-iprint $configureFlags"
fi
if test "$activeDirectory"; then
configureFlags=" $configureFlags"
fi
ensureDir $stateDir
echo "Building samba with statedir: $stateDir"
sleep 2
configureFlags="$configureFlags --sharedstatedir=$stateDir/shared --localstatedir=$stateDir/localstate --with-configdir=$stateDir/config"
#Copy the default conf file to the state dir
configdir=$stateDir/config
if ! test -d $configdir ; then
mkdir -p $configdir
fi
echo "configuring with: $configureFlags"
sleep 4
tar -zxvf $src
cd samba-*/source/
./configure $configureFlags
make
make install
cp -f $smbconf $stateDir/config/smb.conf
ensureDir $stateDir/sambalog/
touch $stateDir/sambalog/log.smbd