File libjreen-qt5.spec of Package libjreen-qt5

#
# spec file for package libjreen-qt5
#
# Copyright (c) 2016 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 1

Name:           libjreen-qt5
Version:        1.2.0
Release:        0
Summary:        Qt Jabber/XMPP library
License:        GPL-2.0+
Group:          System/Libraries
Url:            http://github.com/euroelessar/jreen
Source:         v%{version}.tar.gz
Patch0:         0001-Use-GNUInstallDirs-to-determine-install-dirs.patch
# PATCH-FIX-UPSTREAM -- 0002-Clean_includes.patch
Patch1:         0002-Clean_includes.patch
BuildRequires:  cmake
BuildRequires:  libgsasl-devel
BuildRequires:  speex-devel
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Qt Jabber/XMPP extensible library.

%package -n libjreen-qt5-%{soname}
Summary:        Qt Jabber/XMPP library
Group:          System/Libraries

%description -n libjreen-qt5-%{soname}
Qt Jabber/XMPP extensible library.

%package -n libjreen-qt5-devel
Summary:        Qt Jabber/XMPP library
Group:          Development/Libraries/C and C++
Requires:       libjreen-qt5-%{soname} = %{version}

%description -n libjreen-qt5-devel
Qt Jabber/XMPP extensible library.

%prep
%setup -q -n jreen-%{version}
%patch0 -p1
%patch1 -p1

%build
mkdir -p build
pushd build
cmake .. \
  cmake -DCMAKE_BUILD_TYPE=None \\\
      -DCMAKE_C_FLAGS="%{optflags} -DNDEBUG" \\\
      -DCMAKE_CXX_FLAGS="%{optflags} -DNDEBUG" \\\
      -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions" \\\
      -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions" \\\
      -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions" \\\
      -DCMAKE_VERBOSE_MAKEFILE=ON \\\
      -DCMAKE_INSTALL_PREFIX=%{_prefix} ..

%make_jobs
popd

%install
%makeinstall -C build

%post   -n libjreen-qt5-%{soname} -p /sbin/ldconfig

%postun -n libjreen-qt5-%{soname} -p /sbin/ldconfig

%files -n libjreen-qt5-%{soname}
%defattr(-,root,root)
%doc AUTHORS  ChangeLog COPYING  README
%{_libdir}/libjreen-qt5.so.%{soname}
%{_libdir}/libjreen-qt5.so.%{soname}.*

%files -n libjreen-qt5-devel
%defattr(-,root,root)
%{_includedir}/jreen-qt5/
%{_libdir}/libjreen-qt5.so
%{_libdir}/pkgconfig/libjreen-qt5.pc

%changelog
openSUSE Build Service is sponsored by