void-packages/srcpkgs/mtxclient/template

36 lines
1.1 KiB
Bash

# Template file for 'mtxclient'
pkgname=mtxclient
version=0.2.0
revision=2
build_style=cmake
configure_args="-DBUILD_LIB_TESTS=OFF -DBUILD_LIB_EXAMPLES=OFF
-DBUILD_SHARED_LIBS=ON"
hostmakedepends="pkg-config"
makedepends="boost-devel zlib-devel libsodium-devel libressl-devel olm-devel
json-c++"
short_desc="Client API library for the Matrix protocol"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/mujx/mtxclient"
distfiles="https://github.com/mujx/mtxclient/archive/v${version}.tar.gz"
checksum=e7638d4a8233c0c763d48111fd13e8ad1dcd5f34e3e641b46eaf1bb920b73482
pre_configure() {
sed -i '/-Werror/d' CMakeLists.txt
}
pre_build() {
# Fix up includes to nlohmann json
grep -rl '#include <json.hpp>' | xargs sed -i 's|#include <json.hpp>|#include <nlohmann/json.hpp>|'
grep -rl '#include "json.hpp"' | xargs sed -i 's|#include "json.hpp"|#include <nlohmann/json.hpp>|'
}
mtxclient-devel_package() {
depends="mtxclient-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}