aboutsummaryrefslogtreecommitdiffstats
path: root/testing/popl/APKBUILD
blob: e64ccf08aff5ff0d9bc62c5b43b3650da0989cf8 (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=popl
pkgver=1.0.0
pkgrel=0
pkgdesc="Header-only C++ program options parser library"
url="https://github.com/badaix/popl"
arch="noarch"
license="MIT"
depends=""
depends_dev=""
makedepends="cmake"
install=""
options="!check" # no tests
subpackages=""
source="popl-$pkgver.tar.gz::https://github.com/badaix/popl/archive/v$pkgver.tar.gz"
builddir="$srcdir/popl-$pkgver"

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS}
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="b48bba41674c7821059eb97833f6521f123ed9adf9a62ac8f4fa98807910bbc899513a5fc2260f763d15bbf9d280547b9ed6d8aa667db48628dae9344f805721  popl-1.0.0.tar.gz"