Author: eelco
Date: Mon Dec  6 18:59:07 2010
New Revision: 25015
URL: https://svn.nixos.org/websvn/nix/?rev=25015&sc=1

Log:
* Samba updated to 3.5.6.  Build with --localstatedir=/var to prevent
  smbd from writing in $out/var at runtime.  Also added --with-fhs.

Modified:
   nixpkgs/trunk/pkgs/servers/samba/default.nix

Modified: nixpkgs/trunk/pkgs/servers/samba/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/servers/samba/default.nix        Mon Dec  6 18:01:57 
2010        (r25014)
+++ nixpkgs/trunk/pkgs/servers/samba/default.nix        Mon Dec  6 18:59:07 
2010        (r25015)
@@ -13,39 +13,49 @@
 , configDir ? "/etc/samba"
 
 }:
+
 let
- usewith = flag: option: if flag then "--with-"+option else "";
+
+ useWith = flag: option: if flag then "--with-"+option else "";
+ 
 in
+
 stdenv.mkDerivation rec {
-  name = "samba-3.3.3";
+  name = "samba-3.5.6";
 
   src = fetchurl {
     url = "http://us3.samba.org/samba/ftp/stable/${name}.tar.gz";;
-    sha256 = "08x3ng7ls5c1a95v7djx362i55wdlmnvarpr7rhng5bb55s9n5qn";
+    sha256 = "1nj78bahph9fwxv0v3lz31cy6z167jgmvz63d8l9mlbmhf310r26";
   };
 
-  buildInputs = [readline pam openldap popt iniparser libunwind fam acl]
+  buildInputs = [ readline pam openldap popt iniparser libunwind fam acl ]
     ++ stdenv.lib.optional useKerberos kerberos;
 
-  preConfigure = "cd source";
+  preConfigure = "cd source3";
 
-  postInstall = ''
-    mkdir -pv $out/lib/cups/backend
-    ln -sv ../../../bin/smbspool $out/lib/cups/backend/smb
-  '' + stdenv.lib.optionalString (configDir == "") "touch $out/lib/smb.conf";
-
-  # Don't pass --with-private-dir=/var/samba/private
-  #            --with-lockdir=/var/samba/lock
-  # the build system will try to create it.
   configureFlags = ''
     --with-pam
     --with-cifsmount
     --with-aio-support
     --with-pam_smbpass
     --disable-swat
-    --enable-shared-libs
     --with-configdir=${configDir}
-    ${usewith winbind "winbind"}
+    --with-fhs
+    --localstatedir=/var
+    ${useWith winbind "winbind"}
     ${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" 
else ""}
   '';
+
+  # Need to use a DESTDIR because `make install' tries to write in /var and 
/etc.
+  installFlags = "DESTDIR=$(TMPDIR)/inst";
+
+  postInstall =
+    ''
+      mkdir -p $out
+      mv $TMPDIR/inst/$out/* $out/
+  
+      mkdir -pv $out/lib/cups/backend
+      ln -sv ../../../bin/smbspool $out/lib/cups/backend/smb
+    '' # */
+    + stdenv.lib.optionalString (configDir == "") "touch $out/lib/smb.conf";
 }
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to