aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-posix/APKBUILD
blob: 6505e5b5b5ad3bfffd3c3a6ed7a4ef5aee0cf821 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-posix
_name=luaposix
pkgver=5.1.15
pkgrel=0
pkgdesc="POSIX library for Lua"
url="http://luaforge.net/projects/luaposix/"
arch="all"
license="MIT"
depends="lua"
makedepends="lua-dev perl ncurses-dev wget"
source="https://github.com/downloads/rrthomas/luaposix/luaposix-$pkgver.tar.gz"

replaces="luaposix"
subpackages="curses"

_builddir="$srcdir"/$_name-$pkgver
_lualib=/usr/lib/lua/5.1
_luashare=/usr/share/lua/5.1

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--libdir=$_lualib \
		--datadir=$_luashare \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/$_lualib/*.la || return 1
}

curses() {
	pkgdesc="ncurses binding for Lua"
	mkdir -p "$subpkgdir"/$_lualib "$subpkgdir"/$_luashare
	mv "$pkgdir"/$_lualib/curses* "$subpkgdir"/$_lualib/ || return 1
	mv "$pkgdir"/$_luashare/curses* "$subpkgdir"/$_luashare/ || return 1
}
md5sums="c492541a768302fb67ad14a294306f3a  luaposix-5.1.15.tar.gz"