File kdebase4.spec of Package kdebase4

#
# spec file for package kdebase4
#
# 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/
#


Name:           kdebase4
Version:        16.08.2
Release:        0
Summary:        The Base KDE Apps
License:        GPL-2.0+
Group:          System/GUI/KDE
Url:            http://www.kde.org/
Source0:        kde-baseapps-%{version}.tar.xz
Source1:        baselibs.conf
Source2:        %{name}-rpmlintrc
# PATCH-FEATURE-OPENSUSE dolphin-go_up.diff -- adds a "go up" button to dolphin's default toolbar.
Patch1:         dolphin-go_up.diff
BuildRequires:  fdupes
BuildRequires:  libkactivities-devel
BuildRequires:  libkde4-devel >= 4.14
BuildRequires:  libsmbclient-devel
BuildRequires:  libtidy-devel
BuildRequires:  xz
Provides:       browser(npapi)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires

%description
This package contains the basic applications for a KDE workspace.

%prep
%setup -q -n kde-baseapps-%{version}
%patch1 -p1

%build
  %cmake_kde4 -d build -- -DBUILD_plasma=OFF
  %make_jobs

%install
  pushd build
  %kde4_makeinstall
  %create_subdir_filelist -d kdepasswd
  %create_subdir_filelist -d kdialog
  %create_subdir_filelist -d keditbookmarks
  %create_subdir_filelist -d kfind
  %create_subdir_filelist -d konqueror
  %create_subdir_filelist -d konq-plugins
  %create_subdir_filelist -d lib -v lib.devel
  %create_subdir_filelist -d nsplugins
  popd
  %create_exclude_filelist
  %suse_update_desktop_file konqbrowser      WebBrowser
  %suse_update_desktop_file konquerorsu      System FileManager
  %suse_update_desktop_file kfind            System Filesystem core
  %suse_update_desktop_file Home             System FileManager core
  %fdupes -s %{buildroot}
  %kde_post_install

  # Remove unwanted files from Dolphin
  rm -rf %{buildroot}%{_bindir}/dolphin4
  rm -rf %{buildroot}%{_libdir}/libkdeinit4_dolphin4.so
  rm -rf %{buildroot}%{_kde4_appsdir}/dolphin
  rm -rf %{buildroot}%{_kde4_configdir}/servicemenu.knsrc
  rm -rf %{buildroot}%{_kde4_servicetypesdir}/fileviewversioncontrolplugin.desktop


%package -n kdepasswd
Summary:        KDE Password Changer
Group:          System/GUI/KDE
%kde4_runtime_requires

%description -n kdepasswd
This application allows you to change your UNIX password.

%package -n kdialog
Summary:        KDE version of xdialog
Group:          System/GUI/KDE
%kde4_runtime_requires

%description -n kdialog
KDialog can be used to show nice dialog boxes from shell scripts.

%package -n keditbookmarks
Summary:        KDE Bookmark Editor
Group:          System/GUI/KDE
%kde4_runtime_requires

%description -n keditbookmarks
This is an editor to edit your KDE-wide bookmark set.

%package -n kfind
Summary:        KDE Find File Utility
Group:          Productivity/File utilities
%kde4_runtime_requires

%description -n kfind
KFind allows you to search for directories and files.

%package -n konqueror
Summary:        KDE File Manager and Browser
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name}-libkonq = %{version}
Requires:       konqueror-plugins = %{version}
Recommends:     kwebkitpart
Recommends:     kdebase4-nsplugin
%kde4_runtime_requires

%description -n konqueror
Konqueror allows you to manage your files and browse the web in a
unified interface.

%package -n konqueror-plugins
Summary:        KDE File Manager and Browser
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name}-libkonq = %{version}
Provides:       konqueror-plugins-lang = %{version}
Obsoletes:      konqueror-plugins-lang < %{version}
Obsoletes:      dolphin4 < %{version}
Provides:       dolphin4 = %{version}
%kde4_runtime_requires

%description -n konqueror-plugins
These plugins extend the functionality of Konqueror.

%package libkonq
Summary:        KDE Konqueror Libraries
Group:          System/GUI/KDE
Requires:       libkonq5 = %{version}
%kde4_runtime_requires

%description libkonq
This package contains the files used by file managers as Konqueror.

%package -n libkonq-devel
Summary:        KDE Konqueror Libraries: Build Environment
Group:          Development/Libraries/KDE
Requires:       libkde4-devel
Requires:       libkonq5 = %{version}

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

%package -n libkonq5
Summary:        KDE Konqueror Libraries
Group:          System/GUI/KDE
# naming error, make seamless upgrade possible
%requires_ge    libqt4-x11

%description -n libkonq5
This package contains the libraries used by file managers as Konqueror.

%package nsplugin
Provides:       %{name}-nsplugin64 = 4.0.72
Obsoletes:      %{name}-nsplugin64 < 4.0.72
%ifarch x86_64 ppc64 s390x ia64
Suggests:       nspluginwrapper
%endif
Summary:        Netscape plugin support for KDE
Group:          System/GUI/KDE
%kde4_runtime_requires

%description nsplugin
This package contains support for Netscape plug-ins in konqueror. You
have to enable JavaScript for this.

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post   -n kdepasswd -p /sbin/ldconfig

%postun -n kdepasswd -p /sbin/ldconfig

%post   -n kdialog -p /sbin/ldconfig

%postun -n kdialog -p /sbin/ldconfig

%post   -n keditbookmarks -p /sbin/ldconfig

%postun -n keditbookmarks -p /sbin/ldconfig

%post   -n kfind -p /sbin/ldconfig

