updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / libdraw-hg / PKGBUILD
blobd1476d9507b4147ef06b63dcecde033d415e04de
1 # Contributor: Matthew Bauer <mjbauer95@gmail.com>
2 _pkgname=libdraw
3 pkgname=$_pkgname-hg
4 pkgver=3
5 pkgrel=1
6 pkgdesc="libdraw, drawing library from suckless.org"
7 arch=(i686 x86_64)
8 url="http://hg.suckless.org/libdraw"
9 license=('GPL')
10 groups=()
11 depends=()
12 makedepends=('mercurial' 'gcc' 'binutils' 'make' 'sed' 'coreutils')
13 provides=()
14 conflicts=()
15 replaces=()
16 backup=()
17 options=()
18 install=
19 source=()
20 noextract=()
21 md5sums=() #generate with 'makepkg -g'
23 _hgroot="http://hg.suckless.org/"
24 _hgrepo="$_pkgname"
26 build() {
27   cd "$srcdir"
28   msg "Connecting to Mercurial server...."
30   if [ -d $_hgrepo ] ; then
31     cd $_hgrepo
32     make clean
33     hg pull -u || return 1
34     msg "The local files are updated."
35   else
36     hg clone $_hgroot $_hgrepo || return 1
37   fi
39   msg "Mercurial checkout done or server timeout"
40   msg "Starting make..."
42   rm -rf "$srcdir/$_hgrepo-build"
43   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
44   cd "$srcdir/$_hgrepo-build"
46   make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
49 package() {
50   cd "$srcdir/$_hgrepo-build"
52   make PREFIX=/usr DESTDIR=$pkgdir install
53   
54   install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE