| # Maintainer: Nicky726 (Nicky726 <at> gmail <dot> com) | |
| # Contributor: Sergej Pupykin (pupykin <dot> s+arch <at> gmail <dot> com) | |
| # Contributor: angelux/xangelux (xangelux <at> gmail <dot> com) | |
| pkgname=selinux-usr-policycoreutils | |
| _origname=policycoreutils | |
| _release=20120924 | |
| pkgver=2.1.13 | |
| pkgrel=1 | |
| pkgdesc="SELinux userspace (policycoreutils)" | |
| arch=('i686' 'x86_64') | |
| url="http://userspace.selinuxproject.org" | |
| license=('GPL') | |
| groups=('selinux' 'selinux-userspace') | |
| depends=('selinux-usr-libsemanage>=2.1.0' 'selinux-usr-libselinux>=2.1.0' 'python2' 'libcap-ng' 'libcgroup') | |
| options=(!emptydirs) | |
| source=(http://userspace.selinuxproject.org/releases/${_release}/${_origname}-${pkgver}.tar.gz | |
| restorecond) | |
| sha256sums=('34040f06f3111d9ee957576e4095841d35b9ca9141ee8d80aab036cbefb28584' | |
| '8b207474f1a195fe848442c271c8af7e9a1c77e52b43b19165445d68d7d79888') | |
| build() { | |
| cd "${srcdir}/${_origname}-${pkgver}" | |
| sed -i -e "s/shell python -c/shell python2 -c/" "semanage/Makefile" | |
| sed -i -e "s/shell python -c/shell python2 -c/" "sandbox/Makefile" | |
| make | |
| } | |
| package(){ | |
| cd "${srcdir}/${_origname}-${pkgver}" | |
| make DESTDIR="${pkgdir}" install | |
| # Move daemons to correct locations | |
| mv "${pkgdir}/etc/rc.d/init.d/restorecond" \ | |
| "${pkgdir}/etc/rc.d/" | |
| sed -i -e "s/init.d\/functions/functions.d/g" \ | |
| "${pkgdir}/etc/rc.d/restorecond" | |
| # Following are python2 scripts | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/bin/audit2allow" | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/bin/audit2why" | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/bin/chcat" | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/bin/sepolgen-ifgen" | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/sbin/semanage" | |
| sed -i -e "s/python -E/python2 -E/" \ | |
| "${pkgdir}/usr/lib/python2.7/site-packages/seobject.py" | |
| } |
| [Unit] | |
| Description=Restorecon maintaining path file context | |
| After=syslog.target | |
| ConditionPathExists=/etc/selinux/restorecond.conf | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/sbin/restorecond | |
| RemainAfterExit=yes | |
| [Install] | |
| WantedBy=multi-user.target |