%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc %define glib2_version 2.2.1 %define pango_version 1.2.1 %define gtk2_version 2.2.1 %define libgnomeui_version 2.2.0.1 %define libgnomeprint_version 2.2.1.2 %define libgnomeprintui_version 2.2.1.2 %define gail_version 1.2.0 %define scrollkeeper_version 0.3.11 Summary: gEdit is a small but powerful text editor for GNOME. Name: gedit Version: 2.2.1 Release: 2 License: GPL Group: Applications/Editors Source0: ftp://ftp.gnome.org/pub/GNOME/pre-gnome2/sources/gedit/gedit-%{version}.tar.bz2 Patch0: gedit-2.2.1-aix.patch Patch1: gedit-2.2.1-autotools.patch URL: http://gedit.sourceforge.net/ BuildRoot: %{_tmppath}/gedit-%{version}-root PreReq: scrollkeeper >= %{scrollkeeper_version} PreReq: GConf2 BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: pango-devel >= %{pango_version} BuildRequires: gtk2-devel >= %{gtk2_version} BuildRequires: libgnomeui-devel >= %{libgnomeui_version} BuildRequires: libgnomeprintui-devel >= %{libgnomeprintui_version} BuildRequires: libgnomeprint-devel >= %{libgnomeprint_version} BuildRequires: gail-devel >= %{gail_version} %description gEdit is a small but powerful text editor designed specifically for the GNOME GUI desktop. gEdit includes a plug-in API (which supports extensibility while keeping the core binary small), support for editing multiple documents using notebook tabs, and standard text editor functions. You'll need to have GNOME and GTK+ installed to use gEdit. %package devel Summary: The files needed for developing plug-ins for the gEdit editor. Group: Development/Libraries %description devel gEdit is a small but powerful text editor for the GNOME GUI desktop. This package allows you to develop plug-ins that work within gEdit. Install gedit-devel if you want to write plug-ins for gEdit. %prep %setup -q if test x$PATCH = x ; then PATCH=patch ; fi $PATCH -p2 -s < %{_sourcedir}/gedit-2.2.1-aix.patch $PATCH -p2 -s < %{_sourcedir}/gedit-2.2.1-autotools.patch %build PATH=%{_bindir}:$PATH LDFLAGS="-L%{_libdir}" ./configure --prefix=%{_prefix} G_CHARSET_ALIAS=%{_libdir}/charset.alias make %install if test "%{buildroot}" != "/"; then rm -rf %{buildroot} fi mkdir -p %{buildroot} GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make DESTDIR=%{buildroot} install-strip # Make the links cd %{buildroot} for dir in bin do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done %post export PATH=%{_bindir}:$PATH export XML_CATALOG_FILES=%{_sysconfdir}/xml/docbook scrollkeeper-update -q > /dev/null export GCONF_CONFIG_SOURCE=`%{_bindir}/gconftool-2 --get-default-source` SCHEMAS="gedit.schemas" for S in $SCHEMAS; do %{_bindir}/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null done %postun export PATH=%{_bindir}:$PATH export XML_CATALOG_FILES=%{_sysconfdir}/xml/docbook scrollkeeper-update -q > /dev/null %files %defattr(-, root, system) %doc README COPYING ChangeLog TODO AUTHORS THANKS %{_bindir}/* # %{_libdir}/bonobo %{_libdir}/gedit-2 %{_sysconfdir}/gconf/schemas/* %{_datadir}/gedit-2 %{_datadir}/pixmaps %{_datadir}/gnome # %{_datadir}/idl %{_datadir}/omf %{_datadir}/applications %{_libdir}/locale/*/LC_MESSAGES/gedit-2.2.mo # No man # %{_mandir}/man1/* /usr/bin/*