diff options
author | root <root@rshg054.dnsready.net> | 2012-02-05 23:15:10 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-05 23:15:10 +0000 |
commit | bdb5b3e66f6afa586ea147f69af5e4ba388f7615 (patch) | |
tree | 4374282e7b40f1decf8ecb78f004114498208361 /community/ldc/PKGBUILD | |
parent | 359d940358dec836dd0acfe9d9caf0b1ff0a97fe (diff) |
Sun Feb 5 23:15:10 UTC 2012
Diffstat (limited to 'community/ldc/PKGBUILD')
-rw-r--r-- | community/ldc/PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/community/ldc/PKGBUILD b/community/ldc/PKGBUILD new file mode 100644 index 000000000..09fe68ab1 --- /dev/null +++ b/community/ldc/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +pkgname=ldc +pkgver=20120204 +pkgrel=2 +pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2" +arch=('i686' 'x86_64') +url="http://www.dsource.org/projects/ldc" +license=('BSD') +makedepends=('git' 'cmake' 'libconfig') +depends=('llvm') +source=() +md5sums=() + +_gitroot=git://github.com/ldc-developers/ldc.git +_gitname=ldc + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone --recursive "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + mkdir build && cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINCLUDE_INSTALL_DIR=/usr/include/d/std-ldc \ + .. + make +} + +package() { + cd "$srcdir/$_gitname-build" + + cd build + make DESTDIR=$pkgdir install + cd .. + + install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} |