From c83f6fd7b9f950b042054989fcbf9c4fd603e5af Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Thu, 26 Jul 2018 17:09:15 +0200 Subject: [PATCH] Initial upload. --- .gitignore | 1 + README.md | 3 -- mtxclient.spec | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 mtxclient.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1418f41 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mtxclient-2f519d2.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 75ab0ab..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# mtxclient - -The mtxclient package \ No newline at end of file diff --git a/mtxclient.spec b/mtxclient.spec new file mode 100644 index 0000000..92f760e --- /dev/null +++ b/mtxclient.spec @@ -0,0 +1,85 @@ +%global commit0 2f519d28b4521f7f234b2ed0f32360cbb1edd2f7 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global date 20180714 + +Name: mtxclient +Version: 0.1.0 +Release: 5.%{date}git%{shortcommit0}%{?dist} +Summary: Client API library for Matrix, built on top of Boost.Asio + +License: MIT +URL: https://github.com/mujx/%{name} +Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz + +BuildRequires: spdlog-devel >= 0.16 +BuildRequires: matrix-structs-devel +BuildRequires: json-devel >= 3.1.2 +BuildRequires: mpark-variant-devel +BuildRequires: libsodium-devel +BuildRequires: openssl-devel +BuildRequires: libolm-devel +BuildRequires: ninja-build +BuildRequires: boost-devel +BuildRequires: zlib-devel +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: gcc + +%description +Client API library for the Matrix protocol, built on top of Boost.Asio. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description devel +%{summary}. + +%prep +# Unpacking main tarball with sources... +%autosetup -n %{name}-%{commit0} -p1 +mkdir -p %{_target_platform} +sed -i '/-Werror/d' CMakeLists.txt +echo "include_directories(%{_includedir}/nlohmann)" >> CMakeLists.txt +echo "include_directories(%{_includedir}/mpark)" >> CMakeLists.txt + +%build +pushd %{_target_platform} + %cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_LIB_TESTS=OFF \ + -DBUILD_LIB_EXAMPLES=OFF \ + .. +popd +%ninja_build -C %{_target_platform} + +%install +%ninja_install -C %{_target_platform} +ln -s libmatrix_client.so.%{version} %{buildroot}%{_libdir}/libmatrix_client.so.0 +rm -f %{buildroot}%{_includedir}/{json,variant}.hpp + +%files +%doc README.md +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%{_includedir}/%{name} +%{_libdir}/cmake/MatrixClient +%{_libdir}/*.so + +%changelog +* Thu Jul 26 2018 Vitaly Zaitsev - 0.1.0-5.20180714git2f519d2 +- Minor SPEC fixes. + +* Sat Jul 14 2018 Vitaly Zaitsev - 0.1.0-4.20180714git2f519d2 +- Updated to latest snapshot. + +* Sun Jul 08 2018 Vitaly Zaitsev - 0.1.0-3.20180707git708c8c6 +- Updated to latest snapshot. + +* Sun Jul 01 2018 Vitaly Zaitsev - 0.1.0-2.20180627git7349126 +- Updated to latest snapshot. + +* Sun Jun 24 2018 Vitaly Zaitsev - 0.1.0-2.20180622git96fd35e +- Initial SPEC release. diff --git a/sources b/sources new file mode 100644 index 0000000..f9e5a50 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mtxclient-2f519d2.tar.gz) = d187995cfe46771872d3f47bf0f06ffd17b8955f5ab335656e38df3e787e62ce595d25788c00ee1332229ba2c93afe327ac0380a05fadfce6460c24291956435