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=('23c6177443778d4b4833ec7ed0d0e639a0d4863372e3a38d772fdce2673eae6d5cb2a31a2a021d1a699082ea53494977c907fd0e94149b97cb23a4b6d039228a')
16 b2sums=('3ef2d7fd7942ff32acbe59db6a4b68ad72dde3af4675ef2ee3c93666360554d6e9a29392dbc4fb3029f9ff821f536b90bfd1c522c9c9c2298ab511322fb53d37')
19 cd ${pkgname}-${pkgver}
22 -DCMAKE_INSTALL_PREFIX=/usr \
23 -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \
24 -DBUILD_SHARED_LIBS=ON \
26 make -C build VERBOSE=1
27 make -C build/test VERBOSE=1
31 cd ${pkgname}-${pkgver}
32 make -C build/test test
36 cd ${pkgname}-${pkgver}
37 make -C build DESTDIR="${pkgdir}" install
38 install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
39 install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"