updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / util-linux-git / PKGBUILD
blobe64ec06b3da38487aaceb3a4da8dd34c11e5294c
1 # Contributor: Dave Reisner <d@falconindy.com>
3 pkgname=util-linux-git
4 pkgver=20120113
5 pkgrel=1
6 pkgdesc="Miscellaneous system utilities for Linux - the GIT version"
7 url="http://userweb.kernel.org/~kzak/util-linux/"
8 arch=('i686' 'x86_64')
9 license=('GPL2')
10 depends=('bash' 'zlib')
11 makedepends=('git')
12 provides=('util-linux-ng=2.21' 'util-linux=2.21')
13 conflicts=('util-linux-ng' 'util-linux')
14 replaces=('util-linux-ng')
15 options=('!libtool')
16 optdepends=('perl: for chkdupexe support')
18 _gitroot="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
19 _gitname="util-linux"
21 build() {
22   msg "Connecting to GIT server...."
24   if [[ -d $_gitname ]] ; then
25     cd "$_gitname" && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot $_gitname
29   fi
31   msg "GIT checkout done or server timeout"
33   rm -rf "$srcdir/$_gitname-build"
34   git clone "$srcdir/$_gitname"{,-build}
35   cd "$srcdir/$_gitname-build"
37   # alter location of adjtime file for FHS
38   sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@' -i hwclock/hwclock.c
40   msg "Configuring..."
41   ./autogen.sh
42   ./configure \
43       --enable-write \
44       --enable-raw \
45       --disable-wall \
46       --enable-partx \
47       --enable-new-mount
49   msg "Starting make..."
50   make
53 package() {
54   make -C "$_gitname-build" DESTDIR="$pkgdir" install
56   # create adjtime file's dir
57   install -dm755 "$pkgdir/var/lib/hwclock"