Blob Blame History Raw
%define docdir_nv %{_docdir}/%{name}-%{version}

Name:           gpscorrelate
Version:        1.6.0
Release:        3%{?dist}
Summary:        A GPS photo correlation / geotagging tool

Group:          Applications/Productivity 
License:        GPLv2+
URL:            http://freefoote.dview.net/linux_gpscorr.html
Source0:        http://freefoote.dview.net/linux/gpscorrelate-%{version}.tar.gz
Source1:        gpscorrelate-gui.svg
Patch0:         gpscorrelate-1.6.0-icon.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  exiv2-devel libxml2-devel gtk2-devel
# For the .desktop file
BuildRequires:  desktop-file-utils
# For the manpage
BuildRequires:  libxslt docbook-style-xsl
# For: %{_datadir}/icons/hicolor/scalable/apps/gpscorrelate-gui.svg
Requires: hicolor-icon-theme


%description
Gpscorrelate adds coordinates to the exif data of jpeg pictures based on a gpx
track file. The correlation is done by comparing the timestamp of the images
with the timestamp of the gps coordinates.


%prep
%setup -q
%patch0 -p1 -b .icon
cp -p %SOURCE1 gpscorrelate-gui.svg


%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" OFLAGS="$RPM_OPT_FLAGS" docdir="%{docdir_nv}"


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} mandir=%{_mandir} docdir="%{docdir_nv}"
make install-desktop-file DESTDIR=$RPM_BUILD_ROOT datadir=%{_datadir} 


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


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


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


%files
%defattr(-,root,root,-)
%doc COPYING RELEASES doc/*.html doc/*.png
%{_bindir}/%{name}
%{_bindir}/%{name}-gui
%{_datadir}/applications/gpscorrelate.desktop
%{_datadir}/icons/hicolor/scalable/apps/gpscorrelate-gui.svg
%{_mandir}/man1/gpscorrelate.1*


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

* Sat Apr 18 2009 Till Maas <opensource@till.name> - 1.6.0-2
- Move icon installation into Makefile to get upstreamable patch

* Sun Apr 12 2009 Till Maas <opensource@till.name> - 1.6.0-1
- Update to new upstream release
- Add svg icon using public domain cliparts by najsbajs and Anonymous from
  Open Clip Art Library

* Sun Feb 15 2009 Till Maas <opensource@till.name> - 1.5.8-2
- add RELEASES to %%doc

* Sat Nov 01 2008 Till Maas <opensource@till.name> - 1.5.8-1
- Update to new upstream version
- Remove upstreamed patches

* Thu Oct 30 2008 Till Maas <opensource@till.name> - 1.5.7-2
- add extended manpage based on manpage from debian
- fix help text (--no-write is useful with --verbose, not --show)

* Thu Oct 30 2008 Till Maas <opensource@till.name> - 1.5.7-1
- Update to new version, remove upstreamed patch
- add patch to remove some compiler warnings
- add patch to include desktop file install in makefile

* Wed Aug 13 2008 Till Maas <opensource@till.name> - 1.5.6-2
- add missing desktop file

* Sat Aug 02 2008 Till Maas <opensource@till.name> - 1.5.6-1
- initial version for Fedora