File kile.spec of Package kile

#
# spec file for package kile
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 Johannes Engel <jcnengel@googlemail.com>
#
# 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:           kile
Version:        2.1.3
Release:        0
Summary:        A LaTeX Source Editor and TeX Shell
License:        GPL-2.0+
Group:          Productivity/Publishing/TeX/Frontends
Url:            http://kile.sourceforge.net/
Source0:        http://prdownloads.sourceforge.net/kile/%{name}-%{version}.tar.bz2
BuildRequires:  ImageMagick
BuildRequires:  fdupes
BuildRequires:  libkde4-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       konsole
Requires:       libktexteditor
Requires:       texlive-context
Requires:       texlive-latex
Requires:       texlive-xetex
Recommends:     %{name}-lang = %{version}
Recommends:     ImageMagick
Recommends:     dblatex
Recommends:     ghostscript-library
Recommends:     kbibtex
Recommends:     konqueror
Recommends:     latex2html
Recommends:     lilypond
Recommends:     okular
Recommends:     psutils
Recommends:     texlive-dvips
Recommends:     texlive-dvipdfmx
Recommends:     texlive-metapost
Recommends:     texlive-pdfsync
Recommends:     texlive-tex4ht
Recommends:     zip
Suggests:       aspell
Suggests:       texlive-doc
Suggests:       texlive-latex-doc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
%kde4_runtime_requires

%description
Kile is a user-friendly TeX/LaTeX editor for the KDE desktop environment.

The main features are:

 * Compile, convert and view your document with one click.
 * Auto-completion of (La)TeX commands.
 * Templates and wizards make starting a new document very little work.
 * Easy insertion of many standard tags and symbols and the option to define
   (an arbitrary number of) user defined tags.
 * Inverse and forward search: click in the DVI viewer and jump to the
   corresponding LaTeX line in the editor, or jump from the editor to the
   corresponding page in the viewer.
 * Finding chapter or sections is very easy, Kile constructs a list of all the
   chapter etc. in your document. You can use the list to jump to the
   corresponding section.
 * Collect documents that belong together into a project.
 * Easy insertion of citations and references when using projects.
 * Flexible and smart build system to compile your LaTeX documents.
 * QuickPreview, preview a selected part of your document.
 * Easy access to various help sources.
 * Advanced editing commands.


%lang_package
%prep
%setup -q

%build
%cmake_kde4 -d build
%make_jobs

%install
pushd build
%kde4_makeinstall
# Fix permissions
chmod 755 %{buildroot}%{_kde4_appsdir}/kconf_update/kile*.pl
chmod 755 %{buildroot}%{_kde4_appsdir}/kile/test/runTests.sh
# Fix incorrect icon sizes
# Don't do this for mathmode.png and smallfrac.png as these turn into black icons bnc#676046
convert -scale 16x16! %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/beamerblock.png %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/beamerblock.png
convert -scale 16x16! %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/label.png %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/label.png
convert -scale 22x22! %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/22x22/actions/label.png %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/22x22/actions/label.png
rm -rf %{buildroot}%{_datadir}/doc/kile/
popd

%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Qt KDE Office WordProcessor
%endif

# Remove unneeded locale
rm -rf %{buildroot}%{_datadir}/locale/x-test

%find_lang %{name}

%fdupes -s %{buildroot}

%kde_post_install

%post
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING* ChangeLog README README.cwl kile-remote-control.txt kile.lsm
%{_kde4_bindir}/kile
%{_kde4_applicationsdir}/kile.desktop
%{_datadir}/dbus-1/interfaces/net.sourceforge.kile.main.xml
%doc %{_kde4_htmldir}/en/kile/
%{_kde4_iconsdir}/hicolor/*/*/kile*
%{_kde4_appsdir}/kconf_update/kile*
%{_kde4_appsdir}/kile/
%{_kde4_sharedir}/config.kcfg/kile.kcfg
%{_datadir}/mime/packages/kile.xml

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/en/kile/

%changelog
openSUSE Build Service is sponsored by