Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > a58f7323360b7c8574f88780239a4f8c > files > 6

garmintools-0.10-6.mga5.src.rpm

%define major 4
%define libname %mklibname garmintools %{major}
%define develname %mklibname garmintools -d

%if %{mgaversion} < 3
%define _udevrulesdir %{_sysconfdir}/udev/rules.d
%endif

Summary:	Communication tools for Garmin devices
Name:		garmintools
Version:	0.10
Release:	%mkrel 6
License:        GPLv2+
Group:		File tools
URL:		http://code.google.com/p/garmintools/
Source0:	http://garmintools.googlecode.com/files/%{name}-%{version}.tar.gz
Source1:	51-garmin.rules
Source2:	garmintools.conf
Patch0:		garmintools-0.10-linkage_fix.diff
Patch1:		garmintools-0.10-mgabug14297.diff
BuildRequires:	pkgconfig(libusb)
BuildRequires:	libgarmin-devel
Requires:	udev

%description
This software provides Linux users with the ability to communicate with the
Garmin Forerunner 305 via the USB interface. All of the documented Garmin
protocols as of Rev C (May 19, 2006) for the USB physical link implemented.
This means that if you have a Garmin with a USB connection to a PC, you ought
to be able to use this software to communicate with it.

%package -n	%{libname}
Summary:	Shared library for garmintools
Group:		System/Libraries

%description -n	%{libname}
This software provides Linux users with the ability to communicate with the
Garmin Forerunner 305 via the USB interface. All of the documented Garmin
protocols as of Rev C (May 19, 2006) for the USB physical link implemented.
This means that if you have a Garmin with a USB connection to a PC, you ought
to be able to use this software to communicate with it.

%package -n	%{develname}
Summary:	Development and documentation files for %{name}
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	%{name}-devel = %{version}-%{release}

%description -n	%{develname}
Development libraries, header files and documentation for %{name}.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p1

%build
mkdir -p python
touch python/Makefile.in
autoreconf -fi

%configure2_5x \
    --enable-static=no

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

%install
%makeinstall_std INSTALL="install -p"

install -d %{buildroot}%{_udevrulesdir}
install -d %{buildroot}%{_sysconfdir}/modprobe.d
install -m0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/51-garmin.rules
install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/modprobe.d/garmintools.conf

find %{buildroot} -name '*.la' -delete

%post -n %{libname}
# remove garmin_gps module if loaded, see README
rmmod garmin_gps &>/dev/null || true

%files
%{_bindir}/*
%{_mandir}/man*/*.1*

%files -n %{libname}
%doc AUTHORS ChangeLog README
%{_libdir}/lib%{name}.so.%{major}*
%config(noreplace) %{_udevrulesdir}*
%config(noreplace) %{_sysconfdir}/modprobe.d/*

%files -n %{develname}
%{_includedir}/*.h
%{_libdir}/lib%{name}.so


%changelog
* Tue Mar 31 2015 oden <oden> 0.10-6.mga5
+ Revision: 819462
- P1: fix mga bug 14297

* Wed Oct 15 2014 umeabot <umeabot> 0.10-5.mga5
+ Revision: 738953
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.10-4.mga5
+ Revision: 679420
- Mageia 5 Mass Rebuild

* Sat Jul 05 2014 pterjan <pterjan> 0.10-3.mga5
+ Revision: 643594
- Replace libusb*-devel BuildRequires by better ones

* Fri Oct 18 2013 umeabot <umeabot> 0.10-2.mga4
+ Revision: 522321
- Mageia 4 Mass Rebuild

* Tue Feb 19 2013 oden <oden> 0.10-1.mga3
+ Revision: 399391
- imported package garmintools


* Tue Feb 19 2013 Oden Eriksson <oeriksson@mandriva.com> 0.10-1.mga2
- initial Mageia package