updated on Tue Jan 17 00:10:10 UTC 2012
[aur-mirror.git] / ldc-git / PKGBUILD
blobd508b7ef0c328f744875be71c62f0272c51f5b9e
1 # Maintainer: Gianni Vialetto <gianni at rootcube dot net>
3 pkgname=ldc-git
4 pkgver=20120117
5 pkgrel=1
6 pkgdesc="A LLVM based compiler for the D programming language"
7 arch=('i686')
8 url="http://ldc-developers.github.com/ldc"
9 license=('BSD' 'GPL')
10 depends=('libconfig' 'llvm>=3.0')
11 makedepends=('git')
12 provides=('ldc')
13 backup=('etc/ldc2.conf'  'etc/ldc2.rebuild.conf')
14 options=('!emptydirs makeflags')
16 _gitroot=https://github.com/ldc-developers/ldc.git
17 _gitname=ldc
19 build() {
20   cd $srcdir
22   msg "Connecting to GIT repository $_gitroot..."
24   if [ -d $startdir/src/$_gitname ] ; then
25     cd $_gitname && git pull origin
26     msg "The local files are updated."
27   else
28     git clone $_gitroot
29   fi
31   msg "GIT checkout done or server timeout"
33   cd "$srcdir/$_gitname"
34   msg "Initializing/Updating GIT submodules..."
35   git submodule init && git submodule update
36   msg "Creating cmake build directory..."
37   if [ ! -d build ]; then mkdir build; fi
38   cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
39   msg "Now building..."
40   make phobos2
43 package() {
44   cd $srcdir/$_gitname/build
45   make DESTDIR="$pkgdir" install || return 1