2015-09-14 18:59:37 +00:00
|
|
|
{ stdenv, fetchurl, fetchgit, 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
|
|
|
|
2016-03-26 21:53:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-09-14 18:59:37 +00:00
|
|
|
name = "openafs-${version}-${kernel.version}";
|
2016-03-26 21:53:41 +00:00
|
|
|
version = "1.6.17";
|
2015-09-14 18:59:37 +00:00
|
|
|
|
2016-03-26 21:53:41 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
|
|
|
|
sha256 = "16532f4951piv1g2i539233868xfs1damrnxql61gjgxpwnklhcn";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake flex yacc perl which ];
|
2015-01-01 16:59:27 +00:00
|
|
|
|
2016-03-26 21:53:41 +00:00
|
|
|
buildInputs = [ ncurses ];
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 12:37:15 +00: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 12:37:15 +00: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-08-30 03:29:55 +00:00
|
|
|
${stdenv.lib.optionalString (kerberos != null)
|
|
|
|
"export KRB5_CONFIG=${kerberos}/bin/krb5-config"}
|
2009-11-10 16:00:52 +00:00
|
|
|
|
2011-10-13 12:37:15 +00: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 12:37:15 +00:00
|
|
|
"--sysconfdir=/etc/static"
|
2015-08-30 03:29:55 +00:00
|
|
|
"--disable-linux-d_splice-alias-extra-iput"
|
2011-10-13 12:37:15 +00:00
|
|
|
)
|
2009-11-10 16:00:52 +00:00
|
|
|
'';
|
|
|
|
|
2016-03-26 21:53:41 +00:00
|
|
|
meta = with stdenv.lib; {
|
2011-10-13 12:37:15 +00:00
|
|
|
description = "Open AFS client";
|
2016-03-26 21:53:41 +00:00
|
|
|
homepage = https://www.openafs.org;
|
|
|
|
license = licenses.ipl10;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.z77z ];
|
2009-11-10 16:00:52 +00:00
|
|
|
};
|
|
|
|
}
|