%define _hotplugdir %{_prefix}/lib/hotplug %define major 19 %define gpsd_major 0 %define libname %mklibname %{name} %{major} %define libqtname %mklibname Qgpsmm %{major} %define develname %mklibname %{name} -d %define staticname %mklibname %{name} -s -d Name: gpsd Summary: GPS data translator and GUI Version: 2.95 %define subrel 1 Release: %mkrel 4 Source0: http://prdownload.berlios.de/%{name}/%{name}-%{version}.tar.gz #Patch1: gpsd-2.90-udev.patch Patch2: gpsd-2.95-fix-link.patch # (Fedora) make 'make' not ignore -w even when it's used Patch3: gpsd-2.95-silentmake.patch # (Fedora) add /usr/sbin/ to PATH in gpsd.hotplug.wrapper Patch4: gpsd-2.95-hotplugvars.patch # (Fedora) add patch to prevent a crash in gpscat when started without arguments; # and instead of crashing show the usage output Patch5: gpsd-2.95-gpscatnoarg.patch Patch6: gpsd-3.3-CVE-2013-2038.patch URL: http://gpsd.berlios.de License: BSD Group: Sciences/Geosciences Provides: gps3d Obsoletes: gps3d BuildRequires: ncurses-devel BuildRequires: udev-tools BuildRequires: lesstif-devel BuildRequires: xmlto BuildRequires: dbus-devel BuildRequires: dbus-glib-devel BuildRequires: python BuildRequires: python-devel BuildRequires: bluez-devel BuildRequires: qt4-devel Requires: %{name}-python = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %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. %package -n %{libname} Summary: Libraries for gpsd Group: System/Libraries Obsoletes: %{mklibname gpsd 15} > 2.34 %description -n %{libname} 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. %package -n %{libqtname} Summary: Qt bindings for gpsd Group: System/Libraries %description -n %{libqtname} This package contains Qt bindings for gpsd. %package -n %{develname} Summary: Client libraries in C and Python for talking to a running gpsd or GPS Group: Development/C Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Requires: %{libname} = %{version} Requires: %{libqtname} = %{version} Obsoletes: %{mklibname gpsd 15 -d} %description -n %{develname} This package provides C header files for the gpsd shared libraries that manage access to a GPS for applications; also Python modules. You will need to have gpsd installed for it to work. %package -n %{staticname} Summary: Static libraries for gpsd Group: Development/C Provides: %{name}-static-devel = %{version}-%{release} Provides: lib%{name}-static-devel = %{version}-%{release} Requires: %{develname} = %{version} Obsoletes: %{mklibname gpsd 15 -s -d} %description -n %{staticname} This package provides C header files for the gpsd shared libraries that manage access to a GPS for applications; also Python modules. You will need to have gpsd installed for it to work. %package clients Summary: Clients for gpsd with an X interface Group: Sciences/Geosciences %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. %package python Summary: Python bindings for gpsd Group: Development/Python Requires: %{libname} = %{version} Requires: python %description python This package contains the Python bindings for gpsd. It will be needed for any applications that interface with gpsd via python. %prep %setup -q #%patch1 -p1 -b .udev %patch2 -p0 -b .link %patch3 -p1 -b .silentmake %patch4 -p1 -b .hotplugvars %patch5 -p1 -b .gpscatnoargs %patch6 -p1 -b .CVE-2013-2038 %build %configure2_5x --enable-dbus --enable-bluetooth %make %install rm -rf %{buildroot} %makeinstall_std pythondir=%{py_platsitedir} # install udev rules install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/rules.d install -p -m 0644 gpsd.rules %{buildroot}%{_sysconfdir}/udev/rules.d/99-gpsd.rules install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/agents.d/usb install -m755 gpsd.hotplug %{buildroot}%{_sysconfdir}/udev/agents.d/usb/gpsd # make gps.py executable chmod a+x %{buildroot}%{py_platsitedir}/gps/gps.py # install init scripts install -d -m 0755 %{buildroot}%{_sysconfdir}/init.d install -p -m 0755 packaging/rpm/gpsd.init %{buildroot}%{_sysconfdir}/init.d/gpsd # install sysconfig file install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig install -p -m 0644 packaging/rpm/gpsd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/gpsd # install hotplug script install -d -m 0755 %{buildroot}/lib/udev install -p -m 0755 gpsd.hotplug gpsd.hotplug.wrapper %{buildroot}/lib/udev # install .desktop files install -d -m 0755 %{buildroot}%{_datadir}/applications/ install -m644 packaging/X11/xgps.desktop %{buildroot}%{_datadir}/applications/ install -m644 packaging/X11/xgpsspeed.desktop %{buildroot}%{_datadir}/applications/ # install logo for the .desktop file install -d -m 0755 %{buildroot}%{_datadir}/gpsd install -m644 packaging/X11/gpsd-logo.png %{buildroot}%{_datadir}/gpsd/gpsd-logo.png rm -rf %{buildroot}%{_libdir}/*.la %post %_post_service %{name} %preun %_preun_service %{name} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README %{_sbindir}/gpsd %{_bindir}/gpscat %{_bindir}/gpsctl %{_bindir}/gpsprof %{_bindir}/gpsmon %{_bindir}/gpsdecode /lib/udev/gpsd.hotplug /lib/udev/gpsd.hotplug.wrapper %{_mandir}/man8/gpsd.8* %{_mandir}/man1/gpsprof.1* %{_mandir}/man1/gps.1* %{_mandir}/man1/gpscat.1* %{_mandir}/man1/gpsctl.1* %{_mandir}/man1/gpsmon.1* %{_mandir}/man1/gpsdecode.1* %{_mandir}/man5/rtcm*.5* %{_mandir}/man5/srec.5* %{_sysconfdir}/init.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/udev/agents.d/usb/gpsd %{_sysconfdir}/udev/rules.d/99-gpsd.rules %files -n %{libname} %defattr(-,root,root) %{_libdir}/libgps.so.%{major}* %{_libdir}/libgpsd.so.%{gpsd_major}* %files -n %{libqtname} %defattr(-,root,root) %{_libdir}/libQgpsmm.so.%{major}* %files -n %{develname} %defattr(-,root,root,-) %doc TODO %{_includedir}/gps.h %{_includedir}/libgpsmm.h %{_includedir}/gpsd.h %{_libdir}/libgps.so %{_libdir}/libgpsd.so %{_libdir}/libQgpsmm.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man1/gpsfake.1* %{_mandir}/man3/libgps.3* %{_mandir}/man3/libgpsmm.3* %{_mandir}/man3/libgpsd.3* %{_bindir}/gpsfake %files -n %{staticname} %defattr(-,root,root) %{_libdir}/*.a %files clients %defattr(-,root,root,-) %{_bindir}/xgps %{_bindir}/cgps %{_bindir}/gpspipe %{_bindir}/xgpsspeed %{_bindir}/gpxlogger %{_bindir}/lcdgps %{_mandir}/man1/xgps.1* %{_mandir}/man1/cgps.1* %{_mandir}/man1/gpspipe.1* %{_mandir}/man1/lcdgps.1.* %{_mandir}/man1/xgpsspeed.1* %{_datadir}/applications/xgps.desktop %{_datadir}/applications/xgpsspeed.desktop %{_datadir}/gpsd/gpsd-logo.png %files python %defattr(-,root,root,-) %{py_platsitedir}/*