3 %bcond_without dbus # build without dbus support
4 %bcond_without bluez # build without Bluetooth support
5 %bcond_without qt # Qt based libQgpsmm library
6 %bcond_with qt4 # Qt 4 instead of Qt 5
7 %bcond_without systemd # systemd instead of plain udev hotplug
9 Summary: Service daemon for mediating access to a GPS
10 Summary(pl.UTF-8): Oprogramowanie komunikujące się z GPS-em
16 Source0: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
17 # Source0-md5: b3bf88706794eb8e5f2c2543bf7ba87b
18 Patch0: %{name}-desktop.patch
19 Patch1: %{name}-destdir.patch
20 URL: http://www.catb.org/gpsd/
22 BuildRequires: dbus-devel
23 BuildRequires: dbus-glib-devel
25 %{?with_bluez:BuildRequires: bluez-libs-devel}
26 BuildRequires: docbook-dtd412-xml
27 BuildRequires: docbook-style-xsl
28 BuildRequires: libcap-devel
29 BuildRequires: libstdc++-devel
30 BuildRequires: libusb-devel >= 1.0.0
31 BuildRequires: libxslt-progs
32 BuildRequires: ncurses-devel
33 BuildRequires: pkgconfig
34 BuildRequires: python-devel >= 1:2.5
35 BuildRequires: rpm-pythonprov
36 BuildRequires: scons >= 2.0.1
37 BuildRequires: sed >= 4.0
41 BuildRequires: QtNetwork-devel >= 4.4
43 BuildRequires: Qt5Network-devel >= 5.0
46 Requires: %{name}-libs = %{version}-%{release}
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 # note: to avoid recompiling/relinking on scons install, whole environment
50 # needs to be the same in both build and install sections
54 CFLAGS="%{rpmcflags}" \\\
55 CXXFLAGS="%{rpmcxxflags}" \\\
56 CPPFLAGS="%{rpmcppflags}" \\\
57 LDFLAGS="%{rpmldflags}"
60 gpsd is a service daemon that mediates access to a GPS sensor
61 connected to the host computer by serial or USB interface, making its
62 data on the location/course/velocity of the sensor available to be
63 queried on TCP port 2947 of the host computer. With gpsd, multiple GPS
64 client applications (such as navigational and wardriving software) can
65 share access to a GPS without contention or loss of data. Also, gpsd
66 responds to queries with a format that is substantially easier to
67 parse than NMEA 0183. A client library is provided for applications.
69 After installing this RPM, gpsd will automatically connect to USB
70 GPSes when they are plugged in and requires no configuration. For
71 serial GPSes, you will need to start gpsd by hand. Once connected, the
72 daemon automatically discovers the correct baudrate, stop bits, and
73 protocol. The daemon will be quiescent when there are no clients
74 asking for location information, and copes gracefully when the GPS is
75 unplugged and replugged.
77 %description -l pl.UTF-8
78 gpsd to demon usługi pośredniczącej w dostępie do sensora GPS
79 połączonego z komputerem poprzez interfejs szeregowy lub USB,
80 udostępniający dane o położeniu, kierunku ruchu i prędkości z sensora
81 na porcie TCP 2947 komputera. Przy użyciu gpsd wiele aplikacji
82 klienckich GPS (takich jak oprogramowanie nawigacyjne) może
83 współdzielić dostęp do GPS-a bez utraty danych. Ponadto gpsd odpowiada
84 na zapytania w formacie znacznie łatwiejszym do przetworzenia niż NMEA
85 0183. Dostarczona jest biblioteka kliencka dla aplikacji.
87 Po zainstalowaniu tego pakietu gpsd będzie się automatycznie łączył z
88 GPS-ami USB po podłączeniu ich. Dla GPS-ów szeregowych trzeba
89 uruchomić gpsd ręcznie. Po poączeniu demon automatycznie wykrywa
90 właściwą prędkość, liczbę bitów stopu i protokół. Demon oczekuje
91 spokojnie kiedy nie ma klientów i radzi sobie dobrze z odłączaniem i
92 ponownym podłączaniem GPS-a.
95 Summary: UDEV support for GPS hotplugging
96 Summary(pl.UTF-8): Obsługa UDEV-a do podłączania urządzeń GPS
97 Group: Applications/System
98 Requires: %{name} = %{version}-%{release}
99 Requires: udev-core >= 1:127
101 %description -n udev-gpsd
102 UDEV support for GPS hotplugging.
104 %description -n udev-gpsd -l pl.UTF-8
105 Obsługa UDEV-a do podłączania urządzeń GPS.
108 Summary: GPSd client library
109 Summary(pl.UTF-8): Biblioteka kliencka GPSd
115 %description libs -l pl.UTF-8
116 Biblioteka kliencka GPSd.
119 Summary: Client libraries in C and Python for talking to a running gpsd or GPS
120 Summary(pl.UTF-8): Biblioteki klienckie dla C i Pythona do komunikacji z gpsd lub GPS-em
121 Group: Development/Libraries
122 Requires: %{name}-libs = %{version}-%{release}
123 Requires: libstdc++-devel
124 Obsoletes: gpsd-static
127 This package provides C header files for the gpsd shared libraries
128 that manage access to a GPS for applications; also Python modules. You
129 will need to have gpsd installed for it to work.
131 %description devel -l pl.UTF-8
132 Ten pakiet zawiera pliki nagłówkowe C dla bibliotek współdzielonych
133 gpsd zarządzających dostępem do GPS-a dla aplikacji, a także moduły
134 Pythona. Do działania bibliotek potrzebny jest gpsd.
137 Summary: GPS Qt4 integration library
138 Summary(pl.UTF-8): Biblioteka integrująca GPS z Qt4
140 Requires: %{name}-libs = %{version}-%{release}
141 Requires: QtNetwork >= 4.4
144 GPS Qt4 integration library.
146 %description qt-libs -l pl.UTF-8
147 Biblioteka integrująca GPS z Qt4.
150 Summary: Development files for GPS Qt4 integration library
151 Summary(pl.UTF-8): Pliki programistyczne biblioteki integrującej GPS z Qt4
152 Group: X11/Development/Libraries
153 Requires: %{name}-devel = %{version}-%{release}
154 Requires: %{name}-qt-libs = %{version}-%{release}
155 Requires: QtNetwork-devel >= 4.4
157 %description qt-devel
158 Development files for GPS Qt4 integration library.
160 %description qt-devel -l pl.UTF-8
161 Pliki programistyczne biblioteki integrującej GPS z Qt4.
163 %package -n python-gps
164 Summary: Python GPSd client library
165 Summary(pl.UTF-8): Biblioteka kliencka GPSd dla Pythona
166 Group: Libraries/Python
167 Requires: %{name}-libs = %{version}-%{release}
169 %description -n python-gps
170 GPSd client library for Python.
172 %description -n python-gps -l pl.UTF-8
173 Biblioteka kliencka GPSd dla Pythona.
176 Summary: Clients for gpsd
177 Summary(pl.UTF-8): Aplikacje klienckie dla gpsd
178 Group: Applications/System
179 Requires: %{name}-libs = %{version}-%{release}
182 cgps is a simple test client for gpsd. It displays current GPS
183 position/time/velocity information and (for GPSes that support the
184 feature) the locations of accessible satellites. cgps resembles xgps,
185 but without the pictorial satellite display. It can run on a serial
186 terminal or terminal emulator.
188 %description clients -l pl.UTF-8
189 cgps to prosty klient testowy dla gpsd. Wyświetla bieżące informacje
190 GPS o położeniu, czasie i prędkości oraz (w przypadku GPS-ów
191 obsługujących to) położenia dostępnych satelitów. Jest podobny do
192 xgps, ale nie ma rysunkowego przedstawiania satelitów. Może działać na
193 terminalu szeregowym lub emulatorze terminala.
196 Summary: Clients for gpsd with an X interface
197 Summary(pl.UTF-8): Aplikacje klienckie z interfejsem X
198 Group: Applications/System
199 Requires: %{name}-libs = %{version}-%{release}
200 Requires: python-gps = %{version}-%{release}
201 Requires: python-pygtk-gtk >= 2:2.0
203 %description clients-gui
204 xgps is a simple test client for gpsd with an X interface. It displays
205 current GPS position/time/velocity information and (for GPSes that
206 support the feature) the locations of accessible satellites.
208 xgpsspeed is a speedometer that uses position information from the
211 %description clients-gui -l pl.UTF-8
212 xgps to prosty klient testowy dla gpsd z interfejsem X. Wyświetla
213 bieżące informacje GPS o położeniu, czasie i prędkości oraz (w
214 przypadku GPS-ów obsługujących to) położenia dostępnych satelitów.
216 xgpsspeed to prędkościomierz używający informacji o położeniu z GPS-a.
223 %{__sed} -i -e 's,/usr/local/sbin,%{_sbindir},' systemd/*.service
229 %{!?with_bluez:bluez=False} \
231 %{?with_dbus:dbus_export=True} \
235 python_libdir=%{py_sitedir} \
236 %{!?with_qt:qt=False} \
237 %{?with_qt:%{!?with_qt4:qt_versioned=5}} \
240 systemd=%{?with_systemd:True}%{!?with_systemd:False} \
244 rm -rf $RPM_BUILD_ROOT
247 DESTDIR=$RPM_BUILD_ROOT \
248 %scons -j1 install %{?with_systemd:systemd_install} udev-install
250 # kill -L/usr/lib* from qt Libs
251 %{__sed} -i -e 's,-L/[^ ]* *,,' $RPM_BUILD_ROOT%{_pkgconfigdir}/Qgpsmm.pc
253 # invoke python directly
254 %{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' \
255 $RPM_BUILD_ROOT%{_bindir}/{gegps,gpscat,gpsfake,gpsprof,ubxtool,xgps,xgpsspeed,zerk}
257 # omitted from make install
258 install gpsinit $RPM_BUILD_ROOT%{_sbindir}
260 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/sysconfig}
261 #install packaging/rpm/gpsd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/gpsd
262 #cp -p packaging/rpm/gpsd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/gpsd
263 cp -p packaging/X11/{xgps,xgpsspeed}.desktop $RPM_BUILD_ROOT%{_desktopdir}
264 cp -p packaging/X11/gpsd-logo.png $RPM_BUILD_ROOT%{_pixmapsdir}
267 cat >$RPM_BUILD_ROOT/etc/sysconfig/gpsd <<'EOF'
268 # Options for gpsd, including serial devices
270 # Set to 'true' to add USB devices automatically via udev
275 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
276 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
280 rm -rf $RPM_BUILD_ROOT
282 %post libs -p /sbin/ldconfig
283 %postun libs -p /sbin/ldconfig
285 %post qt-libs -p /sbin/ldconfig
286 %postun qt-libs -p /sbin/ldconfig
289 %defattr(644,root,root,755)
290 %doc AUTHORS COPYING INSTALL NEWS README TODO
291 %attr(755,root,root) %{_bindir}/gpsmon
292 %attr(755,root,root) %{_bindir}/ntpshmmon
293 %attr(755,root,root) %{_bindir}/ppscheck
294 %attr(755,root,root) %{_sbindir}/gpsd
295 %attr(755,root,root) %{_sbindir}/gpsdctl
296 %attr(755,root,root) %{_sbindir}/gpsinit
297 %{_mandir}/man1/gpsmon.1*
298 %{_mandir}/man1/ntpshmmon.1*
299 %{_mandir}/man8/gpsd.8*
300 %{_mandir}/man8/gpsdctl.8*
301 %{_mandir}/man8/gpsinit.8*
302 %{_mandir}/man8/ppscheck.8*
305 %defattr(644,root,root,755)
307 %{systemdunitdir}/gpsd.service
308 %{systemdunitdir}/gpsd.socket
309 %{systemdunitdir}/gpsdctl@.service
310 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gpsd
312 %attr(755,root,root) /lib/udev/gpsd.hotplug
314 /lib/udev/rules.d/25-gpsd.rules
315 #%attr(754,root,root) /etc/rc.d/init.d/gpsd
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libgps.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libgps.so.25
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/gpsdecode
325 %attr(755,root,root) %{_libdir}/libgps.so
327 %{_includedir}/libgpsmm.h
328 %{_pkgconfigdir}/libgps.pc
329 %{_mandir}/man1/gpsdecode.1*
330 %{_mandir}/man3/libgps.3*
331 %{_mandir}/man3/libgpsmm.3*
332 %{_mandir}/man5/gpsd_json.5*
333 %{_mandir}/man5/srec.5*
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libQgpsmm.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libQgpsmm.so.25
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/libQgpsmm.so
343 %{_mandir}/man3/libQgpsmm.3*
344 %{_libdir}/libQgpsmm.prl
345 %{_pkgconfigdir}/Qgpsmm.pc
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_bindir}/gegps
350 %attr(755,root,root) %{_bindir}/gpscat
351 %attr(755,root,root) %{_bindir}/gpsfake
352 %attr(755,root,root) %{_bindir}/gpsprof
353 %attr(755,root,root) %{_bindir}/ubxtool
354 %attr(755,root,root) %{_bindir}/zerk
355 %dir %{py_sitedir}/gps
356 %attr(755,root,root) %{py_sitedir}/gps/*.so
357 %{py_sitedir}/gps/*.py[co]
358 %{py_sitedir}/gps-%{version}.egg-info
359 %{_mandir}/man1/gegps.1*
360 %{_mandir}/man1/gpscat.1*
361 %{_mandir}/man1/gpsfake.1*
362 %{_mandir}/man1/gpsprof.1*
363 %{_mandir}/man1/ubxtool.1*
364 %{_mandir}/man1/zerk.1*
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_bindir}/cgps
369 %attr(755,root,root) %{_bindir}/gps2udp
370 %attr(755,root,root) %{_bindir}/gpsctl
371 %attr(755,root,root) %{_bindir}/gpspipe
372 %attr(755,root,root) %{_bindir}/gpsrinex
373 %{?with_dbus:%attr(755,root,root) %{_bindir}/gpxlogger}
374 %{_mandir}/man1/cgps.1*
375 %{_mandir}/man1/gps.1*
376 %{_mandir}/man1/gps2udp.1*
377 %{_mandir}/man1/gpsctl.1*
378 %{_mandir}/man1/gpspipe.1*
379 %{_mandir}/man1/gpsrinex.1*
380 %{_mandir}/man1/gpxlogger.1*
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_bindir}/lcdgps
385 %attr(755,root,root) %{_bindir}/xgps
386 %attr(755,root,root) %{_bindir}/xgpsspeed
387 %{_mandir}/man1/lcdgps.1*
388 %{_mandir}/man1/xgps.1*
389 %{_mandir}/man1/xgpsspeed.1*
390 %{_desktopdir}/xgps.desktop
391 %{_desktopdir}/xgpsspeed.desktop
392 %{_pixmapsdir}/gpsd-logo.png