summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/libsemanage-2.1.9/0001-makefile-remove-host-path-from-list-of-header-search.patch22
-rw-r--r--patches/libsemanage-2.1.9/0002-makefile-remove-host-path-from-list-of-linker-search.patch34
-rw-r--r--patches/libsemanage-2.1.9/series5
-rw-r--r--rules/libsemanage.in14
-rw-r--r--rules/libsemanage.make57
5 files changed, 132 insertions, 0 deletions
diff --git a/patches/libsemanage-2.1.9/0001-makefile-remove-host-path-from-list-of-header-search.patch b/patches/libsemanage-2.1.9/0001-makefile-remove-host-path-from-list-of-header-search.patch
new file mode 100644
index 000000000..d42d8e644
--- /dev/null
+++ b/patches/libsemanage-2.1.9/0001-makefile-remove-host-path-from-list-of-header-search.patch
@@ -0,0 +1,22 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 14 Jan 2013 20:01:55 +0100
+Subject: [PATCH] makefile: remove host path from list of header search dirs
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index c63bb22..eb4e6d5 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -60,7 +60,7 @@ CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-
+ SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \
+ -Wno-unused-parameter
+
+-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE
++override CFLAGS += -I../include -D_GNU_SOURCE
+ RANLIB=ranlib
+
+ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
diff --git a/patches/libsemanage-2.1.9/0002-makefile-remove-host-path-from-list-of-linker-search.patch b/patches/libsemanage-2.1.9/0002-makefile-remove-host-path-from-list-of-linker-search.patch
new file mode 100644
index 000000000..9434a3531
--- /dev/null
+++ b/patches/libsemanage-2.1.9/0002-makefile-remove-host-path-from-list-of-linker-search.patch
@@ -0,0 +1,34 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 14 Jan 2013 20:02:08 +0100
+Subject: [PATCH] makefile: remove host path from list of linker search dirs
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index eb4e6d5..690a816 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -82,17 +82,17 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
+ $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
+
+ $(SWIGSO): $(SWIGLOBJ)
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR)
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage
+
+ $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR)
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage
+
+ $(LIBA): $(OBJS)
+ $(AR) rcs $@ $^
+ $(RANLIB) $@
+
+ $(LIBSO): $(LOBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -lselinux -lbz2 -lustr -L$(LIBDIR) -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -lselinux -lbz2 -lustr -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs
+ ln -sf $@ $(TARGET)
+
+ $(LIBPC): $(LIBPC).in ../VERSION
diff --git a/patches/libsemanage-2.1.9/series b/patches/libsemanage-2.1.9/series
new file mode 100644
index 000000000..1b6b4c369
--- /dev/null
+++ b/patches/libsemanage-2.1.9/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-makefile-remove-host-path-from-list-of-header-search.patch
+0002-makefile-remove-host-path-from-list-of-linker-search.patch
+# 73f17ef0b41fda63278004af46bb2478 - git-ptx-patches magic
diff --git a/rules/libsemanage.in b/rules/libsemanage.in
new file mode 100644
index 000000000..cf1e98ad3
--- /dev/null
+++ b/rules/libsemanage.in
@@ -0,0 +1,14 @@
+## SECTION=selinux
+
+config LIBSEMANAGE
+ tristate
+ prompt "libsemanage"
+ select BZIP2
+ select BZIP2_LIBBZ2
+ select LIBSEPOL
+ select LIBSELINUX
+ select USTR
+ help
+ This package provides the shared libraries for SELinux policy management.
+ It uses libsepol for binary policy manipulation and libselinux for
+ interacting with the SELinux system.
diff --git a/rules/libsemanage.make b/rules/libsemanage.make
new file mode 100644
index 000000000..0cbde6f23
--- /dev/null
+++ b/rules/libsemanage.make
@@ -0,0 +1,57 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Wolfram Sang <w.sang@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBSEMANAGE) += libsemanage
+
+#
+# Paths and names
+#
+LIBSEMANAGE_VERSION := 2.1.9
+LIBSEMANAGE_MD5 := 209e11da5b36c595a796751583f016f8
+LIBSEMANAGE := libsemanage-$(LIBSEMANAGE_VERSION)
+LIBSEMANAGE_SUFFIX := tar.gz
+LIBSEMANAGE_URL := http://userspace.selinuxproject.org/releases/20120924/$(LIBSEMANAGE).$(LIBSEMANAGE_SUFFIX)
+LIBSEMANAGE_SOURCE := $(SRCDIR)/$(LIBSEMANAGE).$(LIBSEMANAGE_SUFFIX)
+LIBSEMANAGE_DIR := $(BUILDDIR)/$(LIBSEMANAGE)
+LIBSEMANAGE_LICENSE := LGPLv2.1+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBSEMANAGE_CONF_TOOL := NO
+LIBSEMANAGE_MAKE_ENV := \
+ $(CROSS_ENV) \
+ CFLAGS="-O2 -Wall"
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libsemanage.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libsemanage)
+ @$(call install_fixup, libsemanage,PRIORITY,optional)
+ @$(call install_fixup, libsemanage,SECTION,base)
+ @$(call install_fixup, libsemanage,AUTHOR,"Wolfram Sang <w.sang@pengutronix.de>")
+ @$(call install_fixup, libsemanage,DESCRIPTION,missing)
+
+ @$(call install_lib, libsemanage, 0, 0, 0644, libsemanage)
+ @$(call install_alternative, libsemanage, 0, 0, 0644, /etc/selinux/semanage.conf)
+
+ @$(call install_finish, libsemanage)
+
+ @$(call touch)
+
+# vim: syntax=make