summaryrefslogtreecommitdiffstats
path: root/main/lua-crypto/APKBUILD
blob: c95a44a2dde82a90a0aac1f9402259c0d1abde68 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaver=5.1
pkgname=lua-crypto
pkgver=0.3.2
pkgrel=0
pkgdesc="a Lua frontend to the OpenSSL cryptographic library"
url="http://mkottman.github.io/luacrypto/"
arch="all"
license="MIT/X11"
depends=
makedepends="lua$_luaver-dev openssl-dev"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="luacrypto-$pkgver.tar.gz::https://github.com/mkottman/luacrypto/archive/$pkgver.tar.gz"

_builddir="$srcdir"/luacrypto-$pkgver

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}
build() {
	cd "$_builddir"
	LUA_CFLAGS="$(pkg-config lua$_luaver --cflags)" \
	LUA_LIBS="$(pkg-config lua$_luaver --libs)" \
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		|| return 1
	make cryptodir=/usr/lib/lua/$_luaver || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" cryptodir=/usr/lib/lua/$_luaver \
		|| return 1
	find "$pkgdir" -name '*.la' -delete
}

md5sums="07271929beec760a42eff012803490a1  luacrypto-0.3.2.tar.gz"
sha256sums="63c5d7e2539779039114335b9a8f149d63382c4db298d69e70488a0108143bb4  luacrypto-0.3.2.tar.gz"
sha512sums="4cb20d2cc348a11f140210dffb803629034c72cc7232590f4488f559d5c7233e0c41e56fcd0863959ac0b07e64c9aa79ea573e4126fdc11bc3f1b3b49d13343e  luacrypto-0.3.2.tar.gz"