aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-ldoc/APKBUILD
blob: 3aa4b63d2f9577b8e8492285fcd6a50dcb94b28b (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-ldoc
pkgver=1.0
pkgrel=0
pkgdesc="Documentation tool for Lua"
url="http://github.com/stevedonovan/LDoc"
arch="noarch"
license="MIT"
depends="lua-penlight"
makedepends="lua-dev"
install=""
subpackages=
source="http://stevedonovan.github.com/files/ldoc-$pkgver.zip"

_luashare=/usr/share/lua/5.1
_builddir="$srcdir"/LDoc
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i '1i \
#!/usr/bin/env lua' ldoc.lua
}

build() {
	cd "$_builddir"
}

package() {
	cd "$_builddir"
	install -Dm755 ldoc.lua "$pkgdir"/usr/bin/ldoc || return 1
	install -d "$pkgdir"/$_luashare || return 1
	cp -a ldoc "$pkgdir"/$_luashare/
}

md5sums="fcfb9afadd49c672f0cb553f490b2455  ldoc-1.0.zip"