aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-penlight
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-12-05 09:20:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-12-05 09:20:26 +0000
commitfbf8e49304fe078823a9a026d6849f32575de299 (patch)
tree4d5f6cc4a809148141cfe03d86b1456fa58dbcbc /main/lua-penlight
parentb3d3b563b4d22384d49db4550bd5f9d6ef8d2c82 (diff)
downloadaports-fbf8e49304fe078823a9a026d6849f32575de299.tar.bz2
aports-fbf8e49304fe078823a9a026d6849f32575de299.tar.xz
main/lua-penlight: support for 5.2, generate api docs
Diffstat (limited to 'main/lua-penlight')
-rw-r--r--main/lua-penlight/APKBUILD31
1 files changed, 25 insertions, 6 deletions
diff --git a/main/lua-penlight/APKBUILD b/main/lua-penlight/APKBUILD
index 41aa9225c3..df05677ddb 100644
--- a/main/lua-penlight/APKBUILD
+++ b/main/lua-penlight/APKBUILD
@@ -1,30 +1,49 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-penlight
pkgver=1.3.0
-pkgrel=0
+pkgrel=1
pkgdesc="Lua libraries for extended operations on tables, lists and strings"
url="http://penlight.luaforge.net/"
arch="noarch"
license="GPL"
depends="lua-filesystem"
-makedepends="wget"
+makedepends="ldoc"
install=
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc lua5.1-penlight:_51 lua5.2-penlight:_52"
source="penlight-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz"
_builddir="$srcdir"/Penlight-$pkgver
build() {
- return 0
+ cd "$_builddir"
+ # fix permissions of scripts
+ chmod -x lua/pl/*.lua
+ # generate documentation
+ ldoc -c doc/config.ld .
}
package() {
cd "$_builddir"
mkdir -p "$pkgdir"/usr/share/lua/5.1/ \
+ "$pkgdir"/usr/share/lua/5.2/ \
"$pkgdir"/usr/share/doc/$pkgname
- cp -r lua/pl "$pkgdir"/usr/share/lua/5.1/
- cp -r docs/* "$pkgdir"/usr/share/doc/$pkgname/
+ cp -r lua/pl "$pkgdir"/usr/share/lua/5.2/ || return 1
+ cp -r doc/api "$pkgdir"/usr/share/doc/$pkgname/
cp -r examples "$pkgdir"/usr/share/doc/$pkgname/
+ ln -s ../5.2/pl "$pkgdir"/usr/share/lua/5.1/pl
+}
+
+_52() {
+ depends="$pkgname"
+ mkdir -p "$subpkgdir"/usr/share/lua/
+ mv "$pkgdir"/usr/share/lua/5.2 "$subpkgdir"/usr/share/lua/
+}
+
+_51() {
+ replaces="lua-penlight"
+ depends="lua5.2-penlight"
+ mkdir -p "$subpkgdir"/usr/share/lua/
+ mv "$pkgdir"/usr/share/lua/5.1 "$subpkgdir"/usr/share/lua/
}
md5sums="7add43a98a940fb066b873c1298c4489 penlight-1.3.0.tar.gz"