aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/lua5.2-sec-prosody/APKBUILD
blob: ac0372f8949c134541d416ad1a63168fb4ebc8b7 (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
46
47
48
49
50
51
52
53
54
55
# Contributor: Borys Zhukov <borys@zhukov.im>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaver=5.2
pkgname=lua$_luaver-sec-prosody
_name=luasec-prosody
pkgver=0.5.1
pkgrel=0
pkgdesc="Temporary fork of lua-sec necessary for prosody to support certificate authentication"
url="https://prosody.im/doc/depends/luasec/prosody"
arch="all"
license="MIT"
depends="lua$_luaver-socket"
makedepends="lua$_luaver-dev openssl-dev"
install=
subpackages="$pkgname-doc"
source="
	https://prosody.im/tmp/luasec-prosody-$pkgver.tar.gz
	"

_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 linux \
		CC="${CC:-gcc}" \
		LD="${CC:-gcc}" \
		MYCFLAGS="$CFLAGS" \
		MYLDFLAGS="$LDFLAGS" \
		INC_PATH="$(pkg-config lua$_luaver --cflags)" \
		|| return 1
}

package() {
	_luasharedir=/usr/share/lua/$_luaver
	_lualibdir=/usr/lib/lua/$_luaver
	cd "$_builddir"
	mkdir -p "$pkgdir"/$_luasharedir "$pkgdir"/$_lualibdir
	make LUAPATH="$pkgdir"/$_luasharedir \
		LUACPATH="$pkgdir"/$_lualibdir \
		install
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	cp -r samples "$pkgdir"/usr/share/doc/$pkgname/
}
md5sums="fbe70f5b43419bec16afdfee2b21c34b  luasec-prosody-0.5.1.tar.gz"
sha256sums="2fd34cf9c59a6491937c98ba33921d4fc418b160c0c89545f7bae4f246280ad4  luasec-prosody-0.5.1.tar.gz"
sha512sums="eadae7f59e957ebc8df074c8e43b181380393e8dd2042bbd098576bf2d7710aa0abb4ccc87eb1b52d28e0473cc52626be6e06eabdec8821deca1cda82ad7cfe7  luasec-prosody-0.5.1.tar.gz"