aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dbus-cpp/APKBUILD
blob: a98cf26d99e2f435f324bffa08b2aa552a2e54e9 (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
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=dbus-cpp
pkgver=5.0.2
pkgrel=0
pkgdesc="A header-only dbus-binding leveraging C++-11"
url="https://gitlab.com/ubports/core/lib-cpp/dbus-cpp"
arch="all"
license="LGPL-3.0-only"
depends_dev="boost-dev dbus-dev properties-cpp-dev"
makedepends="$depends_dev cmake cmake-extras libxml2-dev process-cpp-dev gtest-dev"
checkdepends="dbus coreutils"
subpackages="$pkgname-dev"
source="https://gitlab.com/ubports/core/lib-cpp/dbus-cpp/-/archive/$pkgver/dbus-cpp-$pkgver.tar.gz
	0001-Explicitly-build-dbus-cppc-helper-as-static-library.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="3f6ccc50ce72ac6f3ecf19eff99784ea3dc220d3c36034642df6ad8c9f2636ca5fc897087a8f412c4d0aaaf00836bf71aac648aa68a04ccf030ef85f06c2cc42  dbus-cpp-5.0.2.tar.gz
c064dc072b30c2446a6405a74f09a115c30d060f65a2495f23281488f153d825165ce9d80018b8efb34f709b471303238771385fe9ca672dbebf1dd9e10f3494  0001-Explicitly-build-dbus-cppc-helper-as-static-library.patch"