updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / selinux-coreutils / PKGBUILD
blobe5d148ecc775158892119df1afe7806bfb27e624
1 # $Id: PKGBUILD 146601 2012-01-14 00:30:44Z allan $
2 # Maintainer: Allan McRae <allan@archlinux.org>
3 # Maintainer: Nicky726 <Nicky726@gmail.com>
4 # Contributor: judd <jvinet@zeroflux.org>
6 pkgname=selinux-coreutils
7 _origname=coreutils
8 pkgver=8.15
9 pkgrel=1
10 pkgdesc="SELinux aware basic file, shell and text manipulation utilities of the GNU operating system"
11 arch=('i686' 'x86_64')
12 license=('GPL3')
13 url="http://www.gnu.org/software/coreutils"
14 groups=('selinux' 'selinux-system-utilities')
15 depends=('glibc' 'selinux-shadow' 'selinux-pam' 'acl' 'gmp' 'libcap' 'selinux-usr-libselinux')
16 conflicts=("${_origname}")
17 replaces=('mktemp')
18 provides=("${_origname}=${pkgver}-${pkgrel}")
19 backup=('etc/pam.d/su')
20 install=${_origname}.install
21 options=('!emptydirs')
22 source=(ftp://ftp.gnu.org/gnu/$_origname/$_origname-$pkgver.tar.xz{,.sig}
23         coreutils-uname.patch
24         coreutils-pam.patch
25         su.pam)
26 md5sums=('094909fafa86110140b32e4948941545'
27          '2cdd273d93a77d03739fa81d7c2acfe5'
28          'c4fcca138b6abf6d443d48a6f0cd8833'
29          'aad79a2aa6d566c375d7bdd1b0767278'
30          'fa85e5cce5d723275b14365ba71a8aad')
32 build() {
33   cd ${srcdir}/${_origname}-${pkgver}
35   # added su wheel group pam patch (from fedora git)
36   patch -Np1 -i ${srcdir}/coreutils-pam.patch
38   # linux specific uname improvement (from gentoo portage)
39   patch -Np1 -i ${srcdir}/coreutils-uname.patch
41   autoreconf -v
42   ./configure --prefix=/usr --libexecdir=/usr/lib/coreutils \
43               --enable-install-program=su \
44               --enable-no-install-program=groups,hostname,kill,uptime \
45               --enable-pam
46   make
49 check() {
50   cd ${srcdir}/${_origname}-${pkgver}
51   make RUN_EXPENSIVE_TESTS=yes check
54 package() {
55   cd ${srcdir}/${_origname}-${pkgver}
56   make DESTDIR=${pkgdir} install
57   
58   cd ${pkgdir}/usr/bin
59   install -dm755 ${pkgdir}/{bin,usr/sbin}
60   
61   # binaries required by FHS
62   _fhs="cat chgrp chmod chown cp date dd df echo false ln ls \
63         mkdir mknod mv pwd rm rmdir stty su sync true uname"
64   mv ${_fhs} ${pkgdir}/bin
66   # binaries required by various Arch scripts
67   _bin="cut dir dircolors du install mkfifo readlink shred \
68         sleep touch tr vdir"
69   mv ${_bin} ${pkgdir}/bin
70   ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
72   mv chroot ${pkgdir}/usr/sbin
73   install -Dm644 ${srcdir}/su.pam ${pkgdir}/etc/pam.d/su