File kile.spec of Package kile

#
# spec file for package kile
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           kile
# use 2.1.0 for release version!
Version:        2.0.99beta5
Release:        6.<RELEASE2>
Summary:        A LaTeX Source Editor and TeX Shell

License:        GPLv2+ and GFDL
Url:            http://kile.sourceforge.net/
Group:          Productivity/Publishing/TeX/Frontends
Source0:        %{name}-2.1b5.tar.bz2
Source1:        %{name}-translations.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  ImageMagick
BuildRequires:  fdupes
BuildRequires:  libkde4-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       konsole
Requires:       okular
Requires:       texlive-context
Requires:       texlive-latex
Requires:       texlive-xetex
%kde4_runtime_requires
Recommends:     ImageMagick
Recommends:     dblatex
Recommends:     ghostscript-library
Recommends:     kbibtex
Recommends:     konqueror
Recommends:     latex2html
Recommends:     lilypond
Recommends:     psutils
Recommends:     texlive-metapost
Recommends:     texlive-tex4ht
Recommends:     zip
Recommends:     %{name}-lang = %{version}
Suggests:       aspell
Suggests:       texlive-doc
Suggests:       texlive-latex-doc
Provides:       kde4-kile = 2.0.85
Obsoletes:      kde4-kile < 2.0.85

%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.



Authors:
--------
    Pascal Brachet <pascal.brachet@free.fr>
    Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
    Michel Ludwig <michel.ludwig@kdemail.net>
    Thomas Braun <braun@physik.fu-berlin.de>


%lang_package
%prep
%setup -q -n %{name}-2.1b5 -a 1

%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
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 16x16! %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/mathmode.png %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/mathmode.png
convert -scale 16x16! %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/smallfrac.png %{buildroot}%{_kde4_appsdir}/kile/icons/hicolor/16x16/actions/smallfrac.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
%if 0%{?suse_version} <= 1130
rm -rf %{buildroot}%{_datadir}/locale/hne
%endif

%if 0%{?suse_version} < 1120
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/es/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/pt/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/fr/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/sv/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/uk/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/it/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/et/common
mkdir -p %{buildroot}%{_datadir}/doc/kde/HTML/pt_BR/common
%endif

%find_lang %{name}

%fdupes -s %{buildroot}

%kde_post_install

%clean
rm -rf %{buildroot}

%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
%{_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