archrelease: copy trunk to community-any
[ArchLinux/community.git] / mtxclient / trunk / PKGBUILD
blobe2513355dc36ca0583c06760d8b2b14e44ab547e
1 # Maintainer: Leonidas Spyropoulos <artafinde@archlinux.org>
2 # Contributor: David Runge <dvzrv@archlinux.org>
4 pkgname=mtxclient
5 pkgver=0.9.2
6 pkgrel=1
7 pkgdesc="Client API library for the Matrix protocol"
8 arch=('x86_64')
9 url="https://nheko.im/nheko-reborn/mtxclient"
10 license=('MIT')
11 depends=(gcc-libs glibc)
12 makedepends=(cmake coeurl fmt libolm meson nlohmann-json openssl re2 spdlog git)
13 checkdepends=(gmock gtest)
14 provides=(libmatrix_client.so)
15 source=("git+https://nheko.im/nheko-reborn/mtxclient.git?signed#tag=v${pkgver}?"
16         "0.6.0_remove_network_tests.patch")
17 sha256sums=('SKIP'
18             '2edba127593d172b5e535a4f0058d26a47a67f8b4c2d0cef9d6eac07e17eba3e')
19 b2sums=('SKIP'
20         'af9e62223b59cfae2b711420944612a40d8ff7e87d188c3ccdb3a628310458df498cba70786bcb5cb35bce7e82940249ade31003e7418dcaa6c58cde33e6b25f')
21 validpgpkeys=('D58B462425A6A37125C6FEDB9206AE1B231E05BB') # Nicolas Werner @deepbluev7 https://nheko.im/deepbluev7.gpg
23 prepare(){
24   cd "$pkgname"
25   # https://github.com/Nheko-Reborn/mtxclient/issues/93
26   patch -Np1 < "../0.6.0_remove_network_tests.patch"
29 build() {
30   cmake \
31     -Bbuild \
32     -GNinja \
33     -S "$pkgname" \
34     -DCMAKE_BUILD_TYPE='None' \
35     -DCMAKE_INSTALL_PREFIX='/usr' \
36     -DCMAKE_INSTALL_LIBDIR='lib' \
37     -DBUILD_LIB_EXAMPLES=OFF \
38     -DBUILD_SHARED_LIBS=ON \
39     -DBUILD_LIB_TESTS=ON \
40     -DBUILD_LIB_EXAMPLES=OFF \
41     -Wno-dev
42   cmake --build build --verbose
45 check() {
46   ninja test -C build
49 package() {
50   depends+=(
51     coeurl libcoeurl.so
52     fmt libfmt.so
53     libolm libolm.so
54     openssl libcrypto.so
55     re2 libre2.so
56     spdlog libspdlog.so
57   )
58   DESTDIR="${pkgdir}" cmake --install build
59   install -Dm644 $pkgname/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
62 # vim:set ft=sh sw=2 sts=2 et: