updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / hge-unix-hg / PKGBUILD
blob148507965794f1c00ca4e694bf413a1ede81d3b4
1 # Maintainer: Harley Laue <losinggeneration@gmail.com>
2 pkgname=hge-unix-hg
3 pkgver=170
4 pkgrel=1
5 pkgdesc="A C/C++ library for creating hardware accelerated 2D games."
6 arch=(i686 x86_64)
7 url="http://code.google.com/p/hge-unix/"
8 license=('zlib')
9 depends=(sdl openal libpng libjpeg libvorbis)
10 makedepends=('mercurial')
11 provides=('hge-unix')
12 conflicts=('hge-unix')
14 _hgroot=https://code.google.com/p
15 _hgrepo=hge-unix
17 build() {
18   cd "$srcdir"
19   msg "Connecting to Mercurial server...."
21   if [[ -d "$_hgrepo" ]]; then
22     cd "$_hgrepo"
23     hg pull -u
24     msg "The local files are updated."
25   else
26     hg clone "$_hgroot" "$_hgrepo"
27   fi
29   msg "Mercurial checkout done or server timeout"
30   msg "Starting build..."
32   [ -d "$srcdir/$_hgrepo/build" ] && rm -rf "$srcdir/$_hgrepo/build"
33   mkdir "$srcdir/$_hgrepo/build"
34   cd "$srcdir/$_hgrepo/build"
36   cmake -DCMAKE_INSTALL_PREFIX=/usr ..
37   make
40 package() {
41   cd "$srcdir/$_hgrepo/build"
42   make DESTDIR="$pkgdir/" install
43   install -D -m644 "$srcdir/$_hgrepo/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
46 # vim:set ts=2 sw=2 et: