Commit 004e1150 authored by Natanael Copa's avatar Natanael Copa

main/lua-penlight: fix dependencies and license

parent cc5f305a
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-penlight pkgname=lua-penlight
pkgver=1.3.1 pkgver=1.3.1
pkgrel=1 pkgrel=2
pkgdesc="Lua libraries for extended operations on tables, lists and strings" pkgdesc="Lua libraries for extended operations on tables, lists and strings"
url="http://penlight.luaforge.net/" url="http://stevedonovan.github.io/Penlight"
arch="noarch" arch="noarch"
license="GPL" license="MIT"
depends="lua-filesystem" depends="lua5.1-penlight lua5.2-penlight"
makedepends="" makedepends=""
install= install=
subpackages="$pkgname-doc lua5.1-penlight:_51 lua5.2-penlight:_52" subpackages="$pkgname-doc $pkgname-shared
lua5.1-penlight:_51
lua5.2-penlight:_52"
source="penlight-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz" source="penlight-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz"
_builddir="$srcdir"/Penlight-$pkgver _builddir="$srcdir"/Penlight-$pkgver
...@@ -22,23 +24,34 @@ build() { ...@@ -22,23 +24,34 @@ build() {
package() { package() {
cd "$_builddir" cd "$_builddir"
mkdir -p "$pkgdir"/usr/share/lua/5.1/ \ mkdir -p "$pkgdir"/usr/share/lua/common/ \
"$pkgdir"/usr/share/lua/5.1/ \
"$pkgdir"/usr/share/lua/5.2/ \ "$pkgdir"/usr/share/lua/5.2/ \
"$pkgdir"/usr/share/doc/$pkgname "$pkgdir"/usr/share/doc/$pkgname
cp -r lua/pl "$pkgdir"/usr/share/lua/5.2/ || return 1 cp -r lua/pl "$pkgdir"/usr/share/lua/common/ || return 1
cp -r examples "$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 ln -s ../common/pl "$pkgdir"/usr/share/lua/5.1/pl
ln -s ../common/pl "$pkgdir"/usr/share/lua/5.2/pl
}
shared() {
pkgdesc="penlight files that are shared for all supported Lua versions"
depends=
mkdir -p "$subpkgdir"/usr/share/lua/
mv "$pkgdir"/usr/share/lua/common "$subpkgdir"/usr/share/lua/
} }
_52() { _52() {
depends="$pkgname" pkgdesc="Lua 5.2 libraries for extended operations on tables, lists and strings"
depends="lua-penlight-common lua5.2-filesystem"
mkdir -p "$subpkgdir"/usr/share/lua/ mkdir -p "$subpkgdir"/usr/share/lua/
mv "$pkgdir"/usr/share/lua/5.2 "$subpkgdir"/usr/share/lua/ mv "$pkgdir"/usr/share/lua/5.2 "$subpkgdir"/usr/share/lua/
} }
_51() { _51() {
pkgdesc="Lua 5.1 libraries for extended operations on tables, lists and strings"
replaces="lua-penlight" replaces="lua-penlight"
depends="lua5.2-penlight" depends="lua-penlight-common lua5.1-filesystem"
mkdir -p "$subpkgdir"/usr/share/lua/ mkdir -p "$subpkgdir"/usr/share/lua/
mv "$pkgdir"/usr/share/lua/5.1 "$subpkgdir"/usr/share/lua/ mv "$pkgdir"/usr/share/lua/5.1 "$subpkgdir"/usr/share/lua/
} }
......
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