summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julien Pivotto <roidelapluie@inuits.eu> 2016-05-17 21:44:53 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-05-21 09:21:34 +0200
commit77582ef1a6425caa53288dfc1c0071db89923fa5 (patch)
tree09abde7264b54ee008dda4fbeb928d298fec68ae
parent8c8bdfeb2b33e42fbcd1cfde3a53efcf02ce18ff (diff)
downloadselinux-77582ef1a6425caa53288dfc1c0071db89923fa5.tar.gz
selinux-77582ef1a6425caa53288dfc1c0071db89923fa5.tar.xz
Add libselinux
Change-Id: I194fa894b5be7e1e82ce37763cc68f8dbb3616aa Reviewed-on: https://galileo.mailstation.de/gerrit/5970 Retest: Julien Pivotto <roidelapluie@inuits.eu> Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Wulf C. Krueger <philantrop@exherbo.org>
-rw-r--r--packages/security/libselinux/files/libselinux-prefix-build-tools.patch42
-rw-r--r--packages/security/libselinux/libselinux-2.5.exheres-050
2 files changed, 92 insertions, 0 deletions
diff --git a/packages/security/libselinux/files/libselinux-prefix-build-tools.patch b/packages/security/libselinux/files/libselinux-prefix-build-tools.patch
new file mode 100644
index 0000000..eeda423
--- /dev/null
+++ b/packages/security/libselinux/files/libselinux-prefix-build-tools.patch
@@ -0,0 +1,42 @@
+Source: exherbo-specific
+Upstream: yes
+Reason: Use prefixed build tools
+
+diff --git a/src/Makefile b/src/Makefile
+index d0021ae..67c2d47 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -5,6 +5,7 @@ PYTHON ?= python
+ PYPREFIX ?= $(notdir $(PYTHON))
+ RUBY ?= ruby
+ RUBYPREFIX ?= $(notdir $(RUBY))
++PKG_CONFIG ?= pkg-config
+
+ # Installation directories.
+ PREFIX ?= $(DESTDIR)/usr
+@@ -12,11 +13,11 @@ LIBDIR ?= $(PREFIX)/lib
+ SHLIBDIR ?= $(DESTDIR)/lib
+ INCLUDEDIR ?= $(PREFIX)/include
+ PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
+-PYINC ?= $(shell pkg-config --cflags $(PYPREFIX))
++PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
+ PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
+ RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
+ RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM')
+-RUBYINC ?= $(shell pkg-config --cflags ruby)
++RUBYINC ?= $(shell $(PKG_CONFIG) --cflags ruby)
+ RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
+ LIBBASE ?= $(shell basename $(LIBDIR))
+
+diff --git a/src/exception.sh b/src/exception.sh
+index b7cff7e..a58bf3f 100755
+--- a/src/exception.sh
++++ b/src/exception.sh
+@@ -15,6 +15,6 @@ echo "
+ ;;
+ esac
+ }
+-gcc -x c -c -I../include - -aux-info temp.aux < ../include/selinux/selinux.h
++${CC:-gcc} -x c -c -I../include - -aux-info temp.aux < ../include/selinux/selinux.h
+ for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except $i ; done
+ rm -f -- temp.aux -.o
diff --git a/packages/security/libselinux/libselinux-2.5.exheres-0 b/packages/security/libselinux/libselinux-2.5.exheres-0
new file mode 100644
index 0000000..ccae5f2
--- /dev/null
+++ b/packages/security/libselinux/libselinux-2.5.exheres-0
@@ -0,0 +1,50 @@
+# Copyright 2016 Julien Pivotto <roidelapluie@inuits.eu>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ user=SELinuxProject tag="${PNV}" pn=selinux ]
+require python [ blacklist=none multibuild=true with_opt=true multiunpack=true work="selinux-${PNV}/${PN}" ]
+
+SUMMARY="SELinux runtime shared libraries"
+DESCRIPTION="Shared libraries used by SELinux that are used by SELinux-aware applications to get
+and set process and file security contexts and to obtain security policy decisions."
+
+BUGS_TO="roidelapluie@inuits.eu"
+
+LICENCES="public-domain"
+SLOT="0"
+PLATFORMS="~amd64"
+MYOPTIONS="python"
+
+DEPENDENCIES="
+ build+run:
+ dev-libs/pcre
+ dev-libs/ustr
+ security/libsepol[~${PV}]
+ python? ( dev-lang/swig )
+"
+
+DEFAULT_SRC_PREPARE_PATCHES+=( "${FILES}/${PN}-prefix-build-tools.patch" )
+
+DEFAULT_SRC_INSTALL_PARAMS=(
+ DESTDIR="${IMAGE}"
+ PREFIX="${IMAGE}/usr/$(exhost --target)"
+ SBINDIR="${IMAGE}/usr/$(exhost --target)/bin"
+ SHLIBDIR="${IMAGE}/usr/$(exhost --target)/lib"
+ USRBINDIR="${IMAGE}/usr/$(exhost --target)/bin"
+)
+
+compile_one_multibuild(){
+ default
+ optionq python && emake pywrap \
+ INCLUDEDIR="$(python_get_incdir)" \
+ PYINC="$(python_get_incdir)" \
+ PYTHON="${PYTHON}"
+}
+
+install_one_multibuild(){
+ default
+ optionq python && emake install-pywrap \
+ "${DEFAULT_SRC_INSTALL_PARAMS[@]}" \
+ PYTHON="${PYTHON}"
+}
+