From 8a4476e95b7e8963769f3ca7c587134c9e26eaad Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Fri, 11 Sep 2009 17:51:23 +0200
Subject: [PATCH 3/3] /sbin/init doesn't use any symbols from libsepol

So don't needlessly link against it.
---
 debian/control                      |    2 +-
 debian/patches/99_no_libsepol.patch |   15 +++++++++++++++
 debian/patches/series               |    1 +
 3 files changed, 17 insertions(+), 1 deletions(-)
 create mode 100644 debian/patches/99_no_libsepol.patch

diff --git a/debian/control b/debian/control
index 2f3a7d4..868184d 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: admin
 Priority: required
 Maintainer: Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>
 Uploaders: Petter Reinholdtsen <pere@debian.org>, Henrique de Moraes Holschuh <hmh@debian.org>, Kel Modderman <kel@otaku42.de>
-Build-Depends: debhelper (>= 7), po-debconf, quilt (>= 0.40), libselinux1-dev (>= 1.14) [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
+Build-Depends: debhelper (>= 7), po-debconf, quilt (>= 0.40), libselinux1-dev (>= 1.14) [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
 Standards-Version: 3.8.3
 Homepage: http://freshmeat.net/projects/sysvinit/
 Vcs-Svn: svn://svn.debian.org/pkg-sysvinit/sysvinit/trunk
diff --git a/debian/patches/99_no_libsepol.patch b/debian/patches/99_no_libsepol.patch
new file mode 100644
index 0000000..3d5828f
--- /dev/null
+++ b/debian/patches/99_no_libsepol.patch
@@ -0,0 +1,15 @@
+diff --git a/src/Makefile b/src/Makefile
+index c466bf8..f8554bc 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -53,8 +53,8 @@ MANDIR		= /usr/share/man
+ 
+ ifeq ($(WITH_SELINUX),yes)
+   SELINUX_DEF=-DWITH_SELINUX
+-  INIT_SELIBS=-lsepol -lselinux
+-  SULOGIN_SELIBS=-lselinux	
++  INIT_SELIBS=-lselinux
++  SULOGIN_SELIBS=-lselinux
+ else
+   SELINUX_DEF=
+   INIT_SELIBS=
diff --git a/debian/patches/series b/debian/patches/series
index 8057c92..43accfd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@
 96_shutdown_acctoff.dpatch
 97_init_starttest.dpatch
 98_installtarget.patch
+99_no_libsepol.patch
-- 
1.6.3.3


