2019-05-17 15:26:15 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c }:
|
2011-04-06 15:57:31 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "multipath-tools";
|
2019-07-16 02:27:29 +01:00
|
|
|
version = "0.8.2";
|
2011-04-06 15:57:31 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
name = "${pname}-${version}.tar.gz";
|
2019-05-17 15:26:15 +01:00
|
|
|
url = "https://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=snapshot;h=refs/tags/${version};sf=tgz";
|
2019-07-16 02:27:29 +01:00
|
|
|
sha256 = "0x6cjlb9mjrmpaqk5v6v47qz6n9zyqmw13i7pq5x6ppwyqdxhn5s";
|
2011-04-06 15:57:31 +01:00
|
|
|
};
|
|
|
|
|
2016-01-21 14:29:02 +00:00
|
|
|
postPatch = ''
|
2019-05-17 15:26:15 +01:00
|
|
|
substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h
|
2016-01-21 14:29:02 +00:00
|
|
|
sed -i -re '
|
|
|
|
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
|
|
|
|
' libmultipath/defaults.h
|
|
|
|
sed -i -e 's,\$(DESTDIR)/\(usr/\)\?,$(prefix)/,g' \
|
|
|
|
kpartx/Makefile libmpathpersist/Makefile
|
2016-12-19 13:31:06 +00:00
|
|
|
sed -i -e "s,GZIP = .*, GZIP = gzip -9n -c," \
|
|
|
|
Makefile.inc
|
2016-01-21 14:29:02 +00:00
|
|
|
'';
|
2011-04-06 15:57:31 +01:00
|
|
|
|
2019-05-17 15:26:15 +01:00
|
|
|
nativeBuildInputs = [ gzip pkgconfig perl ];
|
|
|
|
buildInputs = [ systemd lvm2 libaio readline liburcu json_c ];
|
2011-04-06 15:57:31 +01:00
|
|
|
|
2016-01-21 14:29:02 +00:00
|
|
|
makeFlags = [
|
|
|
|
"LIB=lib"
|
|
|
|
"prefix=$(out)"
|
|
|
|
"mandir=$(out)/share/man/man8"
|
|
|
|
"man5dir=$(out)/share/man/man5"
|
|
|
|
"man3dir=$(out)/share/man/man3"
|
|
|
|
"unitdir=$(out)/lib/systemd/system"
|
|
|
|
];
|
2011-04-06 15:57:31 +01:00
|
|
|
|
2018-08-30 20:37:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2011-04-06 15:57:31 +01:00
|
|
|
description = "Tools for the Linux multipathing driver";
|
|
|
|
homepage = http://christophe.varoqui.free.fr/;
|
2018-08-30 20:37:57 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2011-04-06 15:57:31 +01:00
|
|
|
};
|
|
|
|
}
|