2011-10-13 13:37:15 +01:00
|
|
|
{ stdenv, fetchurl, which, autoconf, automake, flex, yacc,
|
2014-12-30 08:05:12 +00:00
|
|
|
kernel, glibc, ncurses, perl, kerberos }:
|
2009-11-10 16:00:52 +00:00
|
|
|
|
|
|
|
assert stdenv.isLinux;
|
2014-12-11 01:03:18 +00:00
|
|
|
assert builtins.substring 0 4 kernel.version != "3.18";
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 13:37:15 +01:00
|
|
|
stdenv.mkDerivation {
|
2014-09-19 22:18:04 +01:00
|
|
|
name = "openafs-1.6.9-${kernel.version}";
|
2009-11-10 16:00:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-09-19 22:18:04 +01:00
|
|
|
url = http://www.openafs.org/dl/openafs/1.6.9/openafs-1.6.9-src.tar.bz2;
|
|
|
|
sha256 = "1isgw7znp10w0mr3sicnjzbc12bd1gdwfqqr667w6p3syyhs6bkv";
|
2009-11-10 16:00:52 +00:00
|
|
|
};
|
2015-01-01 16:59:27 +00:00
|
|
|
|
|
|
|
patches = [
|
2014-09-23 20:33:17 +01:00
|
|
|
./f3c0f74186f4a323ffc5f125d961fe384d396cac.patch
|
|
|
|
./ae86b07f827d6f3e2032a412f5f6cb3951a27d2d.patch
|
2014-10-09 12:12:29 +01:00
|
|
|
./I5558c64760e4cad2bd3dc648067d81020afc69b6.patch
|
|
|
|
./If1fd9d27f795dee4b5aa2152dd09e0540d643a69.patch
|
2014-09-23 20:33:17 +01:00
|
|
|
];
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 13:37:15 +01:00
|
|
|
buildInputs = [ autoconf automake flex yacc ncurses perl which ];
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 13:37:15 +01:00
|
|
|
preConfigure = ''
|
2015-01-01 16:59:09 +00:00
|
|
|
ln -s "${kernel.dev}/lib/modules/"*/build $TMP/linux
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 13:37:15 +01:00
|
|
|
patchShebangs .
|
|
|
|
for i in `grep -l -R '/usr/\(include\|src\)' .`; do
|
|
|
|
echo "Patch /usr/include and /usr/src in $i"
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace "/usr/include" "${glibc}/include" \
|
|
|
|
--replace "/usr/src" "$TMP"
|
2009-11-10 16:00:52 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
./regen.sh
|
|
|
|
|
2015-01-01 16:58:50 +00:00
|
|
|
${stdenv.lib.optionalString (kerberos != null) ''
|
2015-01-01 08:07:49 +00:00
|
|
|
export KRB5_CONFIG=${kerberos}/bin/krb5-config"
|
|
|
|
''}
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 13:37:15 +01:00
|
|
|
configureFlagsArray=(
|
|
|
|
"--with-linux-kernel-build=$TMP/linux"
|
2015-01-01 08:07:49 +00:00
|
|
|
${stdenv.lib.optionalString (kerberos != null) "--with-krb5"}
|
2011-10-13 13:37:15 +01:00
|
|
|
"--sysconfdir=/etc/static"
|
|
|
|
)
|
2009-11-10 16:00:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2011-10-13 13:37:15 +01:00
|
|
|
description = "Open AFS client";
|
|
|
|
homepage = http://www.openafs.org;
|
|
|
|
license = stdenv.lib.licenses.ipl10;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-09-13 12:51:39 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.z77z ];
|
2009-11-10 16:00:52 +00:00
|
|
|
};
|
|
|
|
}
|