File gedit.spec of Package gedit

#
# spec file for package gedit
#
# 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
Version:        3.2.1
Release:        1
License:        GPLv2+
Summary:        Small and lightweight UTF-8 text editor
Url:            http://www.gnome.org
Group:          Productivity/Text/Editors
Source:         http://download.gnome.org/sources/gedit/3.2/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE gedit-desktop.patch -- adds more MIME types and change icon
Patch0:         gedit-desktop.patch
BuildRequires:  enchant-devel
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gtk-doc
BuildRequires:  intltool
BuildRequires:  iso-codes-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
BuildRequires:  pkgconfig(gtksourceview-3.0)
BuildRequires:  pkgconfig(libpeas-gtk-1.0)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(pygobject-3.0) >= 3.0.0
Requires:       python-gobject
Recommends:     %{name}-lang
Recommends:     iso-codes
Provides:       gedit2 = %{version}
Obsoletes:      gedit2 < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
Gedit is a small and lightweight UTF-8 text editor for the GNOME
environment.

%package devel
License:        GPLv2+
Summary:        Small and lightweight UTF-8 text editor
Group:          Productivity/Text/Editors
Requires:       %{name} = %{version}
Requires:       gtksourceview-devel
Provides:       gedit2-devel = %{version}
Obsoletes:      gedit2-devel < %{version}
Provides:       %{name}-doc = %{version}
Obsoletes:      %{name}-doc < %{version}

%description devel
Gedit is a small and lightweight UTF-8 text editor for the GNOME
environment.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p0

%build
%configure \
    --disable-scrollkeeper \
    --enable-python
make %{?jobs:-j%jobs} V=1

%install
%makeinstall
%suse_update_desktop_file -N gedit -G "Text Editor" gedit TextEditor
%find_lang %{name} %{?no_lang_C}
rm %{buildroot}%{_libdir}/*/*/*.*a
rm %{buildroot}%{_libdir}/*.la
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post
/sbin/ldconfig
%desktop_database_post
%glib2_gsettings_schema_post

%postun
/sbin/ldconfig
%desktop_database_postun
%glib2_gsettings_schema_postun

%files
%defattr(-, root, root)
%doc AUTHORS BUGS ChangeLog COPYING MAINTAINERS NEWS README
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%{_bindir}/gedit
%{_bindir}/gnome-text-editor
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.gnome.gedit.service
%{_datadir}/GConf/gsettings/gedit.convert
%{_datadir}/gedit/
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.externaltools.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.filebrowser.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.filebrowser.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.pythonconsole.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.time.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gedit.plugins.time.gschema.xml
%{_libdir}/gedit/
%if "%{_libdir}" != "%{_libexecdir}"
%{_libexecdir}/gedit/
%endif
%{_libdir}/libgedit-private.so.0*
%{py_sitedir}/gi/overrides/Gedit.py*
%doc %{_mandir}/man1/gedit*

%files lang -f %{name}.lang

%files devel
%defattr(-, root, root)
%doc %{_datadir}/gtk-doc/html/gedit/
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libgedit-private.so

%changelog
openSUSE Build Service is sponsored by