Commit fbf8e493 authored by Natanael Copa's avatar Natanael Copa

main/lua-penlight: support for 5.2, generate api docs

parent b3d3b563
# 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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment