summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTimothée Ravier2013-11-03 19:42:41 +0100
committerTimothée Ravier2013-11-03 19:42:41 +0100
commitedda895cf9089b67d470e09aa4787ff7c66f9eff (patch)
tree497929156be9b4e257fe24e0340029a0f2400ede /PKGBUILD
downloadaur-edda895cf9089b67d470e09aa4787ff7c66f9eff.tar.gz
General update: SELinux userspace & pkg renaming
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 44 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9955c474b1a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Timothée Ravier <tim@siosm.fr>
+# Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
+# Contributor: Sergej Pupykin (pupykin <dot> s+arch <at> gmail <dot> com)
+
+pkgname=libselinux
+pkgver=2.2
+pkgrel=1
+pkgdesc="SELinux library and simple utilities"
+arch=('i686' 'x86_64')
+url='http://userspace.selinuxproject.org'
+license=('GPL')
+groups=('selinux')
+depends=('libsepol>=2.2' 'python2' 'python' 'swig' 'ruby')
+options=(!emptydirs)
+source=("http://userspace.selinuxproject.org/releases/20131030/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('e9dc64216543a7283d786f623ac28e8867f8794138e7deba474a3aa8d02dce33')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ sed -i 's|pkg-config --cflags ruby|pkg-config --cflags ruby-2.0|' src/Makefile
+ sed -i 's|site_ruby|vendor_ruby|' src/Makefile
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ make swigify
+ make all
+ make PYTHON=python2 pywrap
+ make PYTHON=python3 pywrap
+ make rubywrap
+}
+
+package(){
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python2 install-pywrap
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python3 install-pywrap
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install-rubywrap
+
+ # /usr/lib/libselinux.so fix
+ cd "${pkgdir}"/usr/lib
+ rm libselinux.so
+ ln -s libselinux.so.1 libselinux.so
+}