gedit.spec
author dermotm
Mon, 18 Oct 2004 09:30:38 +0000
changeset 4276 2a2c7f354601
parent 4265 9c26d9ef4f72
child 4352 dc2689982835
permissions -rw-r--r--
Incremented release numbers for build 21

Name:         gedit
License:      GPL
Group:        System/GUI/GNOME
Version:      2.6.2
Release:      22 
Distribution: Cinnabar
Vendor:       Sun Microsystems, Inc.
Summary:      Text Editor for GNOME
Source:       http://ftp.gnome.org/pub/GNOME/sources/gedit/2.6/gedit-%{version}.tar.bz2
Source1:      gedit-l10n-po-1.6.tar.bz2
Source2:      gedit_docs-0.4.tar.bz2
Source3:      gedit.1.gz
Source4:      gnome-text-editor.1.gz
Source5:      gedit-l10n-online-help-ci.tar.bz2
Patch1:       gedit-01-g11n-potfiles.diff
Patch2:       gedit-02-g11n-schemas.diff
Patch3:       gedit-03-g11n-utf8-autodetect.diff
Patch4:       gedit-04-command-pipe.diff
Patch5:       gedit-05-g11n-i18n-ui.diff
Patch6:       gedit-06-help.diff
URL:          http://www.gnome.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_docdir}/doc
Autoreqprov:  on
Prereq:       scrollkeeper

%define eel_version 2.6.1
%define gtksourceview_version 1.0.0
%define libglade_version 2.3.6
%define libgnomeprintui_version 2.6.0
%define libgnomeui_version 2.6.0
%define scrollkeeper_version 0.3.14

BuildRequires: eel-devel >= %{eel_version}
BuildRequires: gtksourceview-devel >= %{gtksourceview_version}
BuildRequires: libglade-devel >= %{libglade_version}
BuildRequires: libgnomeprintui-devel >= %{libgnomeprintui_version}
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
BuildRequires: scrollkeeper >= %{scrollkeeper_version}
BuildRequires: javahelp-convert
Requires: eel >= %{eel_version}
Requires: gtksourceview >= %{gtksourceview_version}
Requires: libglade >= %{libglade_version}
Requires: libgnomeprintui >= %{libgnomeprintui_version}
Requires: libgnomeui >= %{libgnomeui_version}
Requires: scrollkeeper >= %{scrollkeeper_version}

%description
GEdit is a graphical text editor for GNOME

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

bzcat %SOURCE1 | tar xvf -
bzcat %SOURCE2 | tar xvf -
bzcat %SOURCE5 | tar xvf -

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

libtoolize --force
aclocal $ACLOCAL_FLAGS -I %{_datadir}/aclocal/gnome2-macros
automake -a -c -f
autoconf

CFLAGS="$RPM_OPT_FLAGS"				\
./configure --prefix=%{_prefix}			\
	    --sysconfdir=%{_sysconfdir}		\
	    --mandir=%{_mandir}
make -j $CPUS

%install
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1    
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL   
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE3 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/man1

javahelp-convert-install $RPM_BUILD_ROOT %{name} %{name}.xml

