updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / iceberg-git / PKGBUILD
blob2f2cca836a0ef8b4196b472d1f771815d770391c
1 #Contributor: Anselmo L. S. Melo <anselmolsm @ gmail.com>
3 pkgname=iceberg-git
4 pkgver=20111021
5 pkgrel=1
6 pkgdesc=""
7 url="https://github.com/hugopl/Iceberg"
8 license="GPL"
9 depends=('gcc')
10 arch=('i686' 'x86_64')
11 source=()
12 md5sums=()
13 makedepends=('git' 'cmake' 'automoc4' 'icecream1')
14 provides=('iceberg')
16 _gitroot='git://github.com/hugopl/Iceberg.git'
17 _gitname='Iceberg'
18 _buildir=${_gitname}-build
20 build() {
21     cd ${_srcdir}
23     msg "Starting git clone..."
25     if [ -d ${_gitname} ]; then
26         cd ${_gitname} && git pull origin
27         cd ..
28     else
29         git clone ${_gitroot}
30     fi
32     msg 'GIT checkout done or server timeout.'
34     if [ -d ${_buildir} ]; then
35         msg 'Cleaning previous build...'
36         rm -rf ${_buildir}
37     fi
39     git clone ${_gitname} ${_buildir}
40     cd ${_buildir}
42     msg 'Generating necessary files...'
44     mkdir -p $pkgdir/{opt/iceberg/bin,usr/bin}
45     export PKG_CONFIG_PATH=/opt/icecream/lib/pkgconfig/:$PKG_CONFIG_PATH
46     cmake -DCMAKE_INSTALL_PREFIX=$pkgdir/opt/iceberg ${_srcdir} || return 1
47     make || return 1
48     make install || return 1
49     ln -s /opt/iceberg/bin/iceberg $pkgdir/usr/bin/iceberg