File libcommuni.spec of Package libcommuni

#
# spec file for package libcommuni
#
# Copyright (c) 2017 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/
#


%define soname 3
Name:           libcommuni
Version:        3.5.0
Release:        0
Summary:        A cross-platform IRC framework written with Qt
License:        BSD-3-Clause
Group:          System/Libraries
URL:            http://communi.github.io/
Source0:        https://github.com/communi/libcommuni/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qtdeclarative-devel

%description
Communi provides a set of tools for enabling IRC connectivity in Qt-based
C++ and QML applications.


%package -n %{name}%{soname}
Summary:        A cross-platform IRC framework written with Qt
Group:          System/Libraries

%description -n %{name}%{soname}
Communi provides a set of tools for enabling IRC connectivity in Qt-based
C++ and QML applications.

%package -n %{name}-devel
Summary:        A cross-platform IRC framework written with Qt
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}
Requires:       fdupes
Requires:       gcc-c++
Requires:       libqt5-qtbase-devel
Requires:       libqt5-qtdeclarative-devel


%description -n %{name}-devel
Communi provides a set of tools for enabling IRC connectivity in Qt-based
C++ and QML applications.


%prep
%setup -q

%build
qmake-qt5 QMAKE_CXXFLAGS+="%{optflags}" QMAKE_CFLAGS+="%{optflags}" QMAKE_STRIP="/bin/true" CONFIG+=no_rpath
make %{?_smp_mflags}

%install
%make_install INSTALL_ROOT=%{buildroot}
%fdupes %{buildroot}

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

%files -n %{name}%{soname}
%doc AUTHORS CHANGELOG LICENSE README.md
%{_libdir}/libIrc*.so.*
%{_libdir}/qt5/qml/Communi

%files -n %{name}-devel
%{_libdir}/libIrc*.so
%{_libdir}/qt5/mkspecs/features/communi*.prf
%{_includedir}/qt5/Communi

%changelog