Summary: A GPS based navigation tool 
Summary(ja): GPS ナビゲーションツール
Name: gpsdrive
Version: 2.11
Release: 1%{?_dist_release}
License: GPLv2+
Group: Applications/Productivity
URL: http://www.gpsdrive.de/index.shtml

Source0: http://www.gpsdrive.de/packages/%{name}-%{version}.tar.gz
Source1: http://downloads.sourceforge.net/sourceforge/gpsdrive/openstreetmap-map-icons-minimal.tar.gz

Patch1: gpsdrive-2.10pre7-fedora.patch
Patch2: gpsdrive-2.10pre7-usepc.patch
Patch3: gpsdrive-2.10-newgps.patch
Patch4: gpsdrive-2.10-fix-dso-linking.patch
Patch5: gpsdrive-2.11-add-gdk-pixbuf2.patch
Patch6: gpsdrive-2.11-set-boostfilesystemversion.patch
Patch7: gpsdrive-2.11-remove-Switch.patch
Patch8: gpsdrive-2.11-gpsd-2.96.patch
Patch9: gpsdrive-2.11-fix-lm-dso.patch
Patch10: gpsdrive-speechd.patch
Patch11: gpsdrive-2.11-freetype-cmake.patch

BuildRequires: gtk2-devel >= 2.0.6
BuildRequires: gettext intltool
BuildRequires: desktop-file-utils
BuildRequires: pcre-devel
BuildRequires: autoconf m4
BuildRequires: cmake
BuildRequires: libxml2-devel
BuildRequires: libboost-devel
BuildRequires: sqlite3-devel
BuildRequires: libicu-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: perl
BuildRequires: curl-devel
BuildRequires: gpsd-devel
BuildRequires: speech-dispatcher-devel
BuildRequires: libpq-devel

Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: gpsd

Provides: perl(Geo::OSM::EntitiesV3) = %{version}
Provides: perl(Geo::OSM::OsmReaderV5) = %{version}
Provides: perl(Geo::OSM::EntitiesV5) = %{version}
Provides: perl(Geo::OSM::OsmReaderV3) = %{version}

%description
Gpsdrive is a map-based navigation system. 
It displays your position on a zoomable map 
provided from a NMEA-capable GPS receiver. The maps are autoselected 
for the best resolution, depending of your position, and the displayed 
image can be zoomed. Maps can be downloaded from the Internet with one 
mouse click. The program provides information about speed, direction, 
bearing, arrival time, actual position, and target position. 
Speech output is also available. MySQL is supported.

%prep
%setup -q
%setup -q -a 1 -T -D

%patch1 -p1
%patch2 -p1 -b .usepc
%patch3 -p1 -b .newgps
%patch4 -p1 -b .fix-dso-linking
%patch5 -p1 -b .gdk-pixbuf2
%patch6 -p1 -b .boostfilesystemver
%patch7 -p1 -b .removeswitch
%patch8 -p1 -b .gpsd296
%patch9 -p1 -b .lm-dso
%patch10 -p1 -b .gpsdrive
%patch11 -p1 -b .freetype-cmake

%build
mkdir build
export Boost_LIBRARYDIR=%{_libdir}
cd build
%cmake -DWITH_MAPNIK=OFF \
        ..
make VERBOSE=1 %{?_smp_mflags}

%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT

cd ..
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/map-icons/
cp -a usr/share/icons/map-icons/* $RPM_BUILD_ROOT/usr/share/icons/map-icons/

desktop-file-validate                            \
        ${RPM_BUILD_ROOT}%{_datadir}/applications/gpsdrive.desktop

%find_lang %{name}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%doc ABOUT-NLS AUTHORS ChangeLog COPYING README Documentation/*
%{_bindir}/friendsd
%{_bindir}/gdal_slice.sh
%{_bindir}/geocache2way.pl
%{_bindir}/gpsd-connect-bluetooth.sh
%{_bindir}/gpsreplay.pl
%{_bindir}/geoinfo.pl
%{_bindir}/gpsd_nmea.sh
%{_bindir}/gpsdrive
%{_bindir}/gpsdrive-update-mapnik-poitypes.pl
%{_bindir}/gpsdrive_mapnik_gentiles.*
%{_bindir}/gpsfetchmap.pl
%{_bindir}/gpspoint2gpsdrive.pl
%{_bindir}/nasaconv.sh
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}
%{_datadir}/icons/map-icons
%{_datadir}/icons/%{name}.png
%{_mandir}/*/man1/*
%{_mandir}/man1/*
%{perl_vendorlib}/*

%changelog
* Sun Dec 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.11-1
- initial build for Vine Linux based on fedora


* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 2.11-25
- Perl 5.20 rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Thu Jun 12 2014 Nils Philippsen <nils@redhat.com> - 2.11-23
- use system copy of FindFreetype.cmake (#1106719, patch by Hamish Bowman)

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 2.11-22
- Rebuild for boost 1.55.0

* Thu Jan 16 2014 Adam Williamson <awilliam@redhat.com> - 2.11-21
- rebuild for new libgps

* Mon Aug 19 2013 Peter Robinson <pbrobinson@fedoraproject.org> 2.11-20
- Fix FTBFS (speechd)
- Cleanup spec and fix dates

* Fri Aug 16 2013 Nils Philippsen <nils@redhat.com> - 2.11-19
- don't require unused (compat-)libgda-devel for building (#991891)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 2.11-17
- Rebuild for boost 1.54.0

* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 2.11-16
- Perl 5.18 rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Nov 19 2012 Nils Philippsen <nils@redhat.com> - 2.11-14
- update sourceforge download URL

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 08 2012 Petr Pisar <ppisar@redhat.com> - 2.11-12
- Perl 5.16 rebuild

* Tue Feb 21 2012 Hicham HAOUARI <hicham.haouari@gmail.com> - 2.11-11
- Disable mapnik library support since its API changed
- Add patch from debian 107-fix-disable-mapnik.patch
  to workaround a known bug when disabling mapnik
- Remove %%clean section

* Tue Aug 23 2011 Tom Callaway <spot@fedoraproject.org> - 2.11-10
- fix build against gpsd 2.96+

* Sun Jul 31 2011 Kevin Fenzi <kevin@scrye.com> - 2.11-9
- Add patch to remove bogus dep on perl(Switch). 

* Fri Jul 29 2011 Kevin Fenzi <kevin@scrye.com> - 2.11-8
- Rebuild again for new boost

* Thu Jul 21 2011 Kevin Fenzi <kevin@scrye.com> - 2.11-7
- Rebuild for new boost. 

* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2.11-6
- Perl mass rebuild

* Fri Jun 10 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2.11-5
- Perl 5.14 mass rebuild

* Sun Apr 17 2011 Kalev Lember <kalev@smartlink.ee> - 2.11-4
- Rebuilt for boost 1.46.1 soname bump

* Thu Feb 17 2011 Hicham HAOUARI <hicham.haouari@gmail.com> - 2.11-3
- Set BOOST_FILESYSTEM_VERSION to 2 (gpsdrive-2.11-set-boostfilesystemversion.patch)

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 28 2010 Hicham HAOUARI <hicham.haouari@gmail.com> - 2.11-1
- Update to 2.11
- Add patch to add gdk-pixbuf2 to include path (gpsdrive-2.11-add-gdk-pixbuf2.patch)

* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 2.10-0.9.20100508svn
- Mass rebuild with perl-5.12.0

* Mon May 10 2010 Hicham HAOUARI <hicham.haouari@gmail.com> - 2.10-0.8.20100508svn
- Fix dso linking issue

* Sat May 08 2010 Kevin Fenzi <kevin@tummy.com> - 2.1.0-0.6.20100508svn
- Update to svn version. 

* Fri Jan 22 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 2.1.0-0.5.pre7
- Rebuild for Boost soname bump

* Sat Sep 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.1.0-0.4.pre7
- use caolanm's fix (now that mapnik is properly fixed), use pkgconfig to figure out mapnik cflags/libs

* Sat Sep 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.1.0-0.3.pre7
- mapnik needs libagg to work

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

* Tue Jun 16 2009 Kevin Fenzi <kevin@tummy.com> - 2.10-0.1.pre7
- update to 2.10pre7

* Sun Jun 07 2009 Kevin Fenzi <kevin@tummy.com> - 2.10-0.1.20090607svn
- update to 2.10-20090607svn

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

* Mon Feb 02 2009 Kevin Fenzi <kevin@tummy.com> - 2.09-7
- fix for CVE-2008-4959 - bug 470241
- fix for CVE-2008-5380 - bug 475478
- fix for CVE-2008-5703 - bug 481702

* Tue Apr 08 2008 Kevin Fenzi <kevin@tummy.com> - 2.09-6
- Add patch for gpsd arguments - bug 438615
- Add patch for mysql - bug 441179

* Sun Feb 10 2008 Kevin Fenzi <kevin@tummy.com> - 2.09-5
- Rebuild for gcc43

* Tue Aug 21 2007 Kevin Fenzi <kevin@tummy.com> - 2.09-4
- Update License tag. 

* Mon May 21 2007 Kevin Fenzi <kevin@tummy.com> - 2.09-3
- Do not ship useless INSTALL file. 
- Fix incorrect greek translation. 

* Tue May 15 2007 Kevin Fenzi <kevin@tummy.com> - 2.09-2
- Update for current guidelines

* Tue Apr 12 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 2.09-1.iva.1
- Added gtk2-devel to BR

* Sat Jan  8 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0:2.09-1.iva.0
- Retooled spec file for standards
