aboutsummaryrefslogtreecommitdiffstats
path: root/main/libasr/APKBUILD
blob: 97ea602001fee72dab9274fb9ebd1ed8e7cb48ae (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: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libasr
pkgver=1.0.3
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/$pkgname-$pkgver.tar.gz
	0002-Replace-missing-res_randomid-with-the-more-secure-ar.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

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 \
		--with-pie \
		--with-Werror \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-mantype=man \
		--without-Werror
	make
}

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

sha512sums="51b21a0494f154514d702b4e1076dd25554f98606e166f1c9f7dde5f33d84fce5d82fd14e930aeacab8e1624a13d720e4c997184d47b5964cfab717f4d18dc03  libasr-1.0.3.tar.gz
693c2bfce2ca9397909a281b3d634b37608ff6286a4e9b3c1d638a337c585d307db4a325fb8b607ef45399c1ee05063eda5eb46060d804e5b4ad51ca6890846d  0002-Replace-missing-res_randomid-with-the-more-secure-ar.patch"