updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ogre-procedural-hg / PKGBUILD
blob6a851edc94ed93514cf0e9d247973f9987b4e46e
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 pkgname=ogre-procedural-hg
3 pkgver=189
4 pkgrel=1
5 pkgdesc="Procedural geometry for Ogre3D"
6 arch=(i686 x86_64)
7 url="http://code.google.com/p/ogre-procedural/"
8 license=('MIT')
9 depends=('ogre')
10 makedepends=('mercurial')
11 provides=('ogre-procedural')
12 conflicts=('ogre-procedural')
13 source=()
14 md5sums=()
16 _hgroot="https://ogre-procedural.googlecode.com/hg"
17 _hgrepo="ogre-procedural"
19 build() {
20   cd "$srcdir"
21   msg "Connecting to Mercurial server...."
23   if [ -d $_hgrepo ] ; then
24     cd $_hgrepo
25     hg pull -u
26     msg "The local files are updated."
27   else
28     hg clone $_hgroot $_hgrepo
29   fi
31   msg "Mercurial checkout done or server timeout"
32   msg "Starting make..."
34   rm -rf "$srcdir/$_hgrepo-build"
35   cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
36   cd "$srcdir/$_hgrepo-build"
38   #
39   # BUILD HERE
40   #
42   [[ -d build ]] && rm -r build
43   mkdir build && cd build
44   cmake -DCMAKE_INSTALL_PREFIX=/usr ..
45   make
48 package() {
49   cd "$srcdir/$_hgrepo-build"
51   cd build
52   make DESTDIR="$pkgdir/" install
54   mkdir "$pkgdir/usr/include/PROCEDURAL/"
55   mv "$pkgdir/usr/include/"*.h "$pkgdir/usr/include/PROCEDURAL/"
56   rm -r "$pkgdir/PROCEDURAL"
57