summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD52
2 files changed, 38 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a1e12cba5cf..522ee5aae69a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,9 +3,12 @@ pkgbase = libselinux-python2
pkgver = 3.4
pkgrel = 1
url = http://userspace.selinuxproject.org
- arch = i686
arch = x86_64
+ arch = i686
+ arch = pentium4
arch = armv6h
+ arch = armv7h
+ arch = aarch64
groups = selinux
license = custom
makedepends = python
diff --git a/PKGBUILD b/PKGBUILD
index 450eb0a1a454..2aa9a07aa926 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,26 +3,37 @@
# This PKGBUILD is maintained on https://github.com/archlinuxhardened/selinux.
# If you want to help keep it up to date, please open a Pull Request there.
-pkgname=libselinux-python2
+_pkg="selinux"
+_lib="lib${_pkg}"
+pkgname="${_lib}-python2"
pkgver=3.4
pkgrel=1
pkgdesc="SELinux library and simple utilities (python 2.x bindings)"
-arch=('i686' 'x86_64' 'armv6h')
-url='http://userspace.selinuxproject.org'
+arch=('x86_64' 'i686' 'pentium4' 'armv6h' 'armv7h' 'aarch64')
+url="http://userspace.${_pkg}project.org"
license=('custom')
-groups=('selinux')
-makedepends=('python' 'python2' 'ruby' 'xz' 'swig')
+groups=("${_pkg}")
+makedepends=(
+ 'python'
+ 'python2'
+ 'ruby'
+ 'xz'
+ 'swig')
depends=('libsepol>=3.0' 'pcre')
-optdepends=('python: python bindings'
- 'python2: python 2.X bindings'
- 'ruby: ruby bindings')
-source=("https://github.com/SELinuxProject/selinux/releases/download/${pkgver}/libselinux-${pkgver}.tar.gz"
- "libselinux.tmpfiles.d")
-sha256sums=('77c294a927e6795c2e98f74b5c3adde9c8839690e9255b767c5fca6acff9b779'
- 'afe23890fb2e12e6756e5d81bad3c3da33f38a95d072731c0422fbeb0b1fa1fc')
+optdepends=(
+ 'python: python bindings'
+ 'python2: python 2.X bindings'
+ 'ruby: ruby bindings')
+_repo_url="https://github.com/SELinuxProject/${_pkg}"
+source=(
+ "${_repo_url}/releases/download/${pkgver}/${_lib}-${pkgver}.tar.gz"
+ "${_lib}.tmpfiles.d")
+sha256sums=(
+ '77c294a927e6795c2e98f74b5c3adde9c8839690e9255b767c5fca6acff9b779'
+ 'afe23890fb2e12e6756e5d81bad3c3da33f38a95d072731c0422fbeb0b1fa1fc')
build() {
- cd "libselinux-${pkgver}"
+ cd "${_lib}-${pkgver}"
# Do not build deprecated rpm_execcon() interface. It is useless on Arch Linux anyway.
export DISABLE_RPM=y
@@ -35,12 +46,17 @@ build() {
}
package() {
- cd "libselinux-${pkgver}"
+ cd "${_lib}-${pkgver}"
export DISABLE_RPM=y
- make DESTDIR="${pkgdir}" PYTHON=/usr/bin/python2 SBINDIR=/usr/bin SHLIBDIR=/usr/lib install-pywrap
- /usr/bin/python2 -m compileall "${pkgdir}/$(/usr/bin/python2 -c 'from distutils.sysconfig import *; print(get_python_lib(plat_specific=1))')"
- /usr/bin/python2 -O -m compileall "${pkgdir}/$(/usr/bin/python2 -c 'from distutils.sysconfig import *; print(get_python_lib(plat_specific=1))')"
-
+ make DESTDIR="${pkgdir}" \
+ PYTHON=/usr/bin/python2 \
+ SBINDIR=/usr/bin \
+ SHLIBDIR=/usr/lib \
+ install-pywrap
+ /usr/bin/python2 -m compileall \
+ "${pkgdir}/$(/usr/bin/python2 -c 'from distutils.sysconfig import *; print(get_python_lib(plat_specific=1))')"
+ /usr/bin/python2 -O -m compileall \
+ "${pkgdir}/$(/usr/bin/python2 -c 'from distutils.sysconfig import *; print(get_python_lib(plat_specific=1))')"
}