# $Id: PKGBUILD 170098 2012-11-01 17:28:55Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Eric BĂ©langer <eric@archlinux.org>

pkgname=procps-ng
pkgver=3.3.5
pkgrel=1
pkgdesc='Utilities for monitoring your system and its processes'
url="http://gitorious.org/procps"
license=('GPL' 'LGPL')
arch=('i686' 'x86_64')
groups=('base')
depends=('ncurses')
conflicts=('procps')
provides=('procps')
replaces=('procps')
backup=('etc/sysctl.conf')
options=('!libtool')
source=("procps-ng-${pkgver}.tar.gz::http://gitorious.org/procps/procps/archive-tarball/v${pkgver}"
        'sysctl.conf')
sha1sums=('f591f2ff01f8866daf8999f45b797d18929b7aec'
          '97ff07bab9aa5daa8d54a1346f73ba74f8e12a53')

build() {
	cd "${srcdir}/procps-procps"
	echo ${pkgver} > .tarball-version
	./autogen.sh
	./configure --exec-prefix=/ --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
	make
}

package() {
	cd "${srcdir}/procps-procps"
	make DESTDIR="${pkgdir}" install
	install -D -m644 ../sysctl.conf "${pkgdir}/etc/sysctl.conf"

	# provided by util-linux
	rm "${pkgdir}/bin/kill"
	rm "${pkgdir}/usr/share/man/man1/kill.1"
}