summaryrefslogtreecommitdiffstats
path: root/main/lua-socket/APKBUILD
blob: 4e5665cfe2fd354b29af6e8ae9b9532754a64a2b (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
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Mika Havela <mika.havela@gmail.com>
pkgname=lua-socket
_name=luasocket
pkgver=2.0.2
pkgrel=4
pkgdesc="Luasocket is the most comprehensive networking support library for the Lua language."
url="http://luaforge.net/projects/luasocket/"
arch="all"
license="MIT"
depends="lua"
makedepends="lua-dev"
install=
source="http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz
	unix.patch"
replaces=luasocket

_builddir="$srcdir/$_name-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	local cmod=$(pkg-config --variable INSTALL_CMOD lua)
	local lmod=$(pkg-config --variable INSTALL_LMOD lua)
	make INSTALL_TOP_SHARE="$pkgdir/$lmod" \
		INSTALL_TOP_LIB="$pkgdir/$cmod" \
		install

}

md5sums="41445b138deb7bcfe97bff957503da8e  luasocket-2.0.2.tar.gz
51c600494106ca39f9816f6574868628  unix.patch"