gpsd/gpsd.spec
2011-05-15 09:46:17 +00:00

303 lines
9.2 KiB
RPMSpec

#
# spec file for package gpsd
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gpsd
Summary: Service daemon for mediating access to a GPS
License: BSD3c(or similar)
Url: http://gpsd.berlios.de/
Group: Hardware/Other
Version: 2.96
Release: 3
%define libgps libgps20
Requires: udev
PreReq: coreutils %fillup_prereq
BuildRequires: gcc-c++ ncurses-devel python-devel udev update-desktop-files xmlto xorg-x11-devel xorg-x11-libXpm-devel
%if 0%{?suse_version} > 1020
BuildRequires: dbus-1-glib-devel
BuildRequires: fdupes
%endif
Source: %{name}-%{version}.tar.bz2
Source1: rules.gpsd
Source2: udev.gpsd
Source3: sysconfig.gpsd
Source4: gpsd.xpm
Source5: xgps.desktop
Source6: xgpsspeed.desktop
Patch0: gpsd-fix-shebang.patch
Patch1: gpsd-fix-pythondir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%description
gpsd is a service daemon that mediates access to a GPS sensor connected
to the host computer by serial or USB interface, making its data on the
location/course/velocity of the sensor available to be queried on TCP
port 2947 of the host computer. With gpsd, multiple GPS client
applications (such as navigational and wardriving software) can share
access to a GPS without contention or loss of data. Also, gpsd
responds to queries with a format that is substantially easier to parse
than NMEA 0183. A client library is provided for applications.
After installing this RPM, gpsd will automatically connect to USB GPSes
when they are plugged in and requires no configuration. For serial
GPSes, you will need to start gpsd by hand. Once connected, the daemon
automatically discovers the correct baudrate, stop bits, and protocol.
The daemon will be quiescent when there are no clients asking for
location information, and copes gracefully when the GPS is unplugged
and replugged.
Authors:
--------
Remco Treffkorn <remco@rvt.com>
Derrick J. Brashear <shadow@dementia.org>
Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
Amaury Jacquot <sxpert@esitcom.org>
Chris Kuethe <chris.kuethe@gmail.com>
Ville Nuorvala <vnuorval@tcs.hut.fi>
%package devel
License: BSD3c(or similar)
Summary: Client libraries in C and Python for talking to a running gpsd or GPS
Group: Development/Libraries/C and C++
Requires: %name = %version
Requires: python-gpsd = %version
Requires: pkgconfig, python-curses
%description devel
This package provides C header files for the gpsd shared libraries that
manage access to a GPS for applications and debugging tools. You will
need to have gpsd installed for it to work.
Authors:
--------
Remco Treffkorn <remco@rvt.com>
Derrick J. Brashear <shadow@dementia.org>
Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
Amaury Jacquot <sxpert@esitcom.org>
Chris Kuethe <chris.kuethe@gmail.com>
Ville Nuorvala <vnuorval@tcs.hut.fi>
%package -n libgps20
License: BSD3c(or similar)
Summary: Shared library for GPS applications
Group: Development/Libraries/Python
%description -n %libgps
This package provides the shared library for gpsd and other GPS aware
applications
Authors:
--------
Remco Treffkorn <remco@rvt.com>
Derrick J. Brashear <shadow@dementia.org>
Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
Amaury Jacquot <sxpert@esitcom.org>
Chris Kuethe <chris.kuethe@gmail.com>
Ville Nuorvala <vnuorval@tcs.hut.fi>
%package -n python-gpsd
License: BSD3c(or similar)
Summary: Client libraries in C and Python for talking to a running gpsd or GPS
Group: Development/Libraries/Python
Requires: %name = %version
%{py_requires}
%description -n python-gpsd
This package provides python modules and tools for the gpsd shared
You will need to have gpsd installed for it to work.
Authors:
--------
Remco Treffkorn <remco@rvt.com>
Derrick J. Brashear <shadow@dementia.org>
Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
Amaury Jacquot <sxpert@esitcom.org>
Chris Kuethe <chris.kuethe@gmail.com>
Ville Nuorvala <vnuorval@tcs.hut.fi>
%package clients
License: BSD3c(or similar)
Summary: Clients for gpsd with an X interface
Group: Hardware/Other
Requires: python-gtk
%description clients
xgps is a simple test client for gpsd with an X interface. It displays
current GPS position/time/velocity information and (for GPSes that
support the feature) the locations of accessible satellites.
xgpsspeed is a speedometer that uses position information from the GPS.
It accepts an -h option and optional argument as for gps, or a -v
option to dump the package version and exit. Additionally, it accepts
-rv (reverse video) and -nc (needle color) options.
cgps resembles xgps, but without the pictorial satellite display. It
can run on a serial terminal or terminal emulator.
Authors:
--------
Remco Treffkorn <remco@rvt.com>
Derrick J. Brashear <shadow@dementia.org>
Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
Amaury Jacquot <sxpert@esitcom.org>
Chris Kuethe <chris.kuethe@gmail.com>
Ville Nuorvala <vnuorval@tcs.hut.fi>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure --disable-static \
%if 0%{?suse_version} > 1020
--enable-dbus \
%endif
--enable-garmintxt
%__make %{?jobs:-j%jobs}
%install
%makeinstall
install -d -m 755 %{buildroot}/lib/udev
install -d -m 755 %{buildroot}/lib/udev/rules.d
install -d -m 755 %{buildroot}/var/adm/fillup-templates
install -d -m 755 %{buildroot}%{_datadir}/{applications,pixmaps}
install -m 644 %{SOURCE1} %{buildroot}/lib/udev/rules.d/51-gpsd.rules
install -m 755 %{SOURCE2} %{buildroot}/lib/udev/gpsd.sh
install -m 644 %{SOURCE3} %{buildroot}/var/adm/fillup-templates
rm -f %{buildroot}%{_libdir}/libgps.la %{buildroot}%{_libdir}/libgpsd.la
if [ -f %{buildroot}%{python_sitearch}/*.egg-info ] ; then
rm -f %{buildroot}%{python_sitearch}/*.egg-info
fi
chmod 755 %{buildroot}%{python_sitearch}/gps/gps.py
# install desktop entries
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/applications/
%suse_update_desktop_file xgpsspeed
%suse_update_desktop_file xgps
# save some space, create symlinks
%if 0%{?suse_version} > 1020
%fdupes -s %buildroot
%endif
%clean
rm -rf %{buildroot}
%post
%fillup_only -n gpsd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n %libgps -p /sbin/ldconfig
%postun -n %libgps -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README INSTALL COPYING gpsd.php
%{_mandir}/man?/gpsd.*
%{_mandir}/man?/gpsctl.*
/lib/udev/gpsd.sh
/lib/udev/rules.d/*
%{_sbindir}/gpsd
%{_bindir}/gpsctl
%{_libdir}/libgpsd.so.*
/var/adm/fillup-templates/sysconfig.gpsd
%files -n %libgps
%defattr(-,root,root)
%{_libdir}/libgps.so.*
%files devel
%defattr(-,root,root)
%doc README INSTALL COPYING TODO
%{_mandir}/man?/gpsfake.*
%{_mandir}/man?/gpscat.*
%{_mandir}/man?/libgps*.*
%{_mandir}/man?/srec.*
%{_mandir}/man?/gpsdecode.*
%{_mandir}/man?/gpsprof.*
%{_bindir}/gpsfake
%{_bindir}/gpscat
%{_bindir}/gpsdecode
%{_bindir}/gpsprof
%{_includedir}/gps.h
%{_includedir}/libgpsmm.h
%{_includedir}/gpsd.h
%{_libdir}/libgps.so
%{_libdir}/libgpsd.so
%{_libdir}/pkgconfig/libgps*.pc
%files -n python-gpsd
%defattr(-,root,root)
%{python_sitelib}/gps*.py*
%{python_sitearch}/gps/
%files clients
%defattr(-,root,root)
%{_mandir}/man?/gps.*
%{_mandir}/man?/cgps.*
%{_mandir}/man?/lcdgps.1.gz
%{_mandir}/man?/xgps.*
%{_mandir}/man?/xgpsspeed.*
%{_mandir}/man?/gpspipe.*
%{_mandir}/man?/gpsmon.*
%{_bindir}/xgps
%{_bindir}/xgpsspeed
%{_bindir}/cgps
%{_bindir}/lcdgps
%{_bindir}/gpsmon
%{_bindir}/gpspipe
%if 0%{?suse_version} > 1020
%{_bindir}/gpxlogger
%endif
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.xpm
%changelog