aboutsummaryrefslogtreecommitdiffstats
path: root/main/libasr/APKBUILD
blob: 2bcda5c8581136e96a3d6606ee740ed15f989857 (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
# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libasr
pkgver=1.0.4
pkgrel=0
pkgdesc="libasr is a free, simple and portable asynchronous resolver library"
url="https://www.opensmtpd.org"
arch="all"
license="ISC"
makedepends="mdocml bison openssl-dev automake autoconf libtool libbsd-dev"
subpackages="$pkgname-dbg $pkgname-static $pkgname-dev"
source="https://github.com/OpenSMTPD/libasr/archive/$pkgver/libasr-$pkgver.tar.gz
	0002-Replace-missing-res_randomid-with-the-more-secure-ar.patch
	"

prepare() {
	default_prepare
	./bootstrap
}

check() {
	gcc -L src/.libs -I src tests/asr_simple.c -lasr -o tests/asr_simple
	LD_LIBRARY_PATH=src/.libs ./tests/asr_simple
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="93ff4643c46cccb36e4981336dde198975499c1e48df6ed0fa8e57628ea05a8dc1d5159fe9d0ee99ff2e7ab418aa346668749aca8be2f3346f07d884e4818368  libasr-1.0.4.tar.gz
693c2bfce2ca9397909a281b3d634b37608ff6286a4e9b3c1d638a337c585d307db4a325fb8b607ef45399c1ee05063eda5eb46060d804e5b4ad51ca6890846d  0002-Replace-missing-res_randomid-with-the-more-secure-ar.patch"