APKBUILD 1.02 KB
Newer Older
A. Klitzing's avatar
A. Klitzing committed
1 2 3
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=tinyxml2
Leo's avatar
Leo committed
4
pkgver=7.1.0
A. Klitzing's avatar
A. Klitzing committed
5
pkgrel=0
prspkt's avatar
prspkt committed
6 7
pkgdesc="Simple, small and efficient C++ XML parser"
url="http://www.grinninglizard.com/tinyxml2"
A. Klitzing's avatar
A. Klitzing committed
8
arch="all"
Leo's avatar
Leo committed
9
license="Zlib"
A. Klitzing's avatar
A. Klitzing committed
10 11
makedepends="cmake"
subpackages="$pkgname-dev"
prspkt's avatar
prspkt committed
12
source="$pkgname-$pkgver.tar.gz::https://github.com/leethomason/tinyxml2/archive/$pkgver.tar.gz"
A. Klitzing's avatar
A. Klitzing committed
13 14 15

build() {
	cd "$builddir"
prspkt's avatar
prspkt committed
16 17 18 19
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
A. Klitzing's avatar
A. Klitzing committed
20 21
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
prspkt's avatar
prspkt committed
22 23 24 25
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
Leo's avatar
Leo committed
26
		$CMAKE_CROSSOPTS
A. Klitzing's avatar
A. Klitzing committed
27 28 29 30
	make
}

check() {
prspkt's avatar
prspkt committed
31
	cd "$builddir"
A. Klitzing's avatar
A. Klitzing committed
32 33 34 35
	make test
}

package() {
prspkt's avatar
prspkt committed
36
	cd "$builddir"
A. Klitzing's avatar
A. Klitzing committed
37 38 39
	make DESTDIR="$pkgdir" install
}

Leo's avatar
Leo committed
40
sha512sums="09d5f37018f79a593ff35e33d4296c9ec643a22e83c0cee4c37949300f86201eee07e9b7e6ba55044d8abb438d5d21b70d5843a96ae4652389bb164047ec31e1  tinyxml2-7.1.0.tar.gz"