#remove unpackaged files
rm $RPM_BUILD_ROOT%{_libdir}/bonobo/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gedit-2/plugins/*.la

%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="gedit.schemas"
for S in $SCHEMAS; do
  gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S >/dev/null
done
for i in zh_CN zh_TW ko_KR ja_JP de_DE es_ES fr_FR it_IT sv_SE ; do
        langtag=$i
        [ ${i:0:2} == "zh" ] || langtag=${i:0:2}
        [ -e  %{_datadir}/omf/gedit/gedit-$langtag.omf ] && \
        env LANG=$i LC_ALL=$i scrollkeeper-install -q %{_datadir}/omf/gedit/gedit-$langtag.omf
done
scrollkeeper-update -q

%postun
for i in zh_CN zh_TW ko_KR ja_JP de_DE es_ES fr_FR it_IT sv_SE ; do
        langtag=$i
        [ ${i:0:2} == "zh" ] || langtag=${i:0:2}
        [ -e  %{_datadir}/omf/gedit/gedit-$langtag.omf ] && \
        env LANG=$i LC_ALL=$i scrollkeeper-uninstall -q %{_datadir}/omf/gedit/gedit-$langtag.omf
done
scrollkeeper-update -q

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_datadir}/applications/*.desktop
%{_datadir}/gnome/help/gedit
%{_datadir}/gnome/javahelp/gedit
%{_datadir}/omf/gedit
%{_datadir}/gedit-2
%{_libdir}/gedit-2/plugins/*.so*
%{_libdir}/gedit-2/plugins/*.gedit-plugin
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{_datadir}/pixmaps/*.png
%{_bindir}/*
%{_sysconfdir}/gconf/schemas/gedit.schemas
%{_mandir}/man1/*
%{_includedir}/gedit-2.6/gedit/*
%{_libdir}/bonobo/servers/*.server
%{_libdir}/pkgconfig/gedit-2.6.pc
%{_libdir}/bonobo/*.so
%{_datadir}/application-registry/*.applications
%{_datadir}/gnome-2.0/ui/*.xml
%{_datadir}/idl/*.idl
%{_datadir}/mime-info/*.keys

%changelog
* Fri Sep 24 2004 [email protected]
- Added patch gedit-06-help.diff to fix help issues.
  Fixes bugs #5094026,5094027,5094029,5101694.
 
* Wed Aug 25 2004 [email protected]
- Updated help tar name for Cinnabar

* Fri Aug 20 2004 [email protected]
- Integrated updated docs tarball from [email protected].

* Fri Aug 20 2004 [email protected]
- Removed  gedit-06-spellchecker-plugin.diff as it won't work on Solaris,
  and also because it has to do with a problem in aspell being built using
  a version of libtool older than 1.5.

* Fri Aug 20 2004 [email protected]
- Added gedit-06-spellchecker-plugin.diff to check the apsell library correctly
  so that spellchecker plugin is built. Fixed bug 5084894.

* Thu Aug 12 2004 [email protected]
- Added gedit-05-g11n-i18n-ui.diff to localize taglist. Fixed 5068944.

* Thu Aug 05 2004 [email protected]
- Incorporate new docs tarball from [email protected].

* Mon Jul 26 2004 - [email protected]
- added gedit-04-command-pipe.diff to fix bugtraq #5046785

* Fri Jul 23 2004 - [email protected]
- added gedit-03-g11n-utf8-autodect.diff to fix bugtraq
  5063167

* Tue Jul 20 2004 - [email protected]
- Bump to 2.6.2

* Thu Jul 08 2004 - [email protected]
- Updated l10n content to gedit-l10n-po-1.2.tar.bz2

* Thu Jul 08 2004 - [email protected]
- ported to rpm4/suse91

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Thu Jun 24 2004 - [email protected]
- Add gedit-03-g11n-i18n-ui.diff to localize open dialog. bugzilla #144525

* Wed Jun 02 2004 [email protected]
- Incorporate new docs tarball from [email protected].

* Wed May 12 2004 - [email protected]
- Updated l10n content to gedit-l10n-po-1.1.tar.bz2

* Sun Apr 18 2004 - [email protected]
- enable javahelp conversion on Solaris

* Thu Apr 01 2004 - [email protected]
- javahelp conversion

* Mon Mar 29 2004 - [email protected]
- Updated l10n content to gedit-l10n-po-1.0.tar.bz2

* Tue Mar 17 2004 - [email protected]
- Add bak schema patch, since we still need it.

* Tue Mar 17 2004 - [email protected]
- Bump to 2.5.92. Remove man page, schema includes, pixmap sources
  build fix and desktop g11n patch.

* Mon Mar 15 2004 - [email protected]
- Replaced gedit-04-default-schemas.diff with gedit-04-g11n-schemas.diff 
  to fix 4924569 and 4996253
- Added gedit-06-g11n-desktop.diff to fix 4969602
- Added gedit-07-g11n-potfiles.diff

* Wed Feb 18 2004 - <[email protected]>
- Bump to 2.5.3, add l10n online line
- Ported default schemas patch 04

* Fri Jan 09 2004 - <[email protected]>
- Patch to remove extra includes

* Wed Dec 17 2003 - <[email protected]>
- Bump to 2.5.0

* Fri Oct 31 2003 - <[email protected]>
- Remove the Sun Supported keyword patch since we're removing
  the Extras menu.

* Tue Oct 21 2003 - <[email protected]>
- Updated to GNOME 2.4.0 version, updated POTFILES.in patch,
  and add patch to use libgnomeprintui 2.3.0 instead of 2.3.1.

* Fri Sep 26 2003 - <[email protected]>
- integrate Sun docs

* Wed Jul 09 2003 - <[email protected]>
- add in sun po files

* Wed May 14 2003 - [email protected]
- Initial Sun Release