updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / nimrod-git / PKGBUILD
blob6e781e818a1c740f5bb4aba654a4d6959051d245
1 # This is an example PKGBUILD file. Use this as a start to creating your own,
2 # and remove these comments. For more information, see 'man PKGBUILD'.
3 # NOTE: Please fill out the license field for your package! If it is unknown,
4 # then please put 'unknown'.
6 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
7 # for more information on packaging from GIT sources.
9 # Maintainer: Your Name <youremail@domain.com>
10 pkgname=nimrod-git
11 pkgver=20110414
12 pkgrel=1
13 pkgdesc="Nimrod is a new statically typed, imperative programming language, that supports procedural, object oriented, functional and generic programming styles while remaining simple and efficient."
14 arch=(x86 x86_64)
15 url="http://force7.de/nimrod/"
16 depends=(glibc)
17 license=('GPL' 'LGPL')
18 makedepends=('git' 'unzip')
19 provides=('nimrod')
21 _gitroot="https://github.com/Araq/Nimrod.git"
22 _gitname="nimrod"
24 build() {
25   cd "$srcdir"
26   msg "Connecting to GIT server...."
28   if [ -d $_gitname ] ; then
29     cd $_gitname && git pull origin
30     msg "The local files are updated."
31   else
32     git clone $_gitroot $_gitname
33   fi
35   msg "GIT checkout done or server timeout"
36   msg "Starting make..."
38   rm -rf "$srcdir/$_gitname-build"
39   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
40   cd "$srcdir/$_gitname-build"
42   #
43   # BUILD HERE
44   #
46   sed -i -e 's/^OS:.*$/OS: "linux"/' -e 's/^CPU:.*$/CPU: "i386;amd64"/' ./compiler/nimrod.ini
47   (cd build;unzip csources.zip)
48   ./build.sh
49   ./bin/nimrod c koch
50   ./koch boot
51   PATH=./bin:$PATH ./koch csource
54 package() {
55   cd "$srcdir/$_gitname-build"
56   ./install.sh $pkgdir/
57   mkdir -p $pkgdir/usr/share/doc/nimrod
58   mkdir -p $pkgdir/usr/share/nimrod/data
59   mkdir -p $pkgdir/usr/lib/nimrod
60   mkdir -p $pkgdir/etc
61   mv $pkgdir/nimrod/lib/* $pkgdir/usr/lib/nimrod
62   mv $pkgdir/nimrod/config/* $pkgdir/etc
63   mv $pkgdir/nimrod/doc/* $pkgdir/usr/share/doc/nimrod
64   rmdir $pkgdir/nimrod/config
65   rmdir $pkgdir/nimrod/doc
66   rmdir $pkgdir/nimrod/lib
67   mv $pkgdir/nimrod/bin $pkgdir/usr/
68   rmdir $pkgdir/nimrod
69