File libkface.spec of Package libkface.openSUSE_Leap_42.1_Update

#
# spec file for package libkface
#
# Copyright (c) 2015 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 libname libKF5KFace
%define _so  10_0_0

Name:           libkface
Summary:        wrapper around LibFace to perform face recognition and detection over pictures
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Url:            http://www.kde.org
Version:        15.12.0
Release:        0
Source0:        %{name}-%{version}.tar.xz
Patch0:         fix-opencv.diff
BuildRequires:  opencv-qt5-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  kconfig-devel
BuildRequires:  kdelibs4support-devel
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libkface is a Qt/C++ wrapper around LibFace to perform face recognition and detection over pictures

%prep
%setup -q -n %{name}-%{version}
%patch0 -p0

%build
  %cmake_kf5 -d build -- -DENABLE_OPENCV3=false
  %make_jobs

%install
  %kf5_makeinstall -C build

%clean rm -rf $RPM_BUILD_ROOT

%package -n %{libname}%{_so}
Group:          Development/Libraries/KDE
Summary:        wrapper around LibFace to perform face recognition and detection over pictures
Requires:       %{name} = %{version}

%description -n %{libname}%{_so}
Libkface is a Qt/C++ wrapper around LibFace to perform face recognition and detection over pictures

%files -n %{libname}%{_so}
%defattr(-,root,root)
%_kf5_libdir/%{libname}.so.*

%post -n %{libname}%{_so} -p /sbin/ldconfig

%postun -n %{libname}%{_so} -p /sbin/ldconfig

%package devel
Summary:        wrapper around LibFace to perform face recognition and detection over pictures
Group:          Development/Libraries/KDE
Requires:       %{libname}%{_so} = %version
Obsoletes:      libkface-kf5-devel < %{version}
Provides:       libkface-kf5-devel = %{version}

%description devel
Libkface is a Qt/C++ wrapper around LibFace to perform face recognition and detection over pictures

%files devel
%defattr(-,root,root)
%doc COPYING README
%_kf5_libdir/%{libname}.so
%_kf5_includedir/KFace/
%_kf5_includedir/libkface_version.h
%{_kf5_libdir}/cmake/KF5KFace/

%files
%defattr(-,root,root)
%_kf5_appsdir/libkface/

%changelog
openSUSE Build Service is sponsored by