aboutsummaryrefslogtreecommitdiffstats
path: root/community/libphonenumber/APKBUILD
blob: 9bf18033f67e418793e194b2e5a212e21cb032f8 (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.24
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="
893123d41e56dca533f00217807843bc70c91254a110e67c9d11aae9ec7fbe494ad3f141ad904c0686238f362ffda3d08d741891f8743d159f2dcbf4f436779d  libphonenumber-v8.12.24.tar.gz
dc76f0649c401ec97a7449373b96247135c3b80cf1e5bb8afba005fed1055a74429d3c778b7519b609bdcfbb278be395ef83e0bd00228239b6f15d96b0d2df11  cmake-duplicate-rule-definition.patch
"