File libksane.spec of Package libksane

#
# spec file for package libksane
#
# 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 _so 5
%define lname libKF5Sane

Name:           libksane
BuildRequires:  extra-cmake-modules
BuildRequires:  kconfig-devel
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  ktextwidgets-devel
BuildRequires:  kwallet-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  sane-backends-devel
BuildRequires:  xz
BuildRequires:  pkgconfig(Qt5Core) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Test) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.2.0
Summary:        KDE Image Plugin Interface
License:        GPL-2.0+
Group:          Development/Libraries/KDE
Url:            http://www.kde.org
Version:        16.08.2
Release:        0
Source0:        %{name}-%{version}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains a library to add scan support to KDE
applications.

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

%build
  %cmake_kf5 -d build
  %make_jobs

%install
  %kf5_makeinstall -C build
  # FIXME: Remove temporarily as they conflict with kipi
  rm -f %{buildroot}%{_kf5_iconsdir}/hicolor/16x16/actions/black-white.png
  rm -f %{buildroot}%{_kf5_iconsdir}/hicolor/16x16/actions/color.png
  rm -f %{buildroot}%{_kf5_iconsdir}/hicolor/16x16/actions/gray-scale.png

%package -n %{lname}%{_so}
Summary:        KDE scan library
Group:          Productivity/Graphics/Other

%description -n %{lname}%{_so}
This package contains a library to add scan support to KDE
applications.

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

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

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

%package devel
Summary:        KDE scan library - Development Files
Group:          Development/Libraries/KDE
Requires:       %{lname}%{_so} = %version
Requires:       sane-backends-devel
Requires:       pkgconfig(Qt5Widgets) >= 5.2.0
Requires:       kwallet-devel
Requires:       kwidgetsaddons-devel
Obsoletes:      libksane-kf5-devel < %{version}
Provides:       libksane-kf5-devel = %{version}

%description devel
This package contains a library to add scan support to KDE
applications.


%files devel
%defattr(-,root,root)
%{_kf5_prefix}/include/KF5/KSane/
%{_kf5_prefix}/include/KF5/ksane_version.h
%{_kf5_libdir}/%{lname}.so
%{_kf5_libdir}/cmake/KF5Sane/

%changelog
openSUSE Build Service is sponsored by