%postun -n kfind -p /sbin/ldconfig

%post   -n konqueror -p /sbin/ldconfig

%postun -n konqueror -p /sbin/ldconfig

%post   -n konqueror-plugins -p /sbin/ldconfig

%postun -n konqueror-plugins -p /sbin/ldconfig

%post   libkonq -p /sbin/ldconfig

%postun libkonq -p /sbin/ldconfig

%post   -n libkonq5 -p /sbin/ldconfig

%postun -n libkonq5 -p /sbin/ldconfig

%files -n kdepasswd -f filelists/kdepasswd
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%dir %{_kde4_appsdir}/kdm
%dir %{_kde4_appsdir}/kdm/pics
%dir %{_kde4_appsdir}/kdm/pics/users

%files -n kdialog -f filelists/kdialog
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%doc kdialog/README kdialog/progressdemo kdialog/progresscanceldemo kdialog/test

%files -n keditbookmarks -f filelists/keditbookmarks
%defattr(-,root,root)
%doc COPYING COPYING.DOC README

%files -n kfind -f filelists/kfind
%defattr(-,root,root)
%dir %{_kde4_datadir}/appdata
%doc COPYING COPYING.DOC README

%files -n konqueror -f filelists/konqueror
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%dir %{_datadir}/autostart
%dir %{_kde4_datadir}/appdata
%dir %{_kde4_appsdir}/dolphinpart/kpartplugins
%dir %{_kde4_appsdir}/kcmcss
%dir %{_kde4_appsdir}/kcontrol
%dir %{_kde4_appsdir}/kcontrol/pics
%dir %{_kde4_appsdir}/konqsidebartng/dirtree
%dir %{_kde4_appsdir}/konqsidebartng/entries
%dir %{_kde4_appsdir}/konqsidebartng/plugins
%dir %{_kde4_appsdir}/konqsidebartng/virtual_folders/remote
%dir %{_kde4_appsdir}/konqsidebartng/virtual_folders/remote/ftp
%dir %{_kde4_appsdir}/konqsidebartng/virtual_folders/remote/web
%dir %{_kde4_appsdir}/konqueror/opensearch
%dir %{_kde4_appsdir}/konqueror/kpartplugins
%dir %{_kde4_appsdir}/kwebkitpart/
%dir %{_kde4_appsdir}/kwebkitpart/kpartplugins/
%dir %{_kde4_servicesdir}/useragentstrings

# Originally packaged as dolphin4
%{_kde4_appsdir}/dolphinpart/
%{_kde4_modulesdir}/dolphinpart.so
%{_kde4_modulesdir}/kcm_dolphin*.so
%{_kde4_modulesdir}/kio_filenamesearch.so
%{_libdir}/libdolphinprivate4.so*
%{_kde4_servicesdir}/dolphinpart.desktop
%{_kde4_servicesdir}/kcmdolphin*.desktop
%{_kde4_servicesdir}/filenamesearch.protocol
# installed from apps/lib/konq/ and hence in kdebase4-libkonq
%exclude %{_kde4_appsdir}/konqueror/pics/arrow_bottomleft.png
%exclude %{_kde4_appsdir}/konqueror/pics/arrow_bottomright.png
%exclude %{_kde4_appsdir}/konqueror/pics/arrow_topleft.png
%exclude %{_kde4_appsdir}/konqueror/pics/arrow_topright.png
%exclude %{_kde4_includedir}/konqsidebarplugin.h
%exclude %{_kde4_libdir}/libkonqsidebarplugin.so
%exclude %{_kde4_appsdir}/dolphinpart/kpartplugins/

%files -n konqueror-plugins -f filelists/konq-plugins
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%dir %{_kde4_appsdir}/akregator
%dir %{_kde4_appsdir}/akregator/pics
%dir %{_kde4_appsdir}/domtreeviewer
%dir %{_kde4_appsdir}/fsview
%dir %{_kde4_appsdir}/konqueror/icons
%dir %{_kde4_appsdir}/konqueror/icons/oxygen
%dir %{_kde4_appsdir}/konqueror/icons/oxygen/*
%dir %{_kde4_appsdir}/konqueror/icons/oxygen/*/actions
%dir %{_kde4_appsdir}/konqueror/kpartplugins
%dir %{_kde4_appsdir}/konqueror/opensearch
%dir %{_kde4_appsdir}/dolphinpart/kpartplugins

%files libkonq -f filelists/lib
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%dir %{_kde4_appsdir}/kbookmark
%dir %{_kde4_sharedir}/templates
%dir %{_kde4_sharedir}/templates/.source
%exclude %{_kde4_includedir}/knewmenu.h
%exclude %{_kde4_includedir}/konq_*.h
%exclude %{_kde4_includedir}/konqmimedata.h
%exclude %{_kde4_includedir}/libkonq_export.h
%exclude %{_kde4_libdir}/libkonq.so
%exclude %{_kde4_libdir}/libkonq.so.*

%files -n libkonq-devel -f filelists/lib.devel
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%{_kde4_includedir}/knewmenu.h
%{_kde4_includedir}/konq_*.h
%{_kde4_includedir}/konqmimedata.h
%{_kde4_includedir}/konqsidebarplugin.h
%{_kde4_includedir}/libkonq_export.h
%{_kde4_libdir}/libkonq.so
%{_kde4_libdir}/libkonqsidebarplugin.so

%files -n libkonq5
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%{_kde4_libdir}/libkonq.so.*

%files nsplugin -f filelists/nsplugins
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%dir %{_kde4_appsdir}/nsplugin

%changelog