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>
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."
15 url="http://force7.de/nimrod/"
17 license=('GPL' 'LGPL')
18 makedepends=('git' 'unzip')
21 _gitroot="https://github.com/Araq/Nimrod.git"
26 msg "Connecting to GIT server...."
28 if [ -d $_gitname ] ; then
29 cd $_gitname && git pull origin
30 msg "The local files are updated."
32 git clone $_gitroot $_gitname
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"
46 sed -i -e 's/^OS:.*$/OS: "linux"/' -e 's/^CPU:.*$/CPU: "i386;amd64"/' ./compiler/nimrod.ini
47 (cd build;unzip csources.zip)
51 PATH=./bin:$PATH ./koch csource
55 cd "$srcdir/$_gitname-build"
57 mkdir -p $pkgdir/usr/share/doc/nimrod
58 mkdir -p $pkgdir/usr/share/nimrod/data
59 mkdir -p $pkgdir/usr/lib/nimrod
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/