2015-09-14 20:59:37 +02:00
|
|
|
{ stdenv, fetchurl, fetchgit, which, autoconf, automake, flex, yacc,
|
2017-11-08 21:24:34 +01:00
|
|
|
kernel, glibc, ncurses, perl, kerberos, fetchpatch }:
|
2009-11-10 17:00:52 +01:00
|
|
|
|
2016-03-26 22:53:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-09-14 20:59:37 +02:00
|
|
|
name = "openafs-${version}-${kernel.version}";
|
2018-01-19 14:18:30 +01:00
|
|
|
version = "1.6.22.1";
|
2015-09-14 20:59:37 +02:00
|
|
|
|
2016-03-26 22:53:41 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
|
2018-01-19 14:18:30 +01:00
|
|
|
sha256 = "19nfbksw7b34jc3mxjk7cbz26zg9k5myhzpv2jf0fnmznr47jqaw";
|
2016-03-26 22:53:41 +01:00
|
|
|
};
|
|
|
|
|
2018-01-19 14:18:30 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake flex yacc perl which ] ++ kernel.moduleBuildDependencies;
|
2015-01-01 17:59:27 +01:00
|
|
|
|
2016-03-26 22:53:41 +01:00
|
|
|
buildInputs = [ ncurses ];
|
2009-11-10 17:00:52 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
2016-02-12 03:53:54 +01:00
|
|
|
|
2011-10-13 14:37:15 +02:00
|
|
|
preConfigure = ''
|
2015-01-01 17:59:09 +01:00
|
|
|
ln -s "${kernel.dev}/lib/modules/"*/build $TMP/linux
|
2009-11-10 17:00:52 +01:00
|
|
|
|
2011-10-13 14:37:15 +02:00
|
|
|
patchShebangs .
|
|
|
|
for i in `grep -l -R '/usr/\(include\|src\)' .`; do
|
|
|
|
echo "Patch /usr/include and /usr/src in $i"
|
|
|
|
substituteInPlace $i \
|
2015-04-26 19:54:51 +02:00
|
|
|
--replace "/usr/include" "${glibc.dev}/include" \
|
2011-10-13 14:37:15 +02:00
|
|
|
--replace "/usr/src" "$TMP"
|
2009-11-10 17:00:52 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
./regen.sh
|
|
|
|
|
2015-08-30 05:29:55 +02:00
|
|
|
${stdenv.lib.optionalString (kerberos != null)
|
2017-12-17 14:51:32 +01:00
|
|
|
"export KRB5_CONFIG=${kerberos.dev}/bin/krb5-config"}
|
2009-11-10 17:00:52 +01:00
|
|
|
|
2011-10-13 14:37:15 +02:00
|
|
|
configureFlagsArray=(
|
|
|
|
"--with-linux-kernel-build=$TMP/linux"
|
2015-01-01 09:07:49 +01:00
|
|
|
${stdenv.lib.optionalString (kerberos != null) "--with-krb5"}
|
2011-10-13 14:37:15 +02:00
|
|
|
"--sysconfdir=/etc/static"
|
2015-08-30 05:29:55 +02:00
|
|
|
"--disable-linux-d_splice-alias-extra-iput"
|
2011-10-13 14:37:15 +02:00
|
|
|
)
|
2009-11-10 17:00:52 +01:00
|
|
|
'';
|
|
|
|
|
2016-03-26 22:53:41 +01:00
|
|
|
meta = with stdenv.lib; {
|
2011-10-13 14:37:15 +02:00
|
|
|
description = "Open AFS client";
|
2016-03-26 22:53:41 +01:00
|
|
|
homepage = https://www.openafs.org;
|
|
|
|
license = licenses.ipl10;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.z77z ];
|
2017-09-23 23:29:04 +02:00
|
|
|
broken = versionOlder kernel.version "3.18";
|
2009-11-10 17:00:52 +01:00
|
|
|
};
|
|
|
|
}
|