updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / vigra-hg / PKGBUILD
blob8cdaa79779089a1bf725965850361e506fd199a5
1 # Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
2 pkgname=vigra-hg
3 pkgver=2823
4 pkgrel=1
5 pkgdesc="Computer vision library"
6 arch=('i686' 'x86_64')
7 url="http://hci.iwr.uni-heidelberg.de/vigra/"
8 license=('custom:MIT')
9 depends=('libpng' 'libtiff' 'gcc-libs' 'fftw' 'openexr')
10 makedepends=('mercurial' 'cmake' 'doxygen')
11 provides=('vigra')
12 conflicts=('vigra')
13 source=()
14 md5sums=()
16 _hgroot="http://www.informatik.uni-hamburg.de/~meine/hg"
17 _hgrepo="vigra"
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   mkdir "$srcdir/$_hgrepo-build"
36   cd "$srcdir/$_hgrepo-build"
38   cmake -DCMAKE_INSTALL_PREFIX=/usr \
39         -DDOCINSTALL=share/doc \
40         -DCMAKE_SHARED_LINKER_FLAGS="-lpthread" \
41         ../$_hgrepo
42   make
45 check() {
46   cd "$srcdir/$_hgrepo-build"
47   make check
50 package() {
51   cd "$srcdir/$_hgrepo-build"
52   make DESTDIR="$pkgdir/" install
53   # license
54   install -D -m644 "$srcdir/$_hgrepo/"LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
55