Summary:       A fast and lightweight IDE using GTK2
Summary(ja):       GTK2 を用いた高速・軽量な統合開発環境 (IDE)
Name:          geany
Version:       1.24.1
Release: 2%{?_dist_release}
License:       GPL2+
Group:         Applications/Development
Source:   http://download.geany.org/%{name}-%{version}.tar.bz2
URL:           http://www.geany.org/
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

BuildRequires: glib2-devel >= 2.20
BuildRequires: gtk2-devel >= 2.16
BuildRequires: pango-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext, intltool
BuildRequires: perl-XML-Parser

Requires: glib2, pango
Requires: gtk2 >= 2.8
Requires: vte

%description
Geany is a small and fast editor with basic features
of an integrated development environment.

Some basic features:
* Syntax highlighting
* Code folding
* Symbol name auto-completion
* Construct completion/snippets
* Auto-closing of XML and HTML tags
* Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list)
* Symbol lists
* Code navigation
* Build system to compile and execute your code
* Simple project management
* Plugin interface (see Plugins) 

%description -l ja
Geany は統合開発環境としての基本的機能を備えた、小さくて高速なエディタです。

基本的機能：
* シンタックスハイライト
* コードの折り畳み
* シンボル名の自動補完
* コンピレーション/スニペットの構築
* XML と HTML タグを自動で閉じる
* C、Java、PHP、HTML、Python、Perl、Pascal (full list) など多くのファイル形式をサポート
* シンボルリスト
* コードナビゲーション
* 自分のコードをコンパイル＆実行するためのビルドシステム
* シンプルなプロジェクト管理
* プラグインインターフェイス

%package devel
Summary:   Devel files for building Geany plugins
Summary(ja):   Geany プラグインをビルドするための開発ファイル
Group:     Development/Libraries
Requires:  geany = %{version}-%{release}

%description devel
This package contains the devel files and pkg-config file needed for building
Geany plugins. You do not need to install this package to use Geany.

%description devel -l ja
このパッケージには Geany プラグインをビルドするために必要な開発ファイル、
及び pkg-config ファイルが含まれています。
Geany を使うためにこのパッケージをインストールする必要はありません。

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
%__rm -Rf $RPM_BUILD_ROOT
%makeinstall
%__rm $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

desktop-file-install --delete-original --vendor="vine"        \
        --dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --mode 0644                                             \
        $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop

# Remove libtool library archive (*.la) files
rm -rf $RPM_BUILD_ROOT%{_libdir}/geany/*.la

%clean
%__rm -Rf $RPM_BUILD_ROOT

%post
update-desktop-database %{_datadir}/applications
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi

%postun
update-desktop-database %{_datadir}/applications
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor ||:
fi

%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO THANKS
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_libdir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
%{_datadir}/icons/hicolor/*
%{_datadir}/icons/Tango/*
%{_datadir}/doc/%{name}/
%{_mandir}/man1/geany.1.gz

%files devel
%defattr(-, root, root, -)
%{_includedir}/geany
%{_libdir}/pkgconfig/geany.pc

%changelog
* Sun Jul 10 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.24.1-2
- rebuild with gcc-5.4.0

* Sat May 17 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.24.1-1
- new upstream release

* Sun May 26 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.23.1-1
- new upstream release

* Sat Mar 23 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.23-1
- new upstream release

* Tue Jun 19 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.22-1
- new upstream release
- fixed BuildRequires: glib2-devel >= 2.20, gtk2-devel >= 2.16

* Sat Oct 29 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.21-1
- new upstream release
- changed URL

* Sun Jan 9 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.20-1
- new upstream version

* Thu Dec 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.19.2-1
- new upstream version

* Mon Sep 27 2010 Shu KONNO <owa@bg.wakwak.com> 0.19.1-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sat Aug 21 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.19.1-1
- new upstream version

* Sun Jun 13 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.19-1
- new upstream version

* Wed Feb 17 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.18.1-1
- new upstream version

* Fri Nov 27 2009 Shu KONNO <owa@bg.wakwak.com> 0.18-2
- rebuilt

* Wed Aug 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.18-1vl5
- new upstream version
- added update-desktop-database %{_datadir}/applications in %post, %postun
- run gtk-update-icon-cache in %post, %postun

* Sat Jun 20 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.17-4vl5
- updated description
- added desktop-file-install
- added BuildRequires: desktop-file-utils

* Sun May 10 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.17-3vl5
- fixed BuildRequires: perl-XML-Parser

* Sun May 10 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.17-2vl5
- fixed %BuildRoot
- changed Group to Applications/Development
  -devel Group to Development/Libraries
- added BuildRequires: gettext, intltool, perl(XML::Parser)
- added Requires: vte

* Sun May 3 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.17-1vl5
- new upstream version
- spec in UTF-8

* Mon Feb 16 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.16-1vl5
- new upstream version
- fixed Requires: gtk2 >= 2.8 (minimum required GTK version 2.8) 

* Wed Feb 11 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15-2vl5
- fixed License
- updated Source URL
- modified %build (use "%{?_smp_mflags}")
- splited -devel sub-package (for header files)
- removed *.la files

* Sat Feb 7 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15-1vl5
- initial build for VineSeed
