File libqmatrixclient.spec of Package libqmatrixclient

#
# spec file for package libqmatrixclient
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global soname libQMatrixClient0

Name:           libqmatrixclient
Version:        0.4.0
Release:        0
Summary:        Library for Qt Matrix Clients
License:        LGPL-2.1
Group:          System/Libraries
Url:            https://github.com/QMatrixClient/libqmatrixclient
Source0:        https://github.com/QMatrixClient/%{name}/archive/v%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Gui)

%description
Library for Qt-based Matrix chat clients. It is required by
Quaternion.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{soname} = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package -n %{soname}
Summary:        Library for Qt Matrix Clients
Group:          System/Libraries

%description -n %{soname}
Library for Qt-based Matrix chat clients. It is required by
Quaternion.

%prep
%setup

%build
%cmake

%install
%cmake_install

%post  -n %{soname} -p /sbin/ldconfig
%postun -n %{soname} -p /sbin/ldconfig

%files -n %{soname}
%doc README.md
%license COPYING
%{_libdir}/libQMatrixClient.so.*

%files devel
%doc README.md
%license COPYING
%{_libdir}/libQMatrixClient.so
%{_libdir}/cmake/QMatrixClient/
%{_libdir}/pkgconfig/QMatrixClient.pc

%dir %{_includedir}/jobs
%dir %{_includedir}/application-service/
%dir %{_includedir}/application-service/definitions
%dir %{_includedir}/csapi
%dir %{_includedir}/csapi/definitions
%dir %{_includedir}/csapi/definitions/wellknown
%dir %{_includedir}/identity/
%dir %{_includedir}/identity/definitions
%dir %{_includedir}/events

%{_includedir}/*.h
%{_includedir}/application-service/definitions/*.h
%{_includedir}/events/*.h
%{_includedir}/jobs/*.h
%{_includedir}/csapi/*.h
%{_includedir}/csapi/definitions/*.h
%{_includedir}/csapi/definitions/wellknown/*.h
%{_includedir}/identity/definitions/*.h
%{_bindir}/qmc-example


%changelog