aboutsummaryrefslogtreecommitdiffstats
path: root/community/libphonenumber/APKBUILD
blob: f6cb933db5b8bf5cdb9b026fcf031b0ed7aa9a66 (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
47
48
49
# Contributor: Bhushan Shah <bshah@kde.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libphonenumber
pkgver=8.12.22
pkgrel=0
pkgdesc="Library for parsing, formatting, and validating international phone numbers."
url="https://github.com/googlei18n/libphonenumber"
arch="all"
license="Apache-2.0"
depends_dev="
	boost-dev
	icu-dev
	protobuf-dev
	"
makedepends="$depends_dev
	cmake
	gtest-dev
	ninja
	"
checkdepends="gtest"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/googlei18n/libphonenumber/archive/v$pkgver/libphonenumber-v$pkgver.tar.gz
	cmake-duplicate-rule-definition.patch
	"

build() {
	cd cpp
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DREGENERATE_METADATA=OFF
	cmake --build build
}

check() {
	cd cpp
	./build/libphonenumber_test
}

package() {
	cd cpp
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
33de6217ab9cdd696189f2f5d6d06f6f2d21d79b586c70946b44d424ce838b1e9afa80aff4cc93003716dd48f6639a47471279a55e09e4a971b30dbf03ce057f  libphonenumber-v8.12.22.tar.gz
dc76f0649c401ec97a7449373b96247135c3b80cf1e5bb8afba005fed1055a74429d3c778b7519b609bdcfbb278be395ef83e0bd00228239b6f15d96b0d2df11  cmake-duplicate-rule-definition.patch
"