aboutsummaryrefslogtreecommitdiffstats
path: root/main/ldoc/APKBUILD
blob: bb67eef8f39a4d48e847aeda9f1e5633445f8702 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaver=5.2
pkgname=ldoc
pkgver=1.4.6
pkgrel=0
pkgdesc="Documentation tool for Lua"
url="https://github.com/stevedonovan/LDoc"
arch="noarch"
license="MIT"
depends="lua$_luaver-penlight lua$_luaver"
makedepends=""
install=""
subpackages=
source="LDoc-$pkgver.tar.gz::https://github.com/stevedonovan/LDoc/archive/$pkgver.tar.gz"

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

build() {
	cd "$_builddir"
	find . -type d | xargs chmod 755
}

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="e292a11e9bbf1daf429d6f547d2f1afa  LDoc-1.4.6.tar.gz"
sha256sums="4b73e78a0325fb3c295d015ddb60b5cee5b647cecb5c50ce8f01319b53bd536f  LDoc-1.4.6.tar.gz"
sha512sums="bcaddba4e462a4fb0aa0d8fcff390de3f195fa5cc569d8f05b84ad0fff900f5ac945be7a2eb15cf5ca60cc462f02c874579e4a19e33776178a04104ef9d944af  LDoc-1.4.6.tar.gz"