Samba: Add a cross-compilable variant.
svn path=/nixpkgs/trunk/; revision=30627
This commit is contained in:
parent
f3b7b7d69e
commit
46d3cd449f
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, readline, pam, openldap, popt, iniparser, libunwind, fam
|
{ stdenv, fetchurl, readline, pam ? null, openldap ? null
|
||||||
, acl, cups
|
, popt, iniparser, libunwind
|
||||||
|
, fam ? null , acl ? null, cups ? null
|
||||||
, useKerberos ? false, kerberos ? null, winbind ? true
|
, useKerberos ? false, kerberos ? null, winbind ? true
|
||||||
|
|
||||||
# Eg. smbclient and smbspool require a smb.conf file.
|
# Eg. smbclient and smbspool require a smb.conf file.
|
||||||
@ -14,11 +15,7 @@
|
|||||||
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
assert useKerberos -> kerberos != null;
|
||||||
|
|
||||||
useWith = flag: option: if flag then "--with-"+option else "";
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "samba-3.6.1";
|
name = "samba-3.6.1";
|
||||||
@ -38,19 +35,29 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
preConfigure = "cd source3";
|
postPatch =
|
||||||
|
# XXX: Awful hack to allow cross-compilation.
|
||||||
|
'' sed -i source3/configure \
|
||||||
|
-e 's/^as_fn_error \("cannot run test program while cross compiling\)/$as_echo \1/g'
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = ''
|
preConfigure =
|
||||||
--with-pam
|
'' cd source3
|
||||||
--with-aio-support
|
export samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
|
||||||
--with-pam_smbpass
|
export libreplace_cv_HAVE_GETADDRINFO=yes
|
||||||
--disable-swat
|
export ac_cv_file__proc_sys_kernel_core_pattern=no # XXX: true on Linux, false elsewhere
|
||||||
--with-configdir=${configDir}
|
'';
|
||||||
--with-fhs
|
|
||||||
--localstatedir=/var
|
configureFlags =
|
||||||
${useWith winbind "winbind"}
|
stdenv.lib.optionals (pam != null) [ "--with-pam" "--with-pam_smbpass" ]
|
||||||
${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" else ""}
|
++ [ "--with-aio-support"
|
||||||
'';
|
"--disable-swat"
|
||||||
|
"--with-configdir=${configDir}"
|
||||||
|
"--with-fhs"
|
||||||
|
"--localstatedir=/var"
|
||||||
|
]
|
||||||
|
++ (stdenv.lib.optional winbind "--with-winbind")
|
||||||
|
++ (stdenv.lib.optional (stdenv.gcc.libc != null) "--with-libiconv=${stdenv.gcc.libc}");
|
||||||
|
|
||||||
# Need to use a DESTDIR because `make install' tries to write in /var and /etc.
|
# Need to use a DESTDIR because `make install' tries to write in /var and /etc.
|
||||||
installFlags = "DESTDIR=$(TMPDIR)/inst";
|
installFlags = "DESTDIR=$(TMPDIR)/inst";
|
||||||
|
@ -5054,6 +5054,15 @@ let
|
|||||||
|
|
||||||
samba = callPackage ../servers/samba { };
|
samba = callPackage ../servers/samba { };
|
||||||
|
|
||||||
|
# A lightweight Samba, useful for non-Linux-based OSes.
|
||||||
|
samba_light = callPackage ../servers/samba {
|
||||||
|
pam = null;
|
||||||
|
fam = null;
|
||||||
|
cups = null;
|
||||||
|
acl = null;
|
||||||
|
openldap = null;
|
||||||
|
};
|
||||||
|
|
||||||
shishi = callPackage ../servers/shishi {
|
shishi = callPackage ../servers/shishi {
|
||||||
# GNU Shishi 1.0.0 fails to build with GnuTLS 3.x.
|
# GNU Shishi 1.0.0 fails to build with GnuTLS 3.x.
|
||||||
gnutls = gnutls2;
|
gnutls = gnutls2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user