archrelease: copy trunk to testing-x86_64
[arch-packages.git] / libcbor / trunk / PKGBUILD
blob039640fd9982644a8ac7e47fd1c60b7892e77999
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
4 pkgname=libcbor
5 pkgver=0.9.0
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=('710239f69d770212a82e933e59df1aba0fb3ec516ef6666a366f30a950565a52981b0d46ca7e0eea739f5785d79cc21fc19acd857a4a0b135f4f6aa3ef5fd3b0')
16 b2sums=('7e78722650c702552dda4844615c454989281abe8c45ba3c9168af16e9d440a1b7e4e0c9afd89faa48e74ba85dcbe0c7733eec3e44fdafc0ca340e97574fe274')
18 build() {
19   cd ${pkgname}-${pkgver}
20   cmake . \
21     -Bbuild \
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 \
27     -DWITH_TESTS=1
28   make -C build VERBOSE=1
29   make -C build/test VERBOSE=1
32 check() {
33   cd ${pkgname}-${pkgver}
34   make -C build/test test
37 package() {
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}"
44 # vim: ts=2 sw=2 et: