File libkscreen.spec of Package libkscreen

#
# spec file for package libkscreen
#
# 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 soversion 1
Name:           libkscreen
Version:        1.0.5
Release:        0
Summary:        KDE's screen management library
License:        GPL-2.0+
Group:          System/GUI/KDE
Url:            http://www.kde.org
Source:         http://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM 0001-Fix-crash-in-XRandr1.1-backend.patch
Patch0:         0001-Fix-crash-in-XRandr1.1-backend.patch
# PATCH-FIX-UPSTREAM 0002-Avoid-target-name-collision.patch
Patch1:         0002-Avoid-target-name-collision.patch
# PATCH-FIX-UPSTREAM 0003-Fix-quoting-problems-with-D-depending-on-required-cm.patch
Patch2:         0003-Fix-quoting-problems-with-D-depending-on-required-cm.patch
# PATCH-FIX-UPSTREAM 0004-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch
Patch3:         0004-Fix-building-apps-that-use-kscreen-and-which-fail-wi.patch
BuildRequires:  libkde4-devel >= 4.7.0
BuildRequires:  libqjson-devel >= 0.8.1
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-image)
BuildRequires:  pkgconfig(xcb-renderutil)
BuildRequires:  pkgconfig(xrandr)
Provides:       libkscreen-plugin
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Dynamic display management library for KDE

%package devel
Summary:        KDE's screen management library (development package)
Group:          Development/Libraries/C and C++
Requires:       %{name}%{soversion} = %{version}
Requires:       libqjson-devel >= 0.8.1

%description devel
Development files belonging to libkscreen, dynamic display management in KDE

%package -n %{name}%{soversion}
Summary:        KDE's screen management library
Group:          System/GUI/KDE
Recommends:     libkscreen-plugin

%description -n %{name}%{soversion}
Shared library for dynamic display management in KDE

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  pushd build
  %kde4_makeinstall
  popd
  %kde_post_install

%post -n %{name}%{soversion} -p /sbin/ldconfig

%postun -n %{name}%{soversion} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING
%dir %{_kde4_modulesdir}/plugins/kscreen
%{_kde4_modulesdir}/plugins/kscreen/KSC_XRandR.so
%{_kde4_modulesdir}/plugins/kscreen/KSC_XRandR11.so

%files -n %{name}%{soversion}
%defattr(-,root,root)
%doc COPYING
%{_kde4_libdir}/%{name}.so.%{soversion}*

%files devel
%defattr(-,root,root)
%doc COPYING
%{_kde4_includedir}/kscreen/
%{_kde4_libdir}/%{name}.so
%{_kde4_libdir}/pkgconfig/kscreen.pc
%{_kde4_libdir}/cmake/LibKScreen/
%{_kde4_modulesdir}/plugins/kscreen/KSC_Fake.so

%changelog
openSUSE Build Service is sponsored by