Description: Multiarch support patch
Author: Russell Coker <russell@coker.com.au>

---
Last-Update: 2012-02-28

--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,13 @@
 SUBDIRS = setfiles semanage load_policy newrole run_init sandbox secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool po man
 
-INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
+INOTIFYH = $(shell ls /usr/include/$(DEB_HOST_MULTIARCH)/sys/inotify.h 2>/dev/null)
 
-ifeq (${INOTIFYH}, /usr/include/sys/inotify.h)
+ifneq (${INOTIFYH},)
 	SUBDIRS += restorecond
 endif
 
+SUBDIRS += restorecond mcstrans
+
 all install relabel clean indent:
 	@for subdir in $(SUBDIRS); do \
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
--- a/semodule_deps/Makefile
+++ b/semodule_deps/Makefile
@@ -2,7 +2,7 @@
 PREFIX ?= $(DESTDIR)/usr
 INCLUDEDIR ?= $(PREFIX)/include
 BINDIR ?= $(PREFIX)/bin
-LIBDIR ?= $(PREFIX)/lib
+LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
 MANDIR ?= $(PREFIX)/share/man
 
 CFLAGS ?= -Werror -Wall -W
--- a/mcstrans/utils/Makefile
+++ b/mcstrans/utils/Makefile
@@ -17,7 +17,7 @@
 endif
 endif
 endif
-
+LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
 
 CFLAGS ?= -Wall
 override CFLAGS += -I../src -D_GNU_SOURCE
--- a/mcstrans/src/Makefile
+++ b/mcstrans/src/Makefile
@@ -13,10 +13,11 @@
 endif
 endif
 endif
+LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
 # Installation directories.
 PREFIX  ?= $(DESTDIR)/usr
 SBINDIR ?= $(DESTDIR)/sbin
-INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
+INITDIR ?= $(DESTDIR)/etc/init.d
 
 PROG_SRC=mcstrans.c  mcscolor.c  mcstransd.c  mls_level.c
 PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))
--- policycoreutils-2.1.10.orig/sepolgen-ifgen/Makefile
+++ policycoreutils-2.1.10/sepolgen-ifgen/Makefile
@@ -1,7 +1,7 @@
 # Installation directories.
 PREFIX ?= $(DESTDIR)/usr
 BINDIR ?= $(PREFIX)/bin
-LIBDIR ?= $(PREFIX)/lib
+LIBDIR=$(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
 INCLUDEDIR ?= $(PREFIX)/include
 
 CFLAGS ?= -Werror -Wall -W
