File kdelibs4.spec of Package kdelibs4.openSUSE_12.1_Update

#
# spec file for package kdelibs4
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#


Name:           kdelibs4
BuildRequires:  OpenEXR-devel
BuildRequires:  alsa-devel
BuildRequires:  aspell-devel
BuildRequires:  automoc4
BuildRequires:  avahi-compat-mDNSResponder-devel
BuildRequires:  bison
BuildRequires:  cmake
BuildRequires:  cups-devel
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  enchant-devel
BuildRequires:  fam-devel
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  giflib-devel
BuildRequires:  grantlee-devel
%if 0%{?kdelibs_is_fully_gplv3_compatible}
BuildRequires:  herqq-devel
%endif
BuildRequires:  hicolor-icon-theme
BuildRequires:  kde4-filesystem
BuildRequires:  libQtWebKit-devel
BuildRequires:  libacl-devel
BuildRequires:  libattica-devel
BuildRequires:  libdbusmenu-qt-devel
BuildRequires:  libgssglue-devel
BuildRequires:  libjasper-devel
BuildRequires:  libpolkit-qt-1-devel
BuildRequires:  libqca2-devel
BuildRequires:  libsoprano-devel
BuildRequires:  libudev-devel
BuildRequires:  libxslt-devel
BuildRequires:  pcre-devel
BuildRequires:  phonon-devel
BuildRequires:  shared-desktop-ontologies-devel
BuildRequires:  shared-mime-info
BuildRequires:  strigi
BuildRequires:  strigi-devel
BuildRequires:  unzip
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1130
BuildRequires:  utempter-devel
%else
BuildRequires:  utempter
%endif
BuildRequires:  xz-devel
Version:        4.7.2
Release:        0
%if %suse_version > 1140
%define brandingversion 4.7
%endif
%if %suse_version == 1130
%define brandingversion 11.3
%endif
%if %suse_version == 1140
%define brandingversion 11.4
%endif
Summary:        KDE Base Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
Url:            http://www.kde.org
Source0:        kdelibs-%{version}.tar.bz2
Source1:        baselibs.conf
Source2:        hidden.desktop
Source3:        ycp.xml
Source4:        kde4rc
Patch0:         4_7_BRANCH.diff
Patch1:         kde3-applications.diff
Patch2:         default-useragent.diff
Patch3:         add-suse-translations.diff
Patch5:         clever-menu.diff
Patch6:         hotplug-kde3.diff
Patch8:         windeco-color.diff
Patch9:         kdesu-settings.diff
Patch10:        kdebug-areas-update.diff
Patch12:        desktop-translations.diff
Patch13:        kjs-mark-register-stack.diff
Patch17:        flash-player-non-oss.diff
Patch18:        plasma-libs.diff
Patch20:        ignore-inline-menu.diff
Patch24:        ksuseinstall.diff
Patch25:        kdelibs-pulseaudio-1.0.patch
Patch26:        kdelibs4-mount-vfat-fs-with-flush.diff
Patch27:        commit_4f2eb356f1c23444fff2cfe0a7ae10efe303d6d8.diff
Patch28:        commit_a872c8a969a8bd3706253d6ba24088e4f07f3352.diff
Patch29:        commit_65464349951e0df9b5d80c2eb3cc7458d54923ae.diff
Patch30:        commit_1f8b1b034ccf1713a5d123a4c327290f86d17d53.diff
Patch31:        commit_999eac446a49e6126df04aa8717f95e6aef136fc.diff
#PATCH-FIX-UPSTREAM fix-kdirlister-forgetting-to-watch.patch fixes directory listing/watching, kde#211472 and bnc#699079
Patch32:        fix-kdirlister-forgetting-to-watch.patch
PreReq:         permissions
Requires:       soprano >= %( echo `rpm -q --queryformat '%{VERSION}' libsoprano-devel`)
Recommends:     strigi >= %( echo `rpm -q --queryformat '%{VERSION}' strigi-devel`)
Requires:       kdelibs4-core = %{version}
Requires:       libkde4 = %{version}
Requires:       udisks
Requires:       upower
Requires(post):     shared-mime-info
Requires(postun):   shared-mime-info

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%requires_ge        libstrigi0
%requires_ge        shared-mime-info
%requires_ge        shared-desktop-ontologies
%requires_ge        libqt4-x11
%kde4_runtime_requires

