aboutsummaryrefslogblamecommitdiffstats
path: root/testing/net-cpp/APKBUILD
blob: 4ea0dde5e31e817594eb20aa56a2803027e6ef9c (plain) (tree)
1
2
3
4
5
6
7


                                         
        

                                                         
                                  



































                                                                                                                                                                                                  
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=net-cpp
pkgver=2.2.1
pkgrel=1
pkgdesc="A simple yet beautiful networking API for C++11"
url="https://gitlab.com/ubports/core/lib-cpp/net-cpp"
arch="all !mips64" # failing tests
license="LGPL-3.0-only"
makedepends="cmake cmake-extras boost-dev curl-dev process-cpp-dev
	properties-cpp-dev jsoncpp-dev gtest-dev"
checkdepends="py3-httpbin"
subpackages="$pkgname-dev"
source="https://gitlab.com/ubports/core/lib-cpp/net-cpp/-/archive/$pkgver/net-cpp-$pkgver.tar.gz
	0001-Port-to-new-jsoncpp-API.patch
	0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
	0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.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="bb2a3d1a142cdbac8cd797b76c66bfbf473f6de4d128c66c91c9bdcdcf81c19daaca2c10bb624fc9e029cb1ee37131baa6bfe8788b0f5c6f528d317c16a47710  net-cpp-2.2.1.tar.gz
2893f20ef1028d016fccf77af6c24dbe1a7967a9e03cadbccc3cde18a0a0eb3b1f8ffb1f1b3afc7d9e4c046fb3b5d6cf907023638dcdb37273dd514c9139c99e  0001-Port-to-new-jsoncpp-API.patch
ba4c2737504ddf9475a8a4c01fe31756dbc32d3bfb00c1a10e342cd2f7989cc87466c921d8430ff7003ebf48369d5daeb0ebeefc3d2b1955142d6a35681840e7  0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
357669776625f4476feaf76336a976c596572028e165d54eb5078baca42c2f8304e60a3898f4ce0b4494f9a40d303720e539a0da281f5f33159b8576b89d7d71  0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch"