File gedit-latex-plugin.spec of Package gedit-latex-plugin
#
# spec file for package gedit-latex-plugin
#
# Copyright (c) 2011 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: gedit-latex-plugin
%define _name LaTeXPlugin
Version: 0.2
Release: 1
# Code itself is GPLv2+ as of 0.2, but upstream explicitly ships a GPLv3 COPYING file
License: GPLv3+
Summary: GEdit Plugin for Editing LaTeX Documents
Url: http://www.michaels-website.de/gedit-latex-plugin/
Group: Productivity/Text/Editors
Source0: %{_name}-%{version}.tar.bz2
Source99: %{name}-rpmlintrc
# For directory ownership
BuildRequires: gedit
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This plugin turns the gedit editor into a productive environment for
editing LaTeX documents and managing BibTeX bibliographies.
%package -n gedit-plugin-latex
License: GPLv3+
Group: Productivity/Text/Editors
Summary: GEdit Plugin for Editing LaTeX Documents
Requires: dbus-1-python
Requires: gedit
Requires: python-gtk
Requires: python-poppler
Requires: rubber
Recommends: python-enchant
Provides: %{name} = %{version}
%py_requires
%description -n gedit-plugin-latex
This plugin turns the gedit editor into a productive environment for
editing LaTeX documents and managing BibTeX bibliographies.
%prep
%setup -q -c
# gedit looks for plugins in libdir, not libexecdir
sed -i -e 's|_PATH_SYSTEM = "/usr/lib|_PATH_SYSTEM = "%{_libdir}|g' GeditLaTeXPlugin/src/base/resources.py
%build
%install
mkdir -p %{buildroot}%{_libdir}/gedit-2/plugins/
cp -a GeditLaTeXPlugin %{buildroot}%{_libdir}/gedit-2/plugins/
cp -a GeditLaTeXPlugin.gedit-plugin %{buildroot}%{_libdir}/gedit-2/plugins/
# Move icons to datadir
mkdir -p %{buildroot}%{_datadir}/gedit-2/plugins/GeditLaTeXPlugin
mv %{buildroot}%{_libdir}/gedit-2/plugins/GeditLaTeXPlugin/icons %{buildroot}%{_datadir}/gedit-2/plugins/GeditLaTeXPlugin/
# Remove files that we'll install as doc
rm %{buildroot}%{_libdir}/gedit-2/plugins/GeditLaTeXPlugin/{ChangeLog,COPYING,INSTALL}
%fdupes %{buildroot}%{_libdir}
%fdupes %{buildroot}%{_datadir}
%clean
rm -rf %{buildroot}
%files -n gedit-plugin-latex
%defattr(-,root,root)
%doc GeditLaTeXPlugin/ChangeLog GeditLaTeXPlugin/COPYING
%{_libdir}/gedit-2/plugins/GeditLaTeXPlugin/
%{_libdir}/gedit-2/plugins/GeditLaTeXPlugin.gedit-plugin
%{_datadir}/gedit-2/plugins/GeditLaTeXPlugin/
%changelog