archrelease: copy trunk to testing-x86_64
[arch-packages.git] / libcbor / trunk / PKGBUILD
blob7ca7db3fb8e945caca51ef9eaad7b9934f0daeb1
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
4 pkgname=libcbor
5 pkgver=0.10.2
6 pkgrel=1
7 pkgdesc='C library for parsing and generating CBOR, the general-purpose schema-less binary data format'
8 url='https://github.com/PJK/libcbor'
9 arch=('x86_64')
10 license=('MIT')
11 depends=('glibc')
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')
18 build() {
19   cd ${pkgname}-${pkgver}
20   cmake . \
21     -Bbuild \
22     -DCMAKE_INSTALL_PREFIX=/usr \
23     -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \
24     -DBUILD_SHARED_LIBS=ON \
25     -DWITH_TESTS=1
26   make -C build VERBOSE=1
27   make -C build/test VERBOSE=1
30 check() {
31   cd ${pkgname}-${pkgver}
32   make -C build/test test
35 package() {
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}"
42 # vim: ts=2 sw=2 et: