1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
5 pkgdesc="Dynamic scripting language that compiles into Lua"
7 url="http://moonscript.org/"
9 depends=('luarocks' 'lpeg' 'lua' 'luafilesystem')
10 makedepends=('git' 'curl')
11 source=("http://moonscript.org/rocks/moonscript-dev-1.rockspec")
12 md5sums=('491a59714d88a4c369535e4cbc9123b2')
17 msg2 "Fetching documentation..."
18 # These changes a lot, so md5-sum-ing them is like fighting windmills
19 curl --progress-bar -OL \
20 "https://raw.github.com/leafo/moonscript/master/README.md"
21 curl --progress-bar -OL \
22 "https://raw.github.com/leafo/moonscript/master/docs/reference_manual.html"
23 curl --progress-bar -OL \
24 "http://moonscript.org/reference/index.html"
30 msg2 "Packaging moonscript..."
32 luarocks install moonscript-dev-1.rockspec --to="$pkgdir/usr"
33 install -Dm644 reference_manual.html "$pkgdir/usr/share/doc/$pkgname/reference_manual.html"
34 install -Dm644 index.html "$pkgdir/usr/share/doc/$pkgname/index.html"
35 install -Dm644 README.md "$pkgdir/usr/share/licenses/$pkgname/README.md"
38 sed -i "s:$pkgdir::" "$pkgdir/usr/bin/moon"
39 sed -i "s:$pkgdir::" "$pkgdir/usr/bin/moonc"
42 rm "$pkgdir/usr/lib/lua/5.1/lfs.so"
43 rm "$pkgdir/usr/lib/lua/5.1/lpeg.so"
44 rm "$pkgdir/usr/share/lua/5.1/re.lua"
45 chmod 755 "$pkgdir/usr" "$pkgdir/usr/bin/" "$pkgdir/usr/share/lua/5.1/" \
46 "$pkgdir/usr/lib/lua/5.1/" "$pkgdir/usr/lib" "$pkgdir/usr/share" \
47 "$pkgdir/usr/share/lua" "$pkgdir/usr/lib/lua"
50 # vim:set ts=2 sw=2 et: