summaryrefslogtreecommitdiffstats
path: root/main/lua-nixio/APKBUILD
blob: df2a4be3e4b617a7f74564f9be10fe57aa50147f (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-nixio
_name=nixio
pkgver=0.3
pkgrel=2
pkgdesc="General POSIX IO library for Lua"
url="http://dev.luci.freifunk-halle.net/nixio/doc/"
arch="x86 x86_64"
license="Apache"
makedepends="lua-dev openssl-dev"
depends="lua"
source="http://dev.luci.freifunk-halle.net/nixio/nixio-0.3.tar.bz2"

_builddir="$srcdir"/$_name-$pkgver
build() {
	cd "$_builddir"
	make LUA_MODULEDIR="$pkgdir"/usr/share/lua/5.1 \
		LUA_LIBRARYDIR="$pkgdir"/usr/lib/lua/5.1 \
		CFLAGS="$CFLAGS"
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/usr/share/lua/5.1 \
		"$pkgdir"/usr/lib/lua/5.1
	# The makefiles put the LDFLAGS to early, we trick them to the end
	# by override LINK and NIXIO_LDFLAGS_POST
	make LUA_MODULEDIR="$pkgdir"/usr/share/lua/5.1 \
		LUA_LIBRARYDIR="$pkgdir"/usr/lib/lua/5.1 \
		LINK="$CC" \
		NIXIO_LDFLAGS_POST="-lcrypto $LDFLAGS" \
		install
}

md5sums="7fa6a989cd2644347d969cb6e3a5c186  nixio-0.3.tar.bz2"