summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClayton Shotwell <clshotwe@rockwellcollins.com>2013-09-11 21:59:21 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-09-20 13:34:41 (GMT)
commit885d0007b07513338b141f5205d07e0a9f4a3cdb (patch)
treeca86077432f6fce280b6e7298e2eda073480893c
parentc64fc7690641cc1de9cd240c8626369c90712e3c (diff)
downloadbuildroot-885d0007b07513338b141f5205d07e0a9f4a3cdb.tar.gz
buildroot-885d0007b07513338b141f5205d07e0a9f4a3cdb.tar.bz2
libsepol: new package
[Peter: white space fixes] Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Config.in4
-rw-r--r--package/libsepol/Config.in7
-rw-r--r--package/libsepol/libsepol.mk48
3 files changed, 59 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index e187aa3..c3725f2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -694,6 +694,10 @@ source "package/liblog4c-localtime/Config.in"
source "package/tzdata/Config.in"
endmenu
+menu "Security"
+source "package/libsepol/Config.in"
+endmenu
+
menu "Text and terminal handling"
source "package/enchant/Config.in"
source "package/libfribidi/Config.in"
diff --git a/package/libsepol/Config.in b/package/libsepol/Config.in
new file mode 100644
index 0000000..f92af52
--- /dev/null
+++ b/package/libsepol/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBSEPOL
+ bool "libsepol"
+ help
+ Libsepol is the binary policy manipulation library. It doesn't
+ depend upon or use any of the other SELinux components.
+
+ http://selinuxproject.org/page/Main_Page
diff --git a/package/libsepol/libsepol.mk b/package/libsepol/libsepol.mk
new file mode 100644
index 0000000..4140ed3
--- /dev/null
+++ b/package/libsepol/libsepol.mk
@@ -0,0 +1,48 @@
+################################################################################
+#
+# libsepol
+#
+################################################################################
+
+LIBSEPOL_VERSION = 2.1.9
+LIBSEPOL_SITE = http://userspace.selinuxproject.org/releases/20130423/
+LIBSEPOL_LICENSE = LGPLv2.1+
+LIBSEPOL_LICENSE_FILES = COPYING
+
+LIBSEPOL_INSTALL_STAGING = YES
+
+define LIBSEPOL_BUILD_CMDS
+ # DESTDIR is needed during the compile to compute library and
+ # header paths.
+ $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR)
+endef
+
+define LIBSEPOL_INSTALL_STAGING_CMDS
+ $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR)
+endef
+
+define LIBSEPOL_INSTALL_TARGET_CMDS
+ $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR)
+endef
+
+define LIBSEPOL_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
+
+define HOST_LIBSEPOL_BUILD_CMDS
+ $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_LIBSEPOL_INSTALL_CMDS
+ $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR)
+ mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib
+ (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
+ -rmdir $(HOST_DIR)/lib
+endef
+
+define HOST_LIBSEPOL_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))