%define gtk3_version 3.4.0
%define clutter_version 1.0.0
%define exiv2_version 0.21
%define gstreamer1_version 1.0.0
%define libsoup_version 2.36
%define libsecret_version 0.11
%define brasero_version 3.2.0
%define librsvg2_version 2.34.0
%define libwebp_version 0.2.0
%define json_glib_version 0.15.0
%define webkit2_version 1.10.0

Summary: Image viewer, editor, organizer
Summary(ja): 画像閲覧、編集、管理ツール
Name: gthumb
Version: 3.4.3
Release: 1%{?_dist_release}
URL: http://gthumb.sourceforge.net/
Source0: http://ftp.gnome.org/pub/gnome/sources/%{name}/3.4/%{name}-%{version}.tar.xz
License: GPL
Group: Applications/Multimedia
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: libpng-devel
BuildRequires: zlib-devel
BuildRequires: gsettings-desktop-schemas-devel
BuildRequires: yelp-tools
BuildRequires: clutter-gtk-devel >= %{clutter_version}
BuildRequires: exiv2-devel >= %{exiv2_version}
BuildRequires: gstreamer1-devel >= %{gstreamer1_version}
BuildRequires: libsoup-devel >= %{libsoup_version}
BuildRequires: libsecret-devel >= %{libsecret_version}
BuildRequires: brasero-devel >= %{brasero_version}
BuildRequires: librsvg2-devel >= %{librsvg2_version}
BuildRequires: libwebp-devel >= %{libwebp_version}
BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: WebKit3-gtk-devel >= %{webkit2_version}
BuildRequires: libjpeg-turbo-devel
BuildRequires: libtiff-devel
BuildRequires: bison
BuildRequires: flex

Requires(postun,posttrans): desktop-file-utils, glib2

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
gthumb is an application for viewing, editing, and organizing 
collections of images.

%description -l ja
gthumb は画像ファイル集の閲覧、編集、管理をするためのアプリケーションです。

%package        devel
Summary:        Development tools for gthumb applications.
Summary(ja):    gthumb アプリケーションの開発用ファイル
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description devel
Header files and libraries for building a extension library for the gthumb.


%prep
%setup -q

%build
%configure \
	--disable-static 

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/%{name}.m4

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%postun
if [ $1 -eq 0 ]; then
  update-desktop-database -q > /dev/null ||:
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

%posttrans
update-desktop-database -q > /dev/null ||:
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/%{name}
%{_libdir}/%{name}/extensions/*
%{_datadir}/GConf/gsettings/%{name}.convert
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}-import.desktop
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/%{name}
%{_datadir}/help/*/%{name}
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/gthumb.1.gz

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


%changelog
* Thu Jun 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.3-1
- new upstream release.

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

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

* Wed Jul 16 2014 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 3.2.8-2
- rebuild with libpng-1.6.12

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

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

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 3.2.6-1
- new upstream release

* Wed Dec 11 2013 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 3.2.5-2
- rebuild with exiv2-0.24

* Sun Dec 01 2013 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 3.2.5-1
- new upstream release
- fix BuildRequires and Requires

* Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.14.4-2
- rebuild with exiv2-0.23

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.14.4-1
- new upstream release

* Sat Apr 14 2012 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.14.3-1
- new upstream release

* Wed Feb 01 2012 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.14.2-1
- new upstream release

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

* Thu Nov 03 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.14.0-1
- new upstream release

* Sat Oct 01 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.13.91-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.13.90-1
- new upstream release
- remove BuildRequires: brasero-devel

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.13.3-1
- new upstream release
- remove Patch0

* Sat Aug 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.13.2-2
- rebuilt with exiv2-0.21.1

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.13.2-1
- new upstream release
- add BuildRequires: gstreamer-plugins-base-devel, bison, flex, gnome-common
- add Patch0 (gthumb-2.13.2-configure.patch)

* Fri Apr 29 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.12.3-1
- new upstream release

* Wed Jan 26 2011 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.12.2-1
- new upstream release

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.12.1-1
- new upstream release
- fix typo

* Wed Oct 13 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.12.0-2
- add BR: gstreamer-devel

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.12.0-1
- new upstream release
- remove BuildRequires: libgnome-devel, libgnomeui-devel, libglade2-devel, libgnomeprint-devel, libgnomeprintui-devel
- add BuildRequires: unique-devel, exiv2-devel, libgnome-keyring-devel, brasero-devel, libsoup-devel
- change BuildRequires: libjpeg-turbo-devel instead of libjpeg-devel
- add devel sub package
- fix %files

* Tue May 11 2010 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.10.12-1
- new upstream release

* Sun Jan 17 2010 Yoji TOYODA <bsyamato@sea.plala.ro.jp> 2.10.11-1
- new upstream release

* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 2.10.8-1vl5
- applied new versioning policy, spec in utf-8

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.10.8-0vl1
- new upstream release

* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.10.5-0vl1
- new upstream release

* Sat Dec 23 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 2.6.9-0vl3
- fix dependencies:
  - add BuildRequires:
    - libgnome{,ui}-devel
    - libgnomecanvas-devel
    - gnome-vfs2-devel
    - libxml2-devel
    - libglade2-devel
    - libgnomeprint{,ui}-devel instead of libgnomeprint{,ui}
    - libbonobo{,ui}-devel
    - libpng-devel, libjpeg-devel, libtiff-devel, libexif-devel
  - drop BuildRequires: nautilus
  - drop Requires: scrollkeeper
  - add Requires(post): scrollkeeper, GConf2, desktop-file-utils
  - add Requires(pre): GConf2
  - add Requires(postun): scrollkeeper, desktop-file-utils
- fix scripts:
  - run scrollkeeper-update with '-q' at %%post,postun
  - run gconftool-2 --makefile-uninstall-rule at %%preun
  - run destop-database-update -q at %%post,postun

* Thu Aug 31 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.6.9-0vl2
- rebuilt without gphoto2-devel

* Thu Mar 09 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.9-0vl1
- new upstream release

* Thu Oct 06 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.8-0vl1
- new upstream release

* Mon Nov 22 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.1-0vl1
- new upstream release

* Sun Jul 11 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-0vl1
- new upstream release

* Thu Apr  1 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.1-0vl1
- new upstream release

* Fri Dec 26 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl1
- new upstream release

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

* Tue Jan 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.0-0vl1
- new upstream release
- build for Vine Linux
- add patch0 to use libgnomeprint-2.2

* Tue Jan  7 2003 Havoc Pennington <hp@redhat.com>
- 1.108
- disable schema install during makeinstall

* Thu Jan 02 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- require scrollkeeper

* Mon Dec 16 2002 Havoc Pennington <hp@redhat.com>
- rebuild

* Thu Dec 12 2002 Havoc Pennington <hp@redhat.com>
- Initial build.