%if 0%{?opensuse_bs}
%define debug_package_requires %{name} = %{version}-%{release} libqt4-debuginfo
%endif

Requires:       %{name}-branding = %{brandingversion}

%description
This package contains the basic packages of the K Desktop Environment.
It contains the necessary libraries for the KDE desktop.

This package is absolutely necessary for using graphical KDE
applications.

%package branding-upstream
Summary:        KDE Base Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
Provides:       %{name}-branding = %{brandingversion}

Supplements:    packageand(kdelibs4:branding-upstream)
Conflicts:      otherproviders(%{name}-branding)

%description branding-upstream
This package contains the basic packages for a K Desktop Environment
branding.

%prep
%setup -q -n kdelibs-%{version}
%patch0 -p1
%patch1
%patch2
%patch3
%patch5
%patch6
%patch8
%patch9
%patch10
%patch12
%patch13
%patch17
%patch18 -p1
%patch20
%patch24
%if 0%{?suse_version} == 1210
%patch25 -p1
%endif
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1

#
# define KDE version exactly
#
if [ '%{_project}' != KDE:Distro:Factory -a \
     '%{_project}' != KDE:KDE4:UNSTABLE:Desktop -a \
     '%{_project}' != KDE:Distro:Stable -a \
     '%{_project}' != openSUSE:Factory ] ; then
  sed -ri "s,#cmakedefine KDE_VERSION_STRING \"@KDE_VERSION_STRING@\",#cmakedefine KDE_VERSION_STRING \"@KDE_VERSION_STRING@ \\\\\"release $(echo %{release} | cut -d. -f-1)\\\\\"\"," kdecore/util/kdeversion.h.cmake
fi

%build
  EXTRA_FLAGS="-DLIB_INSTALL_DIR=%{_kde4_libdir} \
        -DCONFIG_INSTALL_DIR=%{_kde4_configdir} \
        -DDATA_INSTALL_DIR=%{_kde4_appsdir} \
        -DKCFG_INSTALL_DIR=%{_kde4_configkcfgdir} \
        -DMIME_INSTALL_DIR=/nogo \
%if 0
        -DKDE4_ENABLE_FINAL=1 \
%endif
        -DKDE4_ENABLE_FPIE=1
        -DTEMPLATES_INSTALL_DIR=%{_kde4_sharedir}/templates \
        -DHTML_INSTALL_DIR=%{_kde4_htmldir} \
        -DKDE_DEFAULT_HOME=.kde4 -DSYSCONF_INSTALL_DIR=%{_sysconfdir}"
  %cmake_kde4 -d build -- -DKDE_DISTRIBUTION_TEXT="%distribution" $EXTRA_FLAGS
  %make_jobs

%install
  cd build
  %make_install
  chmod +x %{buildroot}%{_kde4_appsdir}/kconf_update/ksslcertificatemanager.upd.sh
  %create_subdir_filelist -d kdecore -v kdecore.devel
  %create_subdir_filelist -d kpty -f kdecore -v kdecore.devel
  cd ..
  %create_exclude_filelist
  install -p -D doc/api/doxygen.sh %{buildroot}%{_kde4_bindir}/kde4-doxygen.sh
  mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
  mv %{buildroot}%{_sysconfdir}/xdg/menus/applications.menu \
     %{buildroot}%{_sysconfdir}/xdg/menus/applications.menu.kde4
  rm %{buildroot}%{_mandir}/man1/checkXML.1
  mv %{buildroot}%{_mandir}/man7/kdeoptions.7 \
     %{buildroot}%{_mandir}/man7/kde4options.7
  mv %{buildroot}%{_mandir}/man7/qtoptions.7 \
     %{buildroot}%{_mandir}/man7/qt4options.7
  mkdir -p %{buildroot}%{_datadir}/autostart/
  install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/autostart/panel.desktop
  install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/autostart/ktip.desktop
  install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/autostart/kdesktop.desktop
  install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/
  mkdir -p %{buildroot}/%{_kde4_libdir}/kconf_update_bin
  %kde_post_install
  %fdupes -s %{buildroot}

%post
/sbin/ldconfig
%{_kde4_bindir}/update-mime-database %{_datadir}/mime &> /dev/null || :

%if 0%{?suse_version} > 1130
%set_permissions %{_kde4_libexecdir}/start_kdeinit
%endif

%postun
/sbin/ldconfig
%{_kde4_bindir}/update-mime-database %{_datadir}/mime &> /dev/null || :

%verifyscript
%verify_permissions -e %{_kde4_libexecdir}/start_kdeinit

%clean
  rm -rf %{buildroot}
  rm -rf filelists

%package doc
Summary:        Documentation for KDE Base Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
%define regcat /usr/bin/sgml-register-catalog
PreReq:         %{regcat}
PreReq:         /usr/bin/edit-xml-catalog
PreReq:         /usr/bin/xmlcatalog
PreReq:         awk
PreReq:         grep
PreReq:         sed
Requires:       sgml-skel
%kde4_runtime_requires

%description doc
This package contains the core environment and templates for the KDE
help system.

%files doc
%defattr(-,root,root)
%doc %lang(en) %{_kde4_htmldir}/en/kioslave
%{_kde4_appsdir}/ksgmltools2
%{_kde4_bindir}/kde4-doxygen.sh
%{_kde4_bindir}/meinproc4

%package -n libkdecore4
Summary:        KDE Core Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
%requires_ge        libqt4

%description -n libkdecore4
This package contains the core libraries of the K Desktop Environment.

This package is absolutely necessary for using KDE applications.

%post -n libkdecore4 -p /sbin/ldconfig

%postun -n libkdecore4 -p /sbin/ldconfig

%files -n libkdecore4
%defattr(-,root,root)
%doc COPYING COPYING.DOC COPYING.LIB README
%{_kde4_libdir}/libkdecore.so.*
%{_kde4_libdir}/libkdefakes.so.*
%{_kde4_libdir}/libkpty.so.*

%package -n kdelibs4-core
Summary:        KDE Base Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
Requires:       kde4-filesystem >= %{_kde_platform_version}
Requires:       libkdecore4 = %{version}
%requires_ge        libpolkit-qt-1-1
%kde4_runtime_requires

%description -n kdelibs4-core
This package contains the basic packages of the K Desktop Environment.
It contains the necessary libraries for the KDE desktop.

This package is absolutely necessary for using graphical KDE
applications.

%files -n kdelibs4-core -f filelists/kdecore
%defattr(-,root,root)
%doc COPYING COPYING.DOC COPYING.LIB README
%config %{_kde4_configdir}/kdebug.areas
%config %{_kde4_configdir}/kdebugrc
%config %{_kde4_sysconfdir}/dbus-1/system.d/org.kde.auth.conf
%config %{_kde4_sysconfdir}/kde4rc

%dir %{_kde4_libdir}/kde4
%dir %{_kde4_sharedir}/servicetypes

%exclude %{_datadir}/locale/all_languages
%exclude %{_kde4_bindir}/kconfig_compiler
%exclude %{_kde4_libdir}/libkdecore.so.*
%exclude %{_kde4_libdir}/libkdefakes.so.*
%exclude %{_kde4_libdir}/libkpty.so.*

%package -n libkdecore4-devel
Summary:        KDE Core Libraries: Build Environment
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Requires:       automoc4
Requires:       cmake
Requires:       kdelibs4-core = %{version}
Requires:       libkdecore4 = %{version}
Requires:       libqt4-devel

%description -n libkdecore4-devel
This package contains all necessary include files and libraries needed
to develop non-graphical KDE applications.

%files -n libkdecore4-devel -f filelists/kdecore.devel
%defattr(-,root,root)
%doc COPYING COPYING.DOC COPYING.LIB README
%{_kde4_bindir}/kconfig_compiler
%{_kde4_includedir}/kdemacros.h

%package -n libkde4
Summary:        KDE Base Libraries
License:        LGPL-2.1+
Group:          System/GUI/KDE
%requires_ge        libqt4-x11

%description -n libkde4
This package contains the basic packages of the K Desktop Environment.
It contains the necessary libraries for the KDE desktop.

This package is absolutely necessary for using graphical KDE
applications.

%post -n libkde4 -p /sbin/ldconfig

%postun -n libkde4 -p /sbin/ldconfig

%files branding-upstream
%defattr(-,root,root)
%doc COPYING.LIB
%if %suse_version > 1200
%{_kde4_appsdir}/kdeui/about
%else
%{_kde4_appsdir}/kdeui/about/body-background.jpg
%endif

%files -n libkde4
%defattr(-,root,root)
%doc COPYING COPYING.DOC COPYING.LIB README
%{_datadir}/locale/all_languages
%{_kde4_libdir}/libkactivities.so.*
%{_kde4_libdir}/libkcmutils.so.*
%{_kde4_libdir}/libkde3support.so.*
%{_kde4_libdir}/libkdeclarative.so.*
%{_kde4_libdir}/libkdesu.so.*
%{_kde4_libdir}/libkdeui.so.*
%{_kde4_libdir}/libkdewebkit.so.*
%{_kde4_libdir}/libkdnssd.so.*
%{_kde4_libdir}/libkemoticons.so.*
%{_kde4_libdir}/libkfile.so.*
%{_kde4_libdir}/libkhtml.so.*
%{_kde4_libdir}/libkidletime.so.*
%{_kde4_libdir}/libkimproxy.so.*
%{_kde4_libdir}/libkio.so.*
%{_kde4_libdir}/libkjs.so.*
%{_kde4_libdir}/libkjsapi.so.*
%{_kde4_libdir}/libkjsembed.so.*
%{_kde4_libdir}/libkmediaplayer.so.*
%{_kde4_libdir}/libknewstuff2.so.*
%{_kde4_libdir}/libknewstuff3.so.*
%{_kde4_libdir}/libknotifyconfig.so.*
%{_kde4_libdir}/libkntlm.so.*
%{_kde4_libdir}/libkparts.so.*
%{_kde4_libdir}/libkprintutils.so.*
%{_kde4_libdir}/libkrosscore.so.*
%{_kde4_libdir}/libkrossui.so.*
%{_kde4_libdir}/libktexteditor.so.*
%{_kde4_libdir}/libkunitconversion.so.*
%{_kde4_libdir}/libkunittest.so.*
%{_kde4_libdir}/libkutils.so.*
%{_kde4_libdir}/libnepomuk.so.*
%{_kde4_libdir}/libnepomukquery.so.*
%{_kde4_libdir}/libnepomukutils.so.*
%{_kde4_libdir}/libplasma.so.*
%{_kde4_libdir}/libsolid.so.*
%{_kde4_libdir}/libthreadweaver.so.*

%package -n libkde4-devel
Summary:        KDE Base Libraries: Build Environment
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Requires:       OpenEXR-devel
Requires:       alsa-devel
Requires:       aspell-devel
Requires:       avahi-compat-mDNSResponder-devel
Requires:       cups-devel
Requires:       docbook-xsl-stylesheets
Requires:       enchant-devel
Requires:       fam-devel
Requires:       giflib-devel
Requires:       kdelibs4 = %{version}
Requires:       kdelibs4-doc = %{version}
Requires:       libQtWebKit-devel
Requires:       libacl-devel
Requires:       libattica-devel
Requires:       libbz2-devel
Requires:       libidn-devel
Requires:       libkde4 = %{version}
Requires:       libkdecore4-devel = %{version}
Requires:       libpolkit-qt-1-devel
Requires:       libsoprano-devel
Requires:       libxslt-devel
Requires:       pcre-devel
Requires:       phonon-devel
Requires:       shared-desktop-ontologies-devel
Requires:       strigi-devel
Requires:       update-desktop-files
Requires:       pkgconfig(libxml-2.0)
Provides:       libknotificationitem-devel = 4.3.66svn1016707
Obsoletes:      libknotificationitem-devel < 4.3.66svn1016707
Provides:       kde4-webkitpart-devel = 4.3.73svn1042829
Obsoletes:      kde4-webkitpart-devel < 4.3.73svn1042829

%description -n libkde4-devel
This package contains all necessary include files and libraries needed
to develop KDE applications.

