1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
7 pkgdesc='C library for parsing and generating CBOR, the general-purpose schema-less binary data format'
8 url='https://github.com/PJK/libcbor'
12 makedepends=('cmake' 'cmocka')
13 provides=('libcbor.so')
14 source=(https://github.com/PJK/libcbor/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
15 sha512sums=('710239f69d770212a82e933e59df1aba0fb3ec516ef6666a366f30a950565a52981b0d46ca7e0eea739f5785d79cc21fc19acd857a4a0b135f4f6aa3ef5fd3b0')
16 b2sums=('7e78722650c702552dda4844615c454989281abe8c45ba3c9168af16e9d440a1b7e4e0c9afd89faa48e74ba85dcbe0c7733eec3e44fdafc0ca340e97574fe274')
19 cd ${pkgname}-${pkgver}
22 -DCMAKE_INSTALL_PREFIX=/usr \
23 -DCMAKE_INSTALL_LIBDIR=lib \
24 -DCMAKE_BUILD_TYPE=Release \
25 -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \
26 -DBUILD_SHARED_LIBS=ON \
28 make -C build VERBOSE=1
29 make -C build/test VERBOSE=1
33 cd ${pkgname}-${pkgver}
34 make -C build/test test
38 cd ${pkgname}-${pkgver}
39 make -C build DESTDIR="${pkgdir}" install
40 install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
41 install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"