blob: df05677ddbcb48207db1c5c2f9ae7ae776a3b3fe (
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
45
46
47
48
49
50
51
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-penlight
pkgver=1.3.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="ldoc"
install=
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() {
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.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"
sha256sums="5f0be532df2c72926280f22eb61a2f62557f7d29b576c82fd573f2d35a8f1114 penlight-1.3.0.tar.gz"
sha512sums="d38764f25219646e0772ed2df50bb8c31bf2067b7676d841848735a5c9fd81d169b0972c4db46ad3ceb53849fa25ec2bae0c5e053c03533fb383afdd1e9d44f9 penlight-1.3.0.tar.gz"
|