1340b3b
Name:           garmintools
1340b3b
Version:        0.10
060f277
Release:        4%{?dist}
1340b3b
Summary:        Communication tools for Garmin devices
1340b3b
1340b3b
License:        GPLv2+
1340b3b
Group:          Applications/Productivity
1340b3b
URL:            http://code.google.com/p/garmintools/
1340b3b
Source:         http://garmintools.googlecode.com/files/%{name}-%{version}.tar.gz
1340b3b
Source1:        51-garmin.rules
060f277
Source2:        garmintools.conf
1340b3b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1340b3b
1340b3b
BuildRequires:  libusb-devel
060f277
BuildRequires:  libgarmin-static libgarmin-devel
1340b3b
1340b3b
Requires:       udev
1340b3b
1340b3b
1340b3b
%description
060f277
This software provides Linux users with the ability to communicate with
060f277
the Garmin Forerunner 305 via the USB interface. All of the documented
060f277
Garmin protocols as of Rev C (May 19, 2006) for the USB physical link
060f277
implemented.
1340b3b
This means that if you have a Garmin with a USB connection to a PC, you 
1340b3b
ought to be able to use this software to communicate with it.
1340b3b
1340b3b
1340b3b
%package devel
1340b3b
Summary:        Development and documentation files for %{name}
1340b3b
Group:          Development/Libraries
1340b3b
Requires:       %{name} = %{version}-%{release}
1340b3b
1340b3b
1340b3b
%description devel
1340b3b
Static libraries, header files and documentation for %{name}.
1340b3b
1340b3b
1340b3b
%prep
1340b3b
%setup -q
1340b3b
1340b3b
1340b3b
%build
1340b3b
%configure --enable-static=no
1340b3b
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
1340b3b
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
1340b3b
make %{?_smp_mflags}
1340b3b
1340b3b
1340b3b
%install
1340b3b
rm -rf %{buildroot}
1340b3b
make install DESTDIR=%{buildroot} INSTALL="install -p"
1340b3b
install -Dp -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/udev/rules.d/51-garmin.rules
060f277
install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/modprobe.d/garmintools.conf
1340b3b
find %{buildroot} -name '*.la' -exec rm -f {} ';'
1340b3b
1340b3b
1340b3b
%clean
1340b3b
rm -rf %{buildroot}
1340b3b
1340b3b
1340b3b
%post
1340b3b
/sbin/ldconfig
1340b3b
# remove garmin_gps module if loaded, see README
1340b3b
rmmod garmin_gps &>/dev/null || true
1340b3b
 
1340b3b
1340b3b
%postun -p /sbin/ldconfig
1340b3b
1340b3b
1340b3b
%files
1340b3b
%defattr(-,root,root,-)
1340b3b
%doc AUTHORS ChangeLog COPYING README TODO
1340b3b
%{_mandir}/man*/*.1*
1340b3b
%{_bindir}/garmin_*
1340b3b
%{_libdir}/lib*.so.*
1340b3b
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
1340b3b
%config(noreplace) %{_sysconfdir}/modprobe.d/*
1340b3b
1340b3b
1340b3b
%files devel
1340b3b
%defattr(-,root,root,-)
1340b3b
%doc NEWS
1340b3b
%{_includedir}/*.h
1340b3b
%{_libdir}/lib*.so
1340b3b
1340b3b
1340b3b
%changelog
060f277
* Sat Jul 17 2010 Fabian Affolter <fabian@bernewireless.net> - 0.10-4
060f277
- Rename garmintools to garmintools.conf to fix #615119
060f277
060f277
* Tue Dec  8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.10-3
060f277
- Explicitly BR libgarmin-static in accordance with the Packaging
060f277
  Guidelines (libgarmin-devel is still static-only).
060f277
1340b3b
* Tue Sep 22 2009 Fabian Affolter <fabian@bernewireless.net> - 0.10-2
1340b3b
- Fixed ldconfig stuff
1340b3b
- Fixed ownership of files
1340b3b
- Fixed rpath
1340b3b
1340b3b
* Sat May 02 2009 Fabian Affolter <fabian@bernewireless.net> - 0.10-1
1340b3b
- Updated to new upstream version 0.10
1340b3b
1340b3b
* Thu Sep 11 2008 Fabian Affolter <fabian@bernewireless.net> - 0.09-2
1340b3b
- Fix spec file acc. #461849 Comment #1
1340b3b
1340b3b
* Wed Sep 10 2008 Fabian Affolter <fabian@bernewireless.net> - 0.09-1
1340b3b
- Initial spec for Fedora