nixpkgs/pkgs/servers/samba/builder.sh
Wouter den Breejen 6a758e14bf samba moved van services to servers, updated all-packages
svn path=/nixpkgs/trunk/; revision=8793
2007-05-28 15:40:17 +00:00

48 lines
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