2014-09-19 22:18:33 +01:00
|
|
|
{ stdenv, fetchurl, gettext, libuuid, readline }:
|
2009-10-08 14:07:56 +01:00
|
|
|
|
2009-12-08 16:58:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-19 22:18:33 +01:00
|
|
|
name = "xfsprogs-3.2.1";
|
2009-10-08 14:07:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-09-19 22:18:33 +01:00
|
|
|
urls = map (dir: "ftp://oss.sgi.com/projects/xfs/${dir}/${name}.tar.gz")
|
|
|
|
[ "cmd_tars" "previous" ];
|
|
|
|
sha256 = "0rsp31qrz0wskr70dwzl5ignkac7j98j7m9cy6wl57zy716fmy43";
|
2009-10-08 14:07:56 +01:00
|
|
|
};
|
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
prePatch = ''
|
|
|
|
sed -i s,/bin/bash,`type -P bash`,g install-sh
|
|
|
|
sed -i s,ldconfig,`type -P ldconfig`,g configure m4/libtool.m4
|
|
|
|
|
|
|
|
# Fixes from gentoo 3.2.1 ebuild
|
|
|
|
sed -i "/^PKG_DOC_DIR/s:@pkg_name@:${name}:" include/builddefs.in
|
|
|
|
sed -i '1iLLDFLAGS = -static' {estimate,fsr}/Makefile
|
|
|
|
sed -i "/LLDFLAGS/s:-static::" $(find -name Makefile)
|
|
|
|
sed -i '/LIB_SUBDIRS/s:libdisk::' Makefile
|
2012-06-10 15:41:22 +01:00
|
|
|
'';
|
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
patches = [
|
|
|
|
# This patch fixes shared libs installation, still not fixed in 3.2.1
|
|
|
|
./xfsprogs-3.1.11-sharelibs.patch
|
|
|
|
];
|
2014-04-16 22:41:50 +01:00
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
buildInputs = [ gettext libuuid readline ];
|
2014-04-16 22:41:50 +01:00
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
outputs = [ "out" "lib" ];
|
2014-04-16 22:41:50 +01:00
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
configureFlags = [
|
|
|
|
"MAKE=make"
|
|
|
|
"MSGFMT=msgfmt"
|
|
|
|
"MSGMERGE=msgmerge"
|
|
|
|
"XGETTEXT=xgettext"
|
|
|
|
"--disable-lib64"
|
|
|
|
"--enable-readline"
|
|
|
|
"--includedir=$(lib)/include"
|
|
|
|
"--libdir=$(lib)/lib"
|
|
|
|
];
|
2009-10-08 14:07:56 +01:00
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
installFlags = [ "install-dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Emitted libraries have references to $out, fix this
|
|
|
|
sed -i "s,$out,$lib,g" $lib/lib/*
|
2010-09-09 18:47:37 +01:00
|
|
|
'';
|
2009-10-08 14:07:56 +01:00
|
|
|
|
2014-09-19 22:18:33 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://xfs.org/;
|
2009-10-08 14:07:56 +01:00
|
|
|
description = "SGI XFS utilities";
|
2014-09-19 22:18:33 +01:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2009-10-08 14:07:56 +01:00
|
|
|
};
|
|
|
|
}
|