summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b4efc6c84640db8c66fbb2db775a42600d95b457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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)
#
# 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=selinux-refpolicy-arch
_reponame=selinux-policy-arch
_policyname=refpolicy-arch
pkgver=20190609
pkgrel=2
pkgdesc="Modular SELinux reference policy including headers and docs with Arch Linux patches"
arch=('any')
url="https://github.com/SELinuxProject/refpolicy/wiki"
license=('GPL2')
groups=('selinux')
makedepends=('git' 'python' 'checkpolicy>=2.7' 'semodule-utils')
depends=('policycoreutils>=2.7')
optdepends=('linux-hardened: Linux kernel with SELinux support'
            'linux-selinux: Linux kernel with SELinux support')
install="${pkgname}.install"
_commit=10dc44140b89630c5c0d3ecc5a40afe7b5e91eb7
source=("git+https://github.com/archlinuxhardened/${_reponame}#commit=${_commit}"
        'config')
sha256sums=('SKIP'
            'c9f7cce9a06fd0595b3dd47d4fdde9d9c7457120c42c5f08bfdc5e89eb9a61df')

prepare() {
  cd "${srcdir}/${_reponame}"

  make bare
  make conf
}

build() {
  cd "${srcdir}/${_reponame}"
  make
}

package() {
  cd "${srcdir}/${_reponame}"
  make DESTDIR="${pkgdir}" install
  make DESTDIR="${pkgdir}" install-headers
  make DESTDIR="${pkgdir}" PKGNAME="${_policyname}" install-docs

  # Create /var/lib/selinux, which is necessary for loading policy,
  # which is done via install script.
  install -d -m0755 "${pkgdir}/var/lib/selinux"

  # Install main SELinux config file besides /etc/selinux/config.
  # The install script will create a symlink.
  install -m644 -D "${srcdir}/config" "${pkgdir}/etc/selinux/config.${_policyname}"
}