1 # Maintainer: Dave Reisner <d@falconindy.com>
6 pkgdesc="Library that abstracts the control group file system in Linux"
8 url="http://libcg.sourceforge.net"
11 source=('cgconfig' 'cgred')
12 provides=('libcgroup')
13 conflicts=('libcgroup')
14 backup=('etc/conf.d/cgred'
18 md5sums=('54e64c0eaa4eafcef947d3824dc82bbb'
19 'ccc0891adbd8863dc11b7bcc339f22d5')
21 _gitroot="git://libcg.git.sourceforge.net/gitroot/libcg/libcg"
25 msg "Connecting to GIT server...."
27 if [[ -d $_gitname ]] ; then
28 cd $_gitname && git pull origin
29 msg "The local files are updated."
31 git clone $_gitroot $_gitname
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"
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
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"
64 install -Dm755 "$srcdir/cgred" etc/rc.d/cgred
65 install -Dm755 "$srcdir/cgconfig" etc/rc.d/cgconfig