Merge pull request #99379 from spacefrogg/openafs-fixups
This commit is contained in:
commit
dd1908f879
|
@ -1,27 +1,30 @@
|
||||||
{ stdenv, buildPackages, fetchurl, which, autoconf, automake, flex
|
{ stdenv, buildPackages, fetchurl, which, autoconf, automake, flex
|
||||||
, yacc , glibc, perl, kerberos, libxslt, docbook_xsl
|
, yacc , glibc, perl, kerberos, libxslt, docbook_xsl, file
|
||||||
, docbook_xml_dtd_43 , libtool_2, removeReferencesTo
|
, docbook_xml_dtd_43, libtool_2
|
||||||
, ncurses # Extra ncurses utilities. Only needed for debugging.
|
, withDevdoc ? false, doxygen, dblatex # Extra developer documentation
|
||||||
|
, ncurses # Extra ncurses utilities. Needed for debugging and monitoring.
|
||||||
, tsmbac ? null # Tivoli Storage Manager Backup Client from IBM
|
, tsmbac ? null # Tivoli Storage Manager Backup Client from IBM
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with (import ./srcs.nix { inherit fetchurl; });
|
with (import ./srcs.nix { inherit fetchurl; });
|
||||||
|
let
|
||||||
|
inherit (stdenv.lib) optional optionalString optionals;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "openafs";
|
pname = "openafs";
|
||||||
inherit version srcs;
|
inherit version srcs;
|
||||||
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
nativeBuildInputs = [ autoconf automake flex libxslt libtool_2 perl
|
nativeBuildInputs = [ autoconf automake flex libxslt libtool_2 perl
|
||||||
removeReferencesTo which yacc ];
|
which yacc ] ++ optionals withDevdoc [ doxygen dblatex ];
|
||||||
|
|
||||||
buildInputs = [ kerberos ncurses ];
|
buildInputs = [ kerberos ncurses ];
|
||||||
|
|
||||||
patches = [ ./bosserver.patch ./cross-build.patch ] ++ stdenv.lib.optional (tsmbac != null) ./tsmbac.patch;
|
patches = [ ./bosserver.patch ./cross-build.patch ] ++ optional (tsmbac != null) ./tsmbac.patch;
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" "doc" "server" ];
|
outputs = [ "out" "dev" "man" "doc" ] ++ optional withDevdoc "devdoc";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
setOutputFlags = false;
|
setOutputFlags = false;
|
||||||
|
|
||||||
|
@ -44,19 +47,19 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
./regen.sh
|
./regen.sh
|
||||||
|
|
||||||
|
|
||||||
configureFlagsArray=(
|
configureFlagsArray=(
|
||||||
"--with-gssapi"
|
"--with-gssapi"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--disable-kernel-module"
|
"--disable-kernel-module"
|
||||||
"--disable-fuse-client"
|
"--disable-fuse-client"
|
||||||
"--with-html-xsl=${docbook_xsl}/share/xml/docbook-xsl/html/chunk.xsl"
|
"--with-docbook-stylesheets=${docbook_xsl}/share/xml/docbook-xsl"
|
||||||
${stdenv.lib.optionalString (tsmbac != null) "--enable-tivoli-tsm"}
|
${optionalString (tsmbac != null) "--enable-tivoli-tsm"}
|
||||||
${stdenv.lib.optionalString (ncurses == null) "--disable-gtx"}
|
${optionalString (ncurses == null) "--disable-gtx"}
|
||||||
"--disable-linux-d_splice-alias-extra-iput"
|
"--disable-linux-d_splice-alias-extra-iput"
|
||||||
"--libexecdir=$server/libexec"
|
|
||||||
)
|
)
|
||||||
'' + stdenv.lib.optionalString (tsmbac != null) ''
|
'' + optionalString (tsmbac != null) ''
|
||||||
export XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I${tsmbac}/lib64/sample -DXBSA_TSMLIB=\\\"${tsmbac}/lib64/libApiTSM64.so\\\""
|
export XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I${tsmbac}/lib64/sample -DXBSA_TSMLIB=\\\"${tsmbac}/lib64/libApiTSM64.so\\\""
|
||||||
export XBSA_XLIBS="-ldl"
|
export XBSA_XLIBS="-ldl"
|
||||||
'';
|
'';
|
||||||
|
@ -67,24 +70,28 @@ stdenv.mkDerivation {
|
||||||
for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
|
for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
|
||||||
make -C "''${d}" index.html
|
make -C "''${d}" index.html
|
||||||
done
|
done
|
||||||
|
'' + optionalString withDevdoc ''
|
||||||
|
make dox
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/openafs/{AdminGuide,QuickStartUnix,UserGuide}
|
mkdir -p $doc/share/doc/openafs/{AdminGuide,QuickStartUnix,UserGuide}
|
||||||
cp -r doc/{pdf,protocol,txt} README LICENSE $doc/share/doc/openafs
|
cp -r doc/txt README LICENSE $doc/share/doc/openafs
|
||||||
for d in AdminGuide QuickStartUnix UserGuide ; do
|
for d in AdminGuide QuickStartUnix UserGuide ; do
|
||||||
cp "doc/xml/''${d}"/*.html "$doc/share/doc/openafs/''${d}"
|
cp "doc/xml/''${d}"/*.html "$doc/share/doc/openafs/''${d}"
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -r $out/lib/openafs
|
rm -r $out/lib/openafs
|
||||||
|
'' + optionalString withDevdoc ''
|
||||||
|
mkdir -p $devdoc/share/devhelp/openafs/doxygen
|
||||||
|
cp -r doc/{pdf,protocol} $devdoc/share/devhelp/openafs
|
||||||
|
cp -r doc/doxygen/output/html $devdoc/share/devhelp/openafs/doxygen
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Avoid references to $TMPDIR by removing it and let patchelf cleanup the
|
# Avoid references to $TMPDIR by removing it and let patchelf cleanup the
|
||||||
# binaries.
|
# binaries.
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
rm -rf "$(pwd)" && mkdir "$(pwd)"
|
rm -rf "$(pwd)" && mkdir "$(pwd)"
|
||||||
|
|
||||||
find $out -type f -exec remove-references-to -t $server '{}' '+'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in New Issue