aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-zip/APKBUILD
blob: ca5a389cd884269bc9f43d1c8abc4c747b9cdf06 (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
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Mika Havela <mika.havela@gmail.com>
pkgname=lua-zip
pkgver="1.2.3"
pkgrel=0
pkgdesc="Lua extension library used to read files stored inside zip files"
url="http://luaforge.net/projects/luazip/"
arch="all"
license="MIT"
depends="lua"
makedepends="lua-dev zziplib-dev"
install=""
subpackages=""
source="http://archive.ubuntu.com/ubuntu/pool/universe/l/lua-zip/lua-zip_${pkgver}.orig.tar.gz"

_builddir="$srcdir/luazip-$pkgver"
prepare() {
	cd "$_builddir"
	sed -i -e '/LUA_VERSION_NUM/d' config
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make CFLAGS="$CFLAGS" CC="${CC:-gcc}"
}

package() {
	cd "$_builddir"
	local _lua_libdir="$(pkg-config --variable=INSTALL_CMOD lua)"
	make LUA_LIBDIR="${pkgdir}${_lua_libdir}" \
		install || return 1
}

md5sums="8129ba93a8df6ebd324fee9adca23fae  lua-zip_1.2.3.orig.tar.gz"