aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libwbxml/APKBUILD
blob: 1aa5c6ecb6388f089230bf5cc69315eced1d01f5 (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
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=libwbxml
pkgver=0.11.7
pkgrel=0
pkgdesc="A library to encode and decode WBXML (WAP Binary XML)."
url="https://github.com/libwbxml/libwbxml"
arch="all"
license="LGPL-2.1-or-later"
makedepends="cmake expat-dev"
checkdepends="check-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/libwbxml/libwbxml/archive/libwbxml-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_UNIT_TEST=ON \
		$CMAKE_CROSSOPTS
	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}

sha512sums="fc855650661593596a158527682d2c40d800c1fa44169d79e9ca9c6d64d67b6c660807ed89b1bddd644f114c27711356627ac919af91fd7f19d409879505512f  libwbxml-0.11.7.tar.gz"