updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / libcgroup-git / PKGBUILD
blobbd4376f3c6e433c7e49d027ebff9bcaebd053bd2
1 # Maintainer: Dave Reisner <d@falconindy.com>
3 pkgname=libcgroup-git
4 pkgver=20120106
5 pkgrel=1
6 pkgdesc="Library that abstracts the control group file system in Linux"
7 arch=('i686' 'x86_64')
8 url="http://libcg.sourceforge.net"
9 license=('LGPL')
10 makedepends=('git')
11 source=('cgconfig' 'cgred')
12 provides=('libcgroup')
13 conflicts=('libcgroup')
14 backup=('etc/conf.d/cgred'
15         'etc/conf.d/cgconfig'
16         'etc/cgconfig.conf'
17         'etc/cgrules.conf')
18 md5sums=('54e64c0eaa4eafcef947d3824dc82bbb'
19          'ccc0891adbd8863dc11b7bcc339f22d5')
21 _gitroot="git://libcg.git.sourceforge.net/gitroot/libcg/libcg"
22 _gitname="libcg"
24 build() {
25   msg "Connecting to GIT server...."
27   if [[ -d $_gitname ]] ; then
28     cd $_gitname && git pull origin
29     msg "The local files are updated."
30   else
31     git clone $_gitroot $_gitname
32   fi
34   msg "GIT checkout done or server timeout"
35   msg "Starting make..."
37   rm -rf "$srcdir/$_gitname-build"
38   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
39   cd "$srcdir/$_gitname-build"
41   ./bootstrap.sh
42   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
43               --enable-pam-module-dir=/lib/security
45   # build breaks with -j13. maybe it works reliably with less
46   unset MAKEFLAGS
48   make
51 package() {
52   cd "$srcdir/$_gitname-build"
54   make DESTDIR="$pkgdir" install
56   install -Dm644 samples/cgred.conf "$pkgdir/etc/conf.d/cgred"
57   install -Dm644 samples/cgconfig.sysconfig "$pkgdir/etc/conf.d/cgconfig"
58   install -Dm644 samples/cgconfig.conf "$pkgdir/etc/cgconfig.conf"
59   install -Dm644 samples/cgrules.conf "$pkgdir/etc/cgrules.conf"
61   cd "$pkgdir"
63   rm -rf etc/rc.d
64   install -Dm755 "$srcdir/cgred" etc/rc.d/cgred
65   install -Dm755 "$srcdir/cgconfig" etc/rc.d/cgconfig