aboutsummaryrefslogtreecommitdiffstats
path: root/community/properties-cpp/APKBUILD
blob: 46157cd3a45d50ae2568c85404f3d372308fb150 (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
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=properties-cpp
pkgver=0.0.3
pkgrel=0
pkgdesc="A very simple convenience library for handling properties and signals in C++11"
url="https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp"
arch="noarch"
license="LGPL-3.0-only"
makedepends="
	cmake
	cmake-extras
	gtest-dev
	samurai
	"
subpackages="$pkgname-dev"
source="https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp/-/archive/$pkgver/properties-cpp-$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None \
		$crossopts
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

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

sha512sums="
83936de41b563b5c0c6cc901adf1eb1d39ccb8ffc1b95d26668dd504a42b3c2af53f85770f8616751692f2db00e2ab20925d7d169937824782f942687b43fcb1  properties-cpp-0.0.3.tar.gz
"