PKGBUILD 2.29 KB
Newer Older
Jan Mette's avatar
Jan Mette committed
1
# $Id: PKGBUILD 72649 2010-03-19 03:09:56Z allan $
Jan Mette's avatar
Jan Mette committed
2 3 4 5 6
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=coreutils
pkgver=8.4
Jan Mette's avatar
Jan Mette committed
7
pkgrel=2
Jan Mette's avatar
Jan Mette committed
8 9 10 11 12
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
arch=('i686' 'x86_64')
license=('GPL3')
url="http://www.gnu.org/software/coreutils"
groups=('base')
Jan Mette's avatar
Jan Mette committed
13
depends=('glibc' 'shadow' 'pam' 'acl' 'gmp>=5.0' 'libcap')
Jan Mette's avatar
Jan Mette committed
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
provides=('mktemp')
conflicts=('mktemp')
replaces=('sh-utils' 'fileutils' 'textutils' 'mktemp')
backup=('etc/pam.d/su')
install=${pkgname}.install
options=('!emptydirs')
source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
	coreutils-i18n.patch
	coreutils-uname.patch
	coreutils-pam.patch
	coreutils-6.10-configuration.patch
	su)
md5sums=('56f549854d723d9dcebb77919019df55'
         'f88e6b4ce09e6d453f595d46d2a153b2'
         'c4fcca138b6abf6d443d48a6f0cd8833'
         '7efee4d5b3653711f9e229493316841c'
         'dd4f472de8380104af3ac0ef920fae8b'
         'fa85e5cce5d723275b14365ba71a8aad')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # added pam patch and i18n patch from fedora cvs
  patch -Np1 -i $srcdir/coreutils-pam.patch || return 1
  patch -Np1 -i $srcdir/coreutils-i18n.patch || return 1
  patch -Np1 -i $srcdir/coreutils-6.10-configuration.patch || return 1

  # from gentoo portage
  patch -Np1 -i $srcdir/coreutils-uname.patch || return 1

  autoreconf -v
  ./configure --prefix=/usr \
              --enable-install-program=su \
              --enable-pam ac_cv_func_openat=no || return 1
  make || return 1
  make DESTDIR=${pkgdir} install || return 1

  for f in hostname uptime groups kill; do
    rm -f ${pkgdir}/usr/{bin/${f},share/man/man1/${f}.1} || return 1
  done
  
  cd ${pkgdir}/usr/bin
  install -dm755 ${pkgdir}/{bin,usr/sbin}
  
  # binaries required by FHS
  _fhs="cat chgrp chmod chown cp date dd df echo false ln ls \
        mkdir mknod mv pwd rm rmdir stty su sync true uname"
  mv ${_fhs} $pkgdir/bin
  ls -lha ${pkgdir}/bin/su
  chmod -v 4555 ${pkgdir}/bin/su

  # binaries required by various scripts
  _bin="cut dir dircolors du install mkfifo readlink shred \
        sleep touch tr vdir"
  mv ${_bin} $pkgdir/bin
  ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
    
  mv chroot $pkgdir/usr/sbin
  ln -sf test [
  install -Dm644 $srcdir/su ${pkgdir}/etc/pam.d/su
}