aboutsummaryrefslogtreecommitdiffstats
path: root/community/libpsl/APKBUILD
blob: ee367294311d883387eb09cb156c22d88af05f64 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpsl
pkgver=0.21.0
pkgrel=1
pkgdesc="C library for the Publix Suffix List"
url="https://rockdaboot.github.io/libpsl"
arch="all"
license="MIT"
makedepends="python3 libidn2-dev libunistring-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://github.com/rockdaboot/libpsl/releases/download/libpsl-$pkgver/libpsl-$pkgver.tar.gz"

prepare() {
	default_prepare
	sed -i 's|env python|env python3|g' src/psl-make-dafsa
}

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

check() {
	make check
}

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

static() {
	depends=""
	pkgdesc="$pkgdesc (static library)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}


sha512sums="165c4f0b0640a813d512bd916e1532e32e43c8c81a5efd048f3a5b07b1b3c9129b4c4b5008b8b11a7c1b3914caea17564321389cd350bf1d687d53a97f2afa4d  libpsl-0.21.0.tar.gz"