Summary:	gedit is a small but powerful text editor for GNOME.
Summary(ja):	GNOME 用の小さくかつ強力なテキストエディタ
Name:		gedit
Group:		accessories,desktop-gnome
Version:	40.1
Release:	2%{?_dist_release}
Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	daisuke, inagaki

License:	GPLv2
URL:		https://wiki.gnome.org/Apps/Gedit
%global		shortver %(echo %{version} | cut -d . -f 1)
%global		apiver %{shortver}.0
Source0:	https://download.gnome.org/sources/%{name}/%{shortver}/%{name}-%{version}.tar.xz
# https://github.com/GNOME/gedit/commit/6d32d0a0ec7755c59d2da5c581f1d0dc4774d7e5
Patch0:		6d32d0a0ec7755c59d2da5c581f1d0dc4774d7e5.patch
# https://gitlab.gnome.org/GNOME/gedit/-/commit/5e0909c19f267b4023131881fac89c58a2a17453
Patch1:		restore-overlay-scrollbars.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Requires: python3-pygobject

BuildRequires: meson
BuildRequires: symlinks
BuildRequires: gnome-common
BuildRequires: glib2-devel
BuildRequires: gtk3-devel
BuildRequires: gtksourceview4-devel
BuildRequires: tepl-devel
BuildRequires: libpeas-devel
BuildRequires: gspell-devel
BuildRequires: libX11-devel
BuildRequires: gobject-introspection-devel
BuildRequires: vala
BuildRequires: vala-devel
BuildRequires: python3-pygobject
BuildRequires: pygobject3-devel
BuildRequires: gsettings-desktop-schemas-devel
BuildRequires: desktop-file-utils
BuildRequires: yelp-tools
BuildRequires: gtk-doc
BuildRequires: itstool
Obsoletes: gedit-python3-plugins < 3.36.0
Provides: gedit-python3-plugins = %{version}-%{release}

%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 will need to have GNOME and GTK+ installed to use gedit.

%description -l ja
gedit は GNOME 用の小さく、それでいて、強力なテキストエディタです。

これは、コア部分は小さいままに、geditに対し多くの機能を拡張
できるようにするための(画面分割モード等の)プラグインの機能や、
『タブ』ノートブックを利用した複数のドキュメント編集、そして、
その他多くの機能を備えています。

gedit には GNOME と GTK+2 が必要です


%package devel
Summary: The files needed for developing plug-ins for the gedit editor.
Summary(ja): gedit エディタ用のプラグイン開発
Group: programming,desktop-gnome
Requires: %{name} = %{version}-%{release}
Requires: gtksourceview4-devel

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

%description -l ja devel
gedit は GNOME 用の小さく、それでいて、強力なテキストエディタです。
このパッケージを用いてgedit内で動くプラグインを開発することができます。

gedit のプラグインを開発する場合には gedit-devel をインストールしてください。


%debug_package


%prep
%setup -n gedit-%{version} -q
%patch0 -p1


%build
%meson
%meson_build


%install
rm -rf $RPM_BUILD_ROOT
%meson_install

for l in $(find %{buildroot}%{_datadir}/help -type l); do symlinks -cdov $l; done

%find_lang %{name} --with-gnome


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-, root, root)
%license COPYING
%doc NEWS README*
%{_bindir}/gedit
%{_libdir}/%{name}
%{python3_sitelib}/gi/overrides/Gedit.*
%{_datadir}/applications/org.gnome.gedit.desktop
%{_datadir}/metainfo/org.gnome.gedit.appdata.xml
%{_datadir}/dbus-1/services/org.gnome.gedit.service
%dir %{_datadir}/%{name}/plugins
%{_datadir}/%{name}/plugins/*
%{_datadir}/glib-2.0/schemas/*
%{_datadir}/icons/*/*/*/*
%{_mandir}/man1/*

%files devel
%defattr(-, root, root)
%{_includedir}/%{name}-%{apiver}
%{_libdir}/pkgconfig/*.pc
%{_datadir}/%{name}/gir-1.0/*.gir
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/*


%changelog
* Sat Nov 05 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 40.1-2
- rebuilt with python3-3.11.

* Sun Apr 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 40.1-1
- new upstream release.

* Mon Mar 29 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 40.0-1
- new upstream release.
- dropped scriptlets.

* Sun Aug 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.36.2-1
- new upstream release.
- unified gedit-python3-plugins into main package.

* Sun Jul 17 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.2-1
- new upstream release

* Sun Jan 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.3-1
- new upstream release

* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release

* Sun Aug 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.3-1
- new upstream release

* Sat May 23 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Sun Feb 08 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.3-1
- new upstream release

* Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-2
- rebuild with python-3.4.2

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.0-1
- new upstream release

* Sat Jun 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sat Mar 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.4-1
- new upstream release

* Tue Dec 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.3-1
- new upstream release

* Sat Nov 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release
- add BuildRequires: python3-pygobject-devel
- create python3-plugins subpackage

* Mon Jul 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.3-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release
- add BuildRequires: autoconf, gnome-common

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release

* Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Tue Jun 05 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release
- add BuildRequires: itstool, pygobject3-devel
- remove BuildRequires: GConf2-devel

* Sat Jan 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.6-1
- new upstream release

* Wed Dec 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.5-1
- new upstream release

* Sun Nov 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.3-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.6-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: gtksourceview3-devel instead of gtksourceview2-devel
- add BuildRequires: libpeas-devel, gsettings-desktop-schemas

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.4-1
- new upstream release

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.3-2
- rebuild with rpm-4.8.1 for pkg-config file

* Tue Jun 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.3-1
- new upstream release

* Sun May 30 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-1
- new upstream release

* Fri Apr 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release
- add BuildRequires: libSM-devel

* Fri Feb 05 2010 Shu KONNO <owa@bg.wakwak.com> 2.28.2-3
- rebuilt with python-2.6.4-3

* Tue Dec  1 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.2-2
- split devel package
- added Requires: gtksourceview2 to devel package (<BTS:831>)

* Sat Nov 21 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.2-1
- new upstream release

* Sun Nov  1 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.0-1
- new upstream release
- dropped Patch1 (merged into upstream)
- added --disable-updater

* Sun Aug 2 2009 Kazutaka HARADA <toshi.kd2@gmail.com> 2.26.3-1
- new upstream release
- added BuildRequires: libffi-devel

* Fri Jun 19 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.26.2-2
- add Patch1 to fix errors on external tools (<BTS:VineLinux:710>)
- add BuildRequires: libattr-devel

* Thu May 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.2-1
- new upstream release

* Tue May 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-2
- s/gEdit/gedit in Summary/Description

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-1
- new upstream release

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- new upstream release

* Sun Nov 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.24.1-1
- new upstream release

* Sat Oct 04 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-3
- add Requires: pygobject >= 2.15.4

* Sun Sep 28 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.24.0-2
- drop --vendor=gnome option when executing desktop-file-install

* Thu Sep 25 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release

* Sat Jul 19 2008 Shu KONNO <owa@bg.wakwak.com> 2.22.1-2vl5
- added lBuildRequires: perl-XML-Parser
- rebuilt with python-2.5.2

* Sun Apr 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.1-1vl5
- new upstream release
- added BuildRequires: pygtksourceview-devel

* Sat Aug 11 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.18.2-0vl2
- add BuildRequires: pygobject-devel, gnome-python-desktop
  because of adding --enable-python
  (TODO: moving to pygobjects and gnome-python-desktop to main or not?)

* Wed Aug  8 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.18.2-0vl1
- new upstream release
- added --enable-python option

* Sun May 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.18.1-0vl1
- new upstream release

* Sat Jun 03 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.3-0vl1
- new upstream release

* Thu May 11 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.2-0vl2
- temporarily disabled patch10 which has encoding detection bugs.

* Wed Apr 12 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.2-0vl1
- new upstream release

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl1
- new upstream release

* Tue Mar 07 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.93-0vl1
- new upstream release

* Wed Oct 05 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.1-0vl1
- new upstream release

* Mon Sep 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.0-0vl1
- new upstream release
- forwardport Patch10 from Vine Linux 3.2.

* Mon Apr 11 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.2-0vl1
- new upstream release

* Wed Mar 30 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.1-0vl1
- new upstream release

* Mon Mar 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.0-0vl1
- new upstream version

* Tue Mar 08 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.3-0vl2
- fixed to include message catalogs

* Sat Mar 05 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.3-0vl1
- new upstream release

* Tue Nov 09 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.1-0vl1
- new upstream release

* Sat Feb 14 2004 Tomoya TAKA <taka@vinelinux.org> 2.4.1-0vl2
- add Patch0, fix type mismatch in gedit_document_load()

* Fri Oct 17 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-0vl1
- new upstream release

* Tue Oct 07 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl2
- add missing files to %%files

* Thu Sep 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl1
- new upstream release

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.5-0vl2
- remove obsolete ja.po

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.5-0vl1
- new upstream release

* Mon Jun 16 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.2-0vl1
- new upstream release
- update ja.po

* Thu Apr 24 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.1-0vl1
- new upstream release
- update ja.po

* Tue Jan 28 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl1
- new upstream release

* Wed Jan 22 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.91-0vl1
- new upstream release

* Fri Jan 10 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.6-0vl2
- add updated ja.po

* Thu Jan  9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.6-0vl1
- new upstream release

* Thu Dec 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.5-0vl1
- new upstream release
- build for Vine Linux

* Thu Aug 15 2002 Owen Taylor <otaylor@redhat.com>
- Add missing bonobo server files (#71261, Taco Witte)
- Remove empty NEWS, FAQ files from %%doc (#66079)

* Thu Aug  1 2002 Havoc Pennington <hp@redhat.com>
- fix desktop file really

* Thu Aug  1 2002 Havoc Pennington <hp@redhat.com>
- fix desktop file

* Mon Jul 29 2002 Havoc Pennington <hp@redhat.com>
- 2.0.2
- build with new gail

* Tue Jul 23 2002 Havoc Pennington <hp@redhat.com>
- 2.0.1

* Tue Jun 25 2002 Owen Taylor <otaylor@redhat.com>
- 2.0.0, fix missing locale files

* Sun Jun 16 2002 Havoc Pennington <hp@redhat.com>
- 1.199.0
- use desktop-file-install
- remove static libs from plugins dir

* Sat Jun 08 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Wed Jun  5 2002 Havoc Pennington <hp@redhat.com>
- 1.121.1

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- 1.120.0

* Fri May  3 2002 Havoc Pennington <hp@redhat.com>
- 1.118.0

* Fri Apr 19 2002 Havoc Pennington <hp@redhat.com>
- move to gnome 2 version

* Thu Apr 18 2002 Havoc Pennington <hp@redhat.com>
- fix ko.po

* Thu Apr 18 2002 Havoc Pennington <hp@redhat.com>
- get correct po files from elvis 

* Thu Apr 18 2002 Havoc Pennington <hp@redhat.com>
- gedit-pofiles.tar.gz, not gedit-po.tar.gz

* Mon Apr 15 2002 Havoc Pennington <hp@redhat.com>
- merge translations

* Fri Mar 29 2002 Havoc Pennington <hp@redhat.com>
- gettextize default font

* Thu Mar 28 2002 Havoc Pennington <hp@redhat.com>
- more multibyte fixes #61948

* Wed Mar 27 2002 Havoc Pennington <hp@redhat.com>
- 0.9.7 for multibyte support

* Tue Mar 26 2002 Akira TAGOH <tagoh@redhat.com> 0.9.4-11
- gedit-0.9.4-printprefs.patch: I forgot to add to POTFILES.in...
- gedit-po.tar.gz: added. it's on CVS now.

* Sun Mar 24 2002 Akira TAGOH <tagoh@redhat.com> 0.9.4-10
- gedit-0.9.4-printprefs.patch: fix typo and sanity check.

* Mon Mar 04 2002 Akira TAGOH <tagoh@redhat.com> 0.9.4-9
- Applied a font selector patch for the printing
- fix BuildRequires for automake-1.4

* Mon Jan 28 2002 Havoc Pennington <hp@redhat.com>
- rebuild in rawhide
- fix up cflags for moved gnome headers

* Thu Jul 19 2001 Havoc Pennington <hp@redhat.com>
- add some more build requires

* Tue Jul 17 2001 Havoc Pennington <hp@redhat.com>
- require libglade-devel to build

* Fri Jun 15 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment

* Fri Feb 23 2001 Akira TAGOH <tagoh@redhat.com>
- Fixed preview for !ja locale.

* Wed Feb 07 2001 Akira TAGOH <tagoh@redhat.com>
- Fixed handling fontset. (Bug#24998)
- Added print out for multibyte patch.

* Fri Dec 29 2000 Matt Wilson <msw@redhat.com>
- 0.9.4

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Wed Aug 09 2000 Jonathan Blandford <jrb@redhat.com>
- include glade files so that it will actually work.

* Tue Aug 01 2000 Jonathan Blandford <jrb@redhat.com>
- upgrade package to newer version at request of author.

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jun 19 2000 Preston Brown <pbrown@redhat.com>
- FHS paths

* Sun Jun 11 2000 Jonathan Blandford <jrb@redhat.com>
- update to 0.7.9.  Somewhat untested.

* Fri Feb 11 2000 Jonathan Blandford <jrb@redhat.com>
- removed "reverse search function as it doesn't work.

* Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
- rebuild to gzip man pages

* Mon Jan 17 2000 Elliot Lee <sopwith@redhat.com>
- If I don't put in a log entry here, people will be very upset about not
  being able to find out that I am to blame for the 0.6.1 upgrade

* Mon Aug 16 1999 Michael Fulbright <drmike@redhat.com>
- version 0.5.4

* Sat Feb 06 1999 Michael Johnson <johnsonm@redhat.com>
- Cleaned up a bit for Red Hat use

* Thu Oct 22 1998 Alex Roberts <bse@dial.pipex.com>
- First try at an RPM
