blob: 7549d8bde5c086b095ef38d1dc55a6af7afbcaa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# $Id: PKGBUILD 110537 2014-05-02 20:51:45Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Dominik Picheta <morfeusz8@gmail.com>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Jesus Alvarez <jeezusjr@gmail.com>
pkgname=nimrod
pkgver=0.9.4
pkgrel=2
pkgdesc='Imperative, multi-paradigm, compiled programming language'
arch=('x86_64' 'i686')
url='http://nimrod-code.org/'
license=('MIT')
makedepends=('git')
options=('!emptydirs')
#source=("$pkgname::git://github.com/Araq/${pkgname/n/N}.git#tag=v$pkgver")
source=("$pkgname::git://github.com/Araq/${pkgname/n/N}.git#commit=a21289f5d5")
md5sums=('SKIP')
prepare() {
cd "$pkgname"
rm build/empty.txt && rmdir build
git clone --depth=1 git://github.com/nimrod-code/csources build
}
build() {
cd "$pkgname/build"
sh build.sh
cd ..
./bin/nimrod c koch
./koch boot -d:release -d:useGnuReadline
export PATH="$srcdir/$pkgname/bin:$PATH"
cd compiler
nimrod c -d:release c2nim/c2nim.nim
nimrod c -d:release pas2nim/pas2nim.nim
cd ../lib
nimrod c --app:lib -d:createNimRtl -d:release nimrtl.nim
cd ../tools
nimrod c -d:release nimgrep.nim
}
package() {
cd "$pkgname"
export PATH="$srcdir/$pkgname/bin:$PATH"
./koch install "$pkgdir"
install -d "$pkgdir/usr/share/nimrod/doc" "$pkgdir/usr/lib/nimrod" "$pkgdir/etc" "$pkgdir/usr/bin"
cd "$pkgdir/nimrod"
mv "lib/"* "$pkgdir/usr/lib/nimrod/"
mv "config/"* "$pkgdir/etc/"
cp -a "$srcdir/$pkgname/lib/packages" "$pkgdir/usr/lib/nimrod/"
mv "doc/"* "$pkgdir/usr/share/nimrod/doc/"
mv "bin/"* "$pkgdir/usr/bin/"
cd "$srcdir/$pkgname"
rm -r "$pkgdir/nimrod"
mv examples web "$pkgdir/usr/share/nimrod/doc/"
install -m755 "compiler/c2nim/c2nim" "$pkgdir/usr/bin/"
install -m755 "compiler/pas2nim/pas2nim" "$pkgdir/usr/bin/"
install -m644 "lib/libnimrtl.so" "$pkgdir/usr/lib/libnimrtl.so"
install -m755 "tools/nimgrep" "$pkgdir/usr/bin/"
install -Dm644 "copying.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
|