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

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

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sha512sums="7ec94ce495c9630d5acc0b98051b31e7eb3e50fef9dff3a476cd91ca912937f48826fbdab57907b042b13e29786dcb3483151690374b0e09d6e1c12c6329df5a  properties-cpp-0.0.2.tar.gz
ce6a258c5c57e41e2b1cbc7e2988f8b89d61c36415cc03986e33511a1fb09b793fb473aa5f8da6d80c906454a4152c096ffdfb32570a83a8ae2bdfc888a25248  0001-CMake-cleanup.patch"