2013-02-24 13:25:53 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libsepol, pcre }:
|
2006-08-27 20:05:18 +02:00
|
|
|
|
2011-03-27 06:45:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libselinux-${version}";
|
2013-02-24 13:25:53 +01:00
|
|
|
version = "2.1.12";
|
|
|
|
inherit (libsepol) se_release se_url;
|
2011-03-27 06:45:38 +02:00
|
|
|
|
2006-08-27 20:05:18 +02:00
|
|
|
src = fetchurl {
|
2013-02-24 13:25:53 +01:00
|
|
|
url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
|
|
|
|
sha256 = "17navgvljgq35bljzcdwjdj3khajc27s15binr51xkp0h29qgbcd";
|
2006-08-27 20:05:18 +02:00
|
|
|
};
|
|
|
|
|
2013-02-24 13:25:53 +01:00
|
|
|
patch_src = fetchurl {
|
|
|
|
url = "http://dev.gentoo.org/~swift/patches/libselinux/patchbundle-${name}-r2.tar.gz";
|
|
|
|
sha256 = "08zaas8iwyf4w9ll1ylyv4gril1nfarckd5h1l53563sxzyf7dqh";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./fPIC.patch ]; # libsemanage seems to need -fPIC everywhere
|
|
|
|
|
|
|
|
buildInputs = [ pkgconfig libsepol pcre ];
|
2011-03-27 06:45:38 +02:00
|
|
|
|
2013-02-24 13:25:53 +01:00
|
|
|
prePatch = ''
|
|
|
|
tar xvf ${patch_src}
|
|
|
|
for p in gentoo-patches/*.patch; do
|
|
|
|
patch -p1 < "$p"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit (libsepol.meta) homepage platforms maintainers;
|
|
|
|
};
|
2006-08-27 20:05:18 +02:00
|
|
|
}
|