Upgrade selinux from 20100904 -> 20131030

This commit is contained in:
William A. Kennington III
2013-11-29 02:08:53 -06:00
parent 3f449b8ae6
commit 96dc58db9c
8 changed files with 68 additions and 31 deletions
+8 -16
View File
@@ -8,7 +8,7 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "libselinux-${version}";
version = "2.1.12";
version = "2.2.1";
inherit (libsepol) se_release se_url;
src = fetchurl {
@@ -16,30 +16,22 @@ stdenv.mkDerivation rec {
sha256 = "17navgvljgq35bljzcdwjdj3khajc27s15binr51xkp0h29qgbcd";
};
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 ]
++ optionals enablePython [ swig python ];
prePatch = ''
tar xvf ${patch_src}
for p in gentoo-patches/*.patch; do
patch -p1 < "$p"
done
'';
postPatch = optionalString enablePython ''
sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
'';
installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" "LIBSEPOLDIR=${libsepol}" ];
installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" ];
installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
# TODO: Figure out why the build incorrectly links libselinux.so
postInstall = ''
rm $out/lib/libselinux.so
ln -s libselinux.so.1 $out/lib/libselinux.so
'';
meta = {
inherit (libsepol.meta) homepage platforms maintainers;
};