summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD71
1 files changed, 28 insertions, 43 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ff7d7e0c4e3..6ccc44b4d8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,48 +1,47 @@
-# Maintainer: Nicky726 (Nicky726 <at> gmail <dot> com)
+# Maintainer: Nicolas Iooss (nicolas <dot> iooss <at> m4x <dot> org)
+# Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
# Contributor: Simon Peter Nicholls (simon <at> mintsource <dot> org)
pkgname=selinux-refpolicy-arch
_origname=refpolicy
_policyname=refpolicy-arch
-_origver=20110726
-_patchver=1
+_origver=20151208
+_patchver=0
pkgver=${_origver}.${_patchver}
-pkgrel=3
+pkgrel=1
pkgdesc="Modular SELinux reference policy including headers and docs with Arch Linux patch"
arch=('any')
url="http://oss.tresys.com/projects/refpolicy"
license=('GPL')
-groups=('selinux' 'selinux-policies')
+groups=('selinux')
depends=('linux-selinux')
-makedepends=('selinux-usr-checkpolicy>=2.0.16' 'selinux-usr-policycoreutils>=2.0.0'
- 'selinux-usr-libsepol>=2.0.29' 'selinux-usr-libsemanage>=2.0.29'
- 'pyxml')
-conflicts=('selinux-refpolicy')
+makedepends=('checkpolicy>=2.1.8' 'policycoreutils>=2.1.10'
+ 'libsepol>=2.1.4' 'libsemanage>=2.0.29')
backup=(etc/selinux/config)
-options=(!makeflags)
install=${pkgname}.install
-source=(http://oss.tresys.com/files/${_origname}/${_origname}-2.${_origver}.tar.bz2
- config
- ${pkgname}.patch)
-sha256sums=('8159b7535aa0f805510e4e3504b1317d7083b227f0ef3df51c6f002ed70ecedb'
- '4803739c58a47b0226899e41239df714ee72e86267c9929d4776b819de370cb4'
- 'b03d8afcc71f0d67ba3c8688003f353c27d00bf8a87ef925e23c54fafe2d4880')
+source=(https://raw.githubusercontent.com/wiki/TresysTechnology/${_origname}/files/${_origname}-2.${_origver}.tar.bz2
+ config)
+sha256sums=('2dd2f45a7132137afe8302805c3b7839739759b9ab73dd1815c01afe34ac99de'
+ 'c9f7cce9a06fd0595b3dd47d4fdde9d9c7457120c42c5f08bfdc5e89eb9a61df')
-build() {
+prepare() {
cd "${srcdir}/${_origname}"
# Add Arch Linux patch
- patch -Np1 -i "${srcdir}/${pkgname}.patch"
+ #patch -Np1 -i "${srcdir}/${pkgname}.patch"
+
# Policy build settings
- sed -i -e "s/MONOLITHIC = y/MONOLITHIC = n/" build.conf
- sed -i -e "s/#UNK_PERMS = deny/UNK_PERMS = allow/" build.conf
- sed -i -e "s/DIRECT_INITRC = n/DIRECT_INITRC = y/" build.conf
- sed -i -e "s/UBAC = y/UBAC = n/" build.conf
- sed -i -e "s/NAME = refpolicy/NAME = refpolicy-arch/" build.conf
- sed -i -e "s/#DISTRO = redhat/DISTRO = arch/" build.conf
- # Fix for python2
- sed -i -e "s/python/python2/" Makefile
+ sed -i -e "s/^NAME = refpolicy/NAME = ${_policyname}/" build.conf
+ sed -i -e "s/^#DISTRO = redhat/DISTRO = arch/" build.conf
+ sed -i -e "s/^UNK_PERMS = deny/UNK_PERMS = allow/" build.conf
+ sed -i -e "s/^SYSTEMD = n/SYSTEMD = y/" build.conf
+ sed -i -e "s/^UBAC = y/UBAC = n/" build.conf
+
make bare
make conf
+}
+
+build() {
+ cd "${srcdir}/${_origname}"
make
}
@@ -50,26 +49,12 @@ package(){
cd "${srcdir}/${_origname}"
make DESTDIR="${pkgdir}" install
make DESTDIR="${pkgdir}" install-headers
- make DESTDIR="${pkgdir}" install-docs
+ make DESTDIR="${pkgdir}" PKGNAME="${_policyname}" install-docs
- # Create some files and directories necesary for loading policy,
+ # Create /var/lib/selinux, which is necessary for loading policy,
# which is done via install script.
- install -d -m0755 "${pkgdir}/etc/selinux/${_policyname}/modules"
- install -d -m0700 "${pkgdir}/etc/selinux/${_policyname}/modules/active"
- install -d -m0700 "${pkgdir}/etc/selinux/${_policyname}/modules/active/modules"
- install -d -m0755 "${pkgdir}/etc/selinux/${_policyname}/policy"
- touch "${pkgdir}/etc/selinux/${_policyname}/modules/"{semanage.read.LOCK,semanage.trans.LOCK}
- touch "${pkgdir}/etc/selinux/${_policyname}/policy/policy.26"
- # Link the policy file for selinux-sysvinit to find it
- cd "${pkgdir}/etc"
- ln -s "selinux/${_policyname}/policy/policy.26" "policy.bin"
+ install -d -m0755 "${pkgdir}/var/lib/selinux"
# Install main SELinux config file defaulting to refpolicy
install -m644 -D "${srcdir}/config" "${pkgdir}/etc/selinux/config"
-
- # Some changes due to python2
- sed -i -e "s/python/python2/" \
- "${pkgdir}/usr/share/selinux/${_policyname}/include/support/segenxml.py"
- sed -i -e "s/python/python2/" \
- "${pkgdir}/usr/share/selinux/${_policyname}/include/Makefile"
}