summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2013-01-07 08:13:50 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-02-05 18:54:16 +0100
commit47e54a383caaf689bcc928ce05398eb6c8b588ce (patch)
tree8f772e525fb2012fe95453451b4a459c051cdc85
parentcc297c64bcfdac221cc2a3ee1e86984b5d24d456 (diff)
downloadptxdist-47e54a383caaf689bcc928ce05398eb6c8b588ce.tar.gz
ptxdist-47e54a383caaf689bcc928ce05398eb6c8b588ce.tar.xz
libsepol: add package
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--patches/libsepol-2.1.8/0001-makefile-fix-linking-to-shlib-if-prefix.patch25
-rw-r--r--patches/libsepol-2.1.8/series4
-rw-r--r--rules/libsepol.in10
-rw-r--r--rules/libsepol.make56
4 files changed, 95 insertions, 0 deletions
diff --git a/patches/libsepol-2.1.8/0001-makefile-fix-linking-to-shlib-if-prefix.patch b/patches/libsepol-2.1.8/0001-makefile-fix-linking-to-shlib-if-prefix.patch
new file mode 100644
index 000000000..311058f41
--- /dev/null
+++ b/patches/libsepol-2.1.8/0001-makefile-fix-linking-to-shlib-if-prefix.patch
@@ -0,0 +1,25 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 25 Jan 2013 19:35:45 +0100
+Subject: [PATCH] makefile: fix linking to shlib if prefix=/
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/Makefile | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Makefile b/src/Makefile
+index cd8e767..03c26a4 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -43,7 +43,11 @@ install: all
+ install -m 755 $(LIBSO) $(SHLIBDIR)
+ test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
+ install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
++ifeq ($(SHLIBDIR),$(LIBDIR))
++ cd $(LIBDIR) && ln -sf $(LIBSO) $(TARGET)
++else
+ cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET)
++endif
+
+ relabel:
+ /sbin/restorecon $(SHLIBDIR)/$(LIBSO)
diff --git a/patches/libsepol-2.1.8/series b/patches/libsepol-2.1.8/series
new file mode 100644
index 000000000..c42bf403b
--- /dev/null
+++ b/patches/libsepol-2.1.8/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-makefile-fix-linking-to-shlib-if-prefix.patch
+# 759239ba4f50ae0d335c52fd5681aae4 - git-ptx-patches magic
diff --git a/rules/libsepol.in b/rules/libsepol.in
new file mode 100644
index 000000000..4ac087610
--- /dev/null
+++ b/rules/libsepol.in
@@ -0,0 +1,10 @@
+## SECTION=selinux
+
+config LIBSEPOL
+ tristate
+ prompt "libsepol"
+ help
+ libsepol provides an API for the manipulation of SELinux binary policies.
+ It is used by checkpolicy (the policy compiler) and similar tools, as well
+ as by programs like load_policy that need to perform specific transformations
+ on binary policies such as customizing policy boolean settings.
diff --git a/rules/libsepol.make b/rules/libsepol.make
new file mode 100644
index 000000000..2eac5d24d
--- /dev/null
+++ b/rules/libsepol.make
@@ -0,0 +1,56 @@
+# -*-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_LIBSEPOL) += libsepol
+
+#
+# Paths and names
+#
+LIBSEPOL_VERSION := 2.1.8
+LIBSEPOL_MD5 := 56fa100ed85d7f06bd92f2892d92b3b0
+LIBSEPOL := libsepol-$(LIBSEPOL_VERSION)
+LIBSEPOL_SUFFIX := tar.gz
+LIBSEPOL_URL := http://userspace.selinuxproject.org/releases/20120924/$(LIBSEPOL).$(LIBSEPOL_SUFFIX)
+LIBSEPOL_SOURCE := $(SRCDIR)/$(LIBSEPOL).$(LIBSEPOL_SUFFIX)
+LIBSEPOL_DIR := $(BUILDDIR)/$(LIBSEPOL)
+LIBSEPOL_LICENSE := LGPLv2.1+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBSEPOL_CONF_TOOL := NO
+LIBSEPOL_MAKE_ENV := \
+ $(CROSS_ENV) \
+ CFLAGS="-O2 -Wall"
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libsepol.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libsepol)
+ @$(call install_fixup, libsepol,PRIORITY,optional)
+ @$(call install_fixup, libsepol,SECTION,base)
+ @$(call install_fixup, libsepol,AUTHOR,"Wolfram Sang <w.sang@pengutronix.de>")
+ @$(call install_fixup, libsepol,DESCRIPTION,missing)
+
+ @$(call install_lib, libsepol, 0, 0, 0644, libsepol)
+
+ @$(call install_finish, libsepol)
+
+ @$(call touch)
+
+# vim: syntax=make