summaryrefslogtreecommitdiff
path: root/harmony/c-ares/APKBUILD
blob: 98fbe2eb16809dafee5ef61824f8b3a4a3b0a609 (plain) (blame)
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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=c-ares
pkgver=1.13.0
pkgrel=0
pkgdesc="An asynchronously DNS/names resolver library"
url="http://c-ares.haxx.se/"
arch="all"
license="MIT"
depends=""
makedepends=""
subpackages="$pkgname-doc $pkgname-dev"
options="!checkroot"
source="http://c-ares.haxx.se/download/$pkgname-$pkgver.tar.gz"

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

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-shared
	make
}

check() {
	cd "$_builddir"

	# This is only needed for < 1.14.0, where the .sh file was not
	# distributed properly - see https://da.gd/carestest
	echo "#!/bin/true" > test/fuzzcheck.sh
	chmod a+x test/fuzzcheck.sh

	make -C test check
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="4a7942e754673f5b8d55a7471e31b0f390e8324b14c12077580c956147fad4d165c7fe8a3190199b1add95c710ceeb1a7957706d4f0d6299d39c5dddc719bd9d  c-ares-1.13.0.tar.gz"