archrelease: copy trunk to community-any
[ArchLinux/community.git] / msgpack-c / trunk / PKGBUILD
blob925c160d629b5c6aa8fa86d8b265c7983c212302
1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Contributor: Baptiste Jonglez
3 # Contributor: Leen Jewel <leenjewel@gmail.com>
4 # Contributor: Auguste Pop <auguste [at] gmail [dot] com>
6 pkgname='msgpack-c'
7 pkgver=5.0.0
8 pkgrel=1
9 pkgdesc='An efficient object serialization library'
10 arch=("x86_64")
11 url='https://msgpack.org/'
12 license=('custom:Boost')
13 depends=('glibc')
14 checkdepends=('gtest')
15 makedepends=('cmake' 'doxygen' 'graphviz')
16 source=("https://github.com/msgpack/msgpack-c/releases/download/c-${pkgver}/${pkgname}-${pkgver}.tar.gz"
17         "LICENSE-${pkgname}-${pkgver}::https://raw.githubusercontent.com/msgpack/${pkgname}/c_master/COPYING")
18 b2sums=('9c4ebc60387028cba04d5a8f4d97ca3cf6caa3db93fa7da1a90089d63cd58b36a7fb387b4fd5410d0c422719c1aed6d479418d3cbc011b609afb49cf89c4d0e3'
19         'f39585a8a06390e7677a46fd62c1836d2873ceb6e66927803fcbf42a572b5c6c0948b5191708bf1fe04c79b94de574d1d1ef19eaca28e81326af6ef1757c1d94')
20 _builddir='build-c'
22 prepare() {
23   cd "${srcdir}"
24   mkdir "${_builddir}"
27 build() {
28   cd "${srcdir}/${_builddir}"
29   cmake -DCMAKE_INSTALL_PREFIX=/usr \
30         -DCMAKE_BUILD_TYPE=Release \
31         -DCMAKE_C_STANDARD='17' \
32         -DBUILD_SHARED_LIBS=ON \
33         -DMSGPACK_ENABLE_STATIC=OFF \
34         -DMSGPACK_BUILD_EXAMPLES=OFF \
35         -DMSGPACK_BUILD_TESTS=ON \
36         "${srcdir}/${pkgname}-${pkgver}"
37   make
40 check() {
41   cd "${srcdir}/${_builddir}"
42   make test 
45 package() {
46   cd "${srcdir}/${_builddir}"
47   make DESTDIR="${pkgdir}" install
48   install -Dm644 "${srcdir}/LICENSE-${pkgname}-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE