Name:          giggle
Version:       0.6.2
Release:       1%{?_dist_release}
Summary:       A Gtk frontend to git

Group:         Development/Tools
License:       GPLv2+
URL:           http://live.gnome.org/giggle

Source0:       http://ftp.gnome.org/pub/GNOME/sources/giggle/0.6/%{name}-%{version}.tar.xz

BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: gettext
BuildRequires: gtksourceview3-devel
BuildRequires: gtk3-devel
BuildRequires: git-core
BuildRequires: evolution-data-server-devel
BuildRequires: vte3-devel
BuildRequires: yelp-tools

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


%description
Giggle is a graphical frontend for the git directory tracker (think of gitk on
GTK+).

%package devel
Summary:	Headers for Giggle plugin development
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Headers for developing plugins for Giggle.

%prep
%setup -q

%build
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
	touch --no-create %{_datadir}/icons/hicolor
	gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
	update-desktop-database -q &> /dev/null || :
fi

%posttrans
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
update-desktop-database -q &> /dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README

%{_bindir}/giggle
%{_libdir}/*.so.*
%{_libdir}/giggle/plugins/%{version}/*.so*
%{_libdir}/giggle/plugins/%{version}/*.xml

%dir %{_datadir}/giggle
%dir %{_datadir}/giggle/glade

%{_datadir}/giggle/glade/main-window.ui
%{_datadir}/applications/giggle.desktop

%{_datadir}/icons/hicolor/16x16/apps/*.png
%{_datadir}/icons/hicolor/22x22/apps/*.png
%{_datadir}/icons/hicolor/24x24/apps/*.png
%{_datadir}/icons/hicolor/32x32/apps/*.png
%{_datadir}/icons/hicolor/48x48/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg

%{_datadir}/help

%files devel
%defattr(-,root,root,-)
%{_includedir}/giggle/
%{_libdir}/*.so

%changelog
* Thu Nov 01 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.2-1
- new upstream release

* Tue Oct 25 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.1-1
- new upstream release

* Sun Oct 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5-4
- rebuild with evolution-data-server-3.1.90

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5-3
- rebuild with evolution-data-server-3.1.4

* Sun Oct 17 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5-1
- initial build for Vine Linux


* Mon Jun 26 2010 Caolán McNamara <caolanm@redhat.com> 0.5-3
- bump for dependencies

* Fri Jun 11 2010 Mike McGrath <mmcgrath@redhat.com> 0.5-2
- Release bump for rebuild to fix broken libedataserver dep

* Wed May 05 2010 James Bowes <jbowes@redhat.com> 0.5-1
- Update to 0.5

* Fri Feb 12 2010 Tomas Bzatek <tbzatek@redhat.com> - 0.4.96-1
- Update to 0.4.96

* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.4.91-3
- Use bzipped upstream tarball.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.91-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Apr 10 2009 Lennart Poettering <lpoetter@redhat.com> - 0.4.91-1 
- Update to 0.4.91

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.90-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb 13 2009 Lennart Poettering <lpoetter@redhat.com> - 0.4.90-2
- Add missing dep

* Fri Feb 13 2009 Lennart Poettering <lpoetter@redhat.com> - 0.4.90-1
- Update to 0.4.90

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.4-2
- Autorebuild for GCC 4.3

* Wed Dec 12 2007 James Bowes <jbowes@redhat.com> - 0.4-1
- Update to 0.4

* Sun Oct 14 2007 James Bowes <jbowes@redhat.com> 0.3-5
- Update gtksourceview2 patch to build against current code.

* Thu Aug 23 2007 James Bowes <jbowes@redhat.com> - 0.3-4
- Add BR for gtksourceview2-devel

* Thu Aug 23 2007 James Bowes <jbowes@redhat.com> - 0.3-3
- Mark license as GPLv2+

* Fri Jul  6 2007 Jeremy Katz <katzj@redhat.com> - 0.3-2
- fix to build against gtksourceview2

* Wed May 09 2007 James Bowes <jbowes@redhat.com> - 0.3-1
- Update to 0.3

* Thu Mar 29 2007 James Bowes <jbowes@redhat.com> - 0.2-2
- Add buildrequires for git-core

* Thu Mar 29 2007 James Bowes <jbowes@redhat.com> - 0.2-1
- Update to 0.2

* Sat Mar 17 2007 James Bowes <jbowes@redhat.com> - 0.1-3
- Minor specfile fixes from the initial review.

* Fri Mar 09 2007 James Bowes <jbowes@redhat.com> - 0.1-2
- Use desktop-file-install for the desktop file.

* Wed Mar 07 2007 James Bowes <jbowes@redhat.com> - 0.1-1
- Initial packaging.
