diff mbox

[v2,01/17] libsepol: new package

Message ID 1378936777-28308-2-git-send-email-clshotwe@rockwellcollins.com
State Accepted
Headers show

Commit Message

Clayton Shotwell Sept. 11, 2013, 9:59 p.m. UTC
Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>
---
Changes v1 -> v2:
  - Move Config.in entry into the libraries section since this is a
    library.
  - General cleanup to the mk file to conform to the standard format.
  - Fixed the license version to be LGPLv2.1+ to match the headers in
    the source files (suggested by Thomas)

 package/Config.in            |    4 +++
 package/libsepol/Config.in   |    7 ++++++
 package/libsepol/libsepol.mk |   48 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100644 package/libsepol/Config.in
 create mode 100644 package/libsepol/libsepol.mk

Comments

Thomas Petazzoni Sept. 12, 2013, 7:18 p.m. UTC | #1
Dear Clayton Shotwell,

On Wed, 11 Sep 2013 16:59:21 -0500, Clayton Shotwell wrote:
> 
> Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

I've tested this with a minimal uClibc toolchain, and it builds fine, I
believe this patch can be applied now.

Thanks,

Thomas
Peter Korsgaard Sept. 20, 2013, 1:34 p.m. UTC | #2
>>>>> "Clayton" == Clayton Shotwell <clshotwe@rockwellcollins.com> writes:

 Clayton> Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com>
 Clayton> ---
 Clayton> Changes v1 -> v2:
 Clayton>   - Move Config.in entry into the libraries section since this is a
 Clayton>     library.
 Clayton>   - General cleanup to the mk file to conform to the standard format.
 Clayton>   - Fixed the license version to be LGPLv2.1+ to match the headers in
 Clayton>     the source files (suggested by Thomas)

Committed with some minor whitespace fixes, thanks.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 2351839..aa0b1df 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -689,6 +689,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..feb7f39
--- /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..2731c57
--- /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))