updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / kfortune-git / PKGBUILD
blob3831109e31df368ce9af88b24ea071da0e3f99a1
1 # Contributor: Vojtech Kral <kral.vojtech (at) gmail.com>
3 pkgname=kfortune-git
4 pkgver=20120106
5 pkgrel=1
6 pkgdesc="kernel-space remake of the popular fortune program"
7 arch=('i686' 'x86_64')
8 url="https://github.com/kralyk/kfortune"
9 license=('GPL')
11 makedepends=('git')
12 install=install
13 source=()
14 md5sums=()
16 _gitroot="git://github.com/kralyk/kfortune.git"
17 _gitname="kfortune"
18 _builddir=$_gitname-build
20 build()
22   cd "$srcdir"
23   msg "Connecting to GIT server...."
25   if [ -d $_gitname ] ; then
26     cd $_gitname && git pull origin
27     msg "The local files are updated."
28   else
29     git clone $_gitroot $_gitname
30   fi
32   msg "GIT checkout done or server timeout"
33   msg "Starting make..."
35   rm -rf "$srcdir/$_builddir"
36   git clone "$srcdir/$_gitname" "$srcdir/$_builddir"
37   cd "$srcdir/$_builddir"
39   make
42 package()
44   cd "$srcdir/$_builddir"
45   gzip -c9 'README.6' > 'kfortune.6.gz'
46   install -D -m 755 'kfortune.ko' "$pkgdir/lib/modules/`uname -r`/kernel/drivers/char/kfortune.ko"
47   install -D -m 644 'kfortune.6.gz' "$pkgdir/usr/share/man/man6/kfortune.6.gz"