File kate.spec of Package kate4
#
# spec file for package kate
#
# Copyright (c) 2017 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: kate
Version: 4.14.3
Release: 0
Summary: Advanced Text Editor
License: GPL-2.0+
Group: Productivity/Editors/Other
Url: http://www.kde.org/
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gcc7-fix.patch -- fix build with GCC7
Patch0: gcc7-fix.patch
BuildRequires: libkactivities-devel
BuildRequires: libkde4-devel >= %version
BuildRequires: libqjson-devel
BuildRequires: python-devel
BuildRequires: python-kde4-devel
BuildRequires: python-qt4-devel
BuildRequires: python-sip-devel
BuildRequires: xz
Requires: libktexteditor = %{version}
Recommends: %{name}-python-plugins = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
%description
Kate is an advanced text editor for KDE.
%prep
%autosetup -p1
# fix building the pate plugin with python-sip 4.19 (sipClass is deprecated since version 4.8: Use sipType instead)
sed -i 's/sipClass/sipType/' addons/kate/pate/sip/kate/application.sip
sed -i 's/sipClass_/sipType_/' addons/kate/pate/sip/kate/application.sip
%build
%ifarch ppc64
RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
%cmake_kde4 -d build -- -DPYTHON_EXECUTABLE=%{_bindir}/python2
%make_jobs
%install
cd build
%kde4_makeinstall
%create_subdir_filelist -d addons/kate -f kate -v devel
%create_subdir_filelist -d addons/plasma -f kate -v devel
%create_subdir_filelist -d addons/ktexteditor -f ktexteditor -v devel
%create_subdir_filelist -d kate -v devel
%create_subdir_filelist -d kwrite -v devel
%create_subdir_filelist -d part -f ktexteditor -v devel
%create_subdir_filelist -d doc/kate -f kate -v devel
%create_subdir_filelist -d doc/kwrite -f kwrite-doc -v devel
cd ..
%suse_update_desktop_file kate TextEditor
%suse_update_desktop_file kwrite TextEditor
%kde_post_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
rm -rf filelists
%package devel
Summary: Advanced Text Editor Development Headers
Group: Development/Libraries/KDE
Requires: kate = %{version}
Requires: libkde4-devel
%description devel
Files needed for development of Kate plugins.
%files devel -f filelists/devel
%defattr(-,root,root)
%dir %{_kde4_includedir}/kate/
%package -n libkatepartinterfaces4
Summary: Library to interface with kateparts
Group: Productivity/Editors/Other
%description -n libkatepartinterfaces4
The library required by Kate parts.
%package -n libktexteditor
Summary: Advanced Text Editor library
Group: Productivity/Editors/Other
# With the sr#160617, go-kate package is no longer shipped,
# so adding specific version, if the package will return
Provides: go-kate = 1.0.3
Obsoletes: go-kate <= 1.0.3
Provides: kate4-parts = %{version}
Obsoletes: kate4-parts <= %{version}
Requires: libkatepartinterfaces4 = %{version}
%description -n libktexteditor
The libraries shared by kwrite and kate editors.
%package python-plugins
Summary: Additional python plugins for %{name}
Group: Productivity/Editors/Other
Supplements: packageand(IPython:kate)
Recommends: python-jedi
Recommends: python-Jinja2
Recommends: python-ply
Recommends: python-pyplete
Recommends: python-simplejson
%requires_python_sip_api
%description python-plugins
This package pulls in optional dependencies that provide
additional functionality for kate python plugins.
You can still use python plugins with kate without these
dependencies, but some plugins will not work or will
have limited functionality.
%post -n libktexteditor -p /sbin/ldconfig
%postun -n libktexteditor -p /sbin/ldconfig
%files -n libkatepartinterfaces4
%defattr(-,root,root)
%{_kde4_libdir}/libkatepartinterfaces.so*
%files -n libktexteditor -f filelists/ktexteditor
%defattr(-,root,root)
%dir %{_kde4_appsdir}/katepart/
%dir %{_kde4_appsdir}/katepart/*
%dir %{_kde4_appsdir}/katepart/*/*
%dir %{_kde4_appsdir}/katepart/*/*/*
%dir %{_kde4_appsdir}/katepart/*/*/*/*
%dir %{_kde4_appsdir}/ktexteditor_*
%exclude %{_kde4_libdir}/libkatepartinterfaces.so*
%files -f filelists/kate
%defattr(-,root,root)
%dir %{_kde4_appsdir}/kate/
%dir %{_kde4_appsdir}/kate/*
%dir %{_kde4_appsdir}/kate/*/*
%dir %{_kde4_appsdir}/kate/*/*/*
%dir %{_kde4_appsdir}/kate/*/*/*/*
%dir %{_kde4_appsdir}/katexmltools/
%exclude %{_kde4_libdir}/python*/site-packages/PyKate4
%exclude %{_kde4_appsdir}/kate/plugins/pate
%exclude %{_kde4_appsdir}/kate/pate
%exclude %{_kde4_appsdir}/kate/plugins/katepateplugin
%exclude %{_kde4_modulesdir}/katepateplugin.so
%exclude %{_kde4_servicetypesdir}/katepythonplugin.desktop
%exclude %{_kde4_servicesdir}/pate.desktop
%exclude %{_kde4_servicesdir}/katepate_*.desktop
%files python-plugins
%defattr(-,root,root)
%doc addons/kate/pate/README.txt
%{_kde4_libdir}/python*/site-packages/PyKate4/
%{_kde4_appsdir}/kate/plugins/pate/
%{_kde4_appsdir}/kate/pate/
%{_kde4_appsdir}/kate/plugins/katepateplugin/
%{_kde4_modulesdir}/katepateplugin.so
%{_kde4_servicetypesdir}/katepythonplugin.desktop
%{_kde4_servicesdir}/pate.desktop
%{_kde4_servicesdir}/katepate_*.desktop
%package -n kwrite
Summary: KDE Text Editor
Group: Productivity/Editors/Other
Requires: libktexteditor = %{version}
Provides: kde4-kwrite = 4.3.0
Provides: kdebase3:/opt/kde3/bin/kwrite
Obsoletes: kde4-kwrite < 4.3.0
%kde4_runtime_requires
%description -n kwrite
KWrite is the default text editor of the K desktop environment.
%package -n kwrite-doc
Summary: KDE Text Editor: Documentation
Group: Productivity/Editors/Other
Requires: kwrite = %{version}
%description -n kwrite-doc
KWrite is the default text editor of the K desktop environment.
This package contains the documentation for KWrite
%post -n kwrite -p /sbin/ldconfig
%postun -n kwrite -p /sbin/ldconfig
%files -n kwrite -f filelists/kwrite
%defattr(-,root,root)
%exclude %{_kde4_htmldir}/en/kwrite/
%files -n kwrite-doc -f filelists/kwrite-doc
%defattr(-,root,root,-)
%dir %{_kde4_htmldir}/en/kwrite/
%changelog