%files -n libkde4-devel -f filelists/exclude
%defattr(-,root,root)
%exclude %{_kde4_includedir}/ksuseinstall*
%exclude %{_kde4_includedir}/kdemacros.h
%exclude %{_kde4_libdir}/libkdeinit4_*.so
%exclude %{_kde4_libdir}/libksuseinstall.so

%{_kde4_appsdir}/cmake
%{_kde4_includedir}/*
%{_kde4_libdir}/*.so
%{_kde4_libdir}/kde4/plugins/script/libkrossqtsplugin.so

%files -f filelists/exclude
%defattr(-,root,root)
%verify(not mode caps) %attr(4755,root,root) %{_kde4_libexecdir}/start_kdeinit

%config %{_kde4_configdir}/*
%config %{_kde4_sysconfdir}/xdg/menus/applications.menu.kde4

%dir %{_datadir}/autostart
%dir %{_datadir}/doc/kde
%doc %dir %{_kde4_docdir}/HTML
%doc %dir %{_kde4_htmldir}/en
%doc %dir %{_kde4_htmldir}/en/common
%dir %{_kde4_libdir}/kconf_update_bin
%dir %{_kde4_libdir}/kde4
%dir %{_kde4_sharedir}/servicetypes
%dir %{_kde4_sysconfdir}/xdg/menus

%doc %lang(en) %{_kde4_htmldir}/en/sonnet

%exclude %{_kde4_appsdir}/cmake
%if %suse_version > 1200
%exclude %{_kde4_appsdir}/kdeui/about
%else
%exclude %{_kde4_appsdir}/kdeui/about/body-background.jpg
%endif
%exclude %{_kde4_appsdir}/ksgmltools2
%exclude %{_kde4_bindir}/kde4-doxygen.sh
%exclude %{_kde4_bindir}/meinproc4
%exclude %{_kde4_libdir}/kde4/plugins/script/libkrossqtsplugin.so

%{_datadir}/autostart/kdesktop.desktop
%{_datadir}/autostart/ktip.desktop
%{_datadir}/autostart/panel.desktop
%{_datadir}/dbus-1/interfaces/*
%{_datadir}/mime/packages/kde.xml

%{_kde4_applicationsdir}/kmailservice.desktop
%{_kde4_applicationsdir}/ktelnetservice.desktop
%{_kde4_appsdir}/*
%{_kde4_bindir}/*
%doc %{_kde4_htmldir}/en/common/*
%{_kde4_iconsdir}/hicolor/*/actions/presence_away.*
%{_kde4_iconsdir}/hicolor/*/actions/presence_offline.*
%{_kde4_iconsdir}/hicolor/*/actions/presence_online.*
%{_kde4_iconsdir}/hicolor/*/actions/presence_unknown.*
%{_kde4_libdir}/libkdeinit4_*.so
%doc %{_kde4_mandir}/man*/*
%{_kde4_modulesdir}/*
%{_kde4_servicesdir}/*
%{_kde4_servicetypesdir}/*
%{_kde4_sysconfdir}/xdg/menus/applications.menu.kde4

# IMPORTANT: When this is obsolete, do not just remove this, but create
# a separate package (for backwards compatibility).

%package -n libksuseinstall1
Summary:        On-demand installation of packages
License:        MIT
Group:          Development/Libraries/KDE
Requires:       yast2-packager >= 2.19.7
Requires:       zypper
Recommends:     ptools
%requires_ge        libqt4-x11

%description -n libksuseinstall1
This library implements private API to install additional packages for KDE.

%package -n libksuseinstall-devel
Summary:        On-demand installation of packages
License:        MIT
Group:          Development/Libraries/KDE
Requires:       libkde4-devel
Requires:       libksuseinstall1 = %{version}

%description -n libksuseinstall-devel
This library implements private API to install additional packages for KDE.

%post -n libksuseinstall1 -p /sbin/ldconfig

%postun -n libksuseinstall1 -p /sbin/ldconfig

%files -n libksuseinstall1
%defattr(-,root,root)
%{_kde4_libdir}/libksuseinstall.so.*

%files -n libksuseinstall-devel
%defattr(-,root,root)
%{_kde4_includedir}/ksuseinstall.h
%{_kde4_includedir}/ksuseinstall_export.h
%{_kde4_libdir}/libksuseinstall.so

%changelog
openSUSE Build Service is sponsored by