]>
Commit | Line | Data |
---|---|---|
4a2c2802 | 1 | # |
90c8b3d7 | 2 | # Conditional build: |
3c22fb66 | 3 | %bcond_without dbus # build without dbus support |
396eb448 | 4 | %bcond_without bluez # build without Bluetooth support |
45af9b8b JB |
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 | |
d96c1154 | 8 | # |
90c8b3d7 | 9 | Summary: Service daemon for mediating access to a GPS |
7704e599 | 10 | Summary(pl.UTF-8): Oprogramowanie komunikujące się z GPS-em |
90c8b3d7 | 11 | Name: gpsd |
45af9b8b JB |
12 | Version: 3.19 |
13 | Release: 1 | |
90c8b3d7 | 14 | License: BSD |
15 | Group: Daemons | |
4cf54e14 | 16 | Source0: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz |
45af9b8b JB |
17 | # Source0-md5: b3bf88706794eb8e5f2c2543bf7ba87b |
18 | Patch0: %{name}-desktop.patch | |
19 | Patch1: %{name}-destdir.patch | |
4cf54e14 | 20 | URL: http://www.catb.org/gpsd/ |
df34cb17 | 21 | %if %{with dbus} |
90c8b3d7 | 22 | BuildRequires: dbus-devel |
23 | BuildRequires: dbus-glib-devel | |
24 | %endif | |
396eb448 | 25 | %{?with_bluez:BuildRequires: bluez-libs-devel} |
76626dbc | 26 | BuildRequires: docbook-dtd412-xml |
9f13a9eb | 27 | BuildRequires: docbook-style-xsl |
4cf54e14 | 28 | BuildRequires: libcap-devel |
76626dbc | 29 | BuildRequires: libstdc++-devel |
396eb448 | 30 | BuildRequires: libusb-devel >= 1.0.0 |
76626dbc | 31 | BuildRequires: libxslt-progs |
4d5d1f20 | 32 | BuildRequires: ncurses-devel |
76626dbc | 33 | BuildRequires: pkgconfig |
4cf54e14 | 34 | BuildRequires: python-devel >= 1:2.5 |
4116cf5e | 35 | BuildRequires: rpm-pythonprov |
4cf54e14 ER |
36 | BuildRequires: scons >= 2.0.1 |
37 | BuildRequires: sed >= 4.0 | |
76626dbc | 38 | BuildRequires: xmlto |
45af9b8b JB |
39 | %if %{with qt} |
40 | %if %{with qt4} | |
41 | BuildRequires: QtNetwork-devel >= 4.4 | |
42 | %else | |
43 | BuildRequires: Qt5Network-devel >= 5.0 | |
44 | %endif | |
45 | %endif | |
4d5d1f20 | 46 | Requires: %{name}-libs = %{version}-%{release} |
90c8b3d7 | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
83e6c4a2 JR |
49 | # note: to avoid recompiling/relinking on scons install, whole environment |
50 | # needs to be the same in both build and install sections | |
51 | %define scons_env \ | |
52 | CC="%{__cc}" \\\ | |
53 | CXX="%{__cxx}" \\\ | |
54 | CFLAGS="%{rpmcflags}" \\\ | |
55 | CXXFLAGS="%{rpmcxxflags}" \\\ | |
56 | CPPFLAGS="%{rpmcppflags}" \\\ | |
57 | LDFLAGS="%{rpmldflags}" | |
58 | ||
90c8b3d7 | 59 | %description |
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. | |
68 | ||
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. | |
76 | ||
21673dc2 JR |
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 | |
4d5d1f20 JB |
85 | 0183. Dostarczona jest biblioteka kliencka dla aplikacji. |
86 | ||
21673dc2 JR |
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. | |
4d5d1f20 | 93 | |
fe2d2d8e JB |
94 | %package -n udev-gpsd |
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 | |
100 | ||
101 | %description -n udev-gpsd | |
102 | UDEV support for GPS hotplugging. | |
103 | ||
104 | %description -n udev-gpsd -l pl.UTF-8 | |
105 | Obsługa UDEV-a do podłączania urządzeń GPS. | |
106 | ||
4d5d1f20 | 107 | %package libs |
dc7c690b | 108 | Summary: GPSd client library |
109 | Summary(pl.UTF-8): Biblioteka kliencka GPSd | |
4d5d1f20 JB |
110 | Group: Libraries |
111 | ||
112 | %description libs | |
dc7c690b | 113 | GPSd client library. |
4d5d1f20 | 114 | |
21673dc2 | 115 | %description libs -l pl.UTF-8 |
dc7c690b | 116 | Biblioteka kliencka GPSd. |
4d5d1f20 JB |
117 | |
118 | %package devel | |
90c8b3d7 | 119 | Summary: Client libraries in C and Python for talking to a running gpsd or GPS |
7704e599 | 120 | Summary(pl.UTF-8): Biblioteki klienckie dla C i Pythona do komunikacji z gpsd lub GPS-em |
90c8b3d7 | 121 | Group: Development/Libraries |
4d5d1f20 | 122 | Requires: %{name}-libs = %{version}-%{release} |
396eb448 | 123 | Requires: libstdc++-devel |
52d28086 | 124 | Obsoletes: gpsd-static |
90c8b3d7 | 125 | |
4d5d1f20 | 126 | %description devel |
90c8b3d7 | 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. | |
130 | ||
21673dc2 JR |
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. | |
4d5d1f20 | 135 | |
396eb448 JB |
136 | %package qt-libs |
137 | Summary: GPS Qt4 integration library | |
138 | Summary(pl.UTF-8): Biblioteka integrująca GPS z Qt4 | |
139 | Group: X11/Libraries | |
140 | Requires: %{name}-libs = %{version}-%{release} | |
141 | Requires: QtNetwork >= 4.4 | |
142 | ||
143 | %description qt-libs | |
144 | GPS Qt4 integration library. | |
145 | ||
146 | %description qt-libs -l pl.UTF-8 | |
147 | Biblioteka integrująca GPS z Qt4. | |
148 | ||
149 | %package qt-devel | |
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 | |
156 | ||
157 | %description qt-devel | |
158 | Development files for GPS Qt4 integration library. | |
159 | ||
160 | %description qt-devel -l pl.UTF-8 | |
161 | Pliki programistyczne biblioteki integrującej GPS z Qt4. | |
162 | ||
4116cf5e JK |
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} | |
168 | ||
169 | %description -n python-gps | |
170 | GPSd client library for Python. | |
171 | ||
172 | %description -n python-gps -l pl.UTF-8 | |
173 | Biblioteka kliencka GPSd dla Pythona. | |
174 | ||
4d5d1f20 | 175 | %package clients |
2f6e6399 JB |
176 | Summary: Clients for gpsd |
177 | Summary(pl.UTF-8): Aplikacje klienckie dla gpsd | |
178 | Group: Applications/System | |
179 | Requires: %{name}-libs = %{version}-%{release} | |
180 | ||
181 | %description clients | |
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. | |
187 | ||
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. | |
194 | ||
195 | %package clients-gui | |
90c8b3d7 | 196 | Summary: Clients for gpsd with an X interface |
7704e599 | 197 | Summary(pl.UTF-8): Aplikacje klienckie z interfejsem X |
90c8b3d7 | 198 | Group: Applications/System |
4d5d1f20 | 199 | Requires: %{name}-libs = %{version}-%{release} |
396eb448 JB |
200 | Requires: python-gps = %{version}-%{release} |
201 | Requires: python-pygtk-gtk >= 2:2.0 | |
90c8b3d7 | 202 | |
2f6e6399 | 203 | %description clients-gui |
90c8b3d7 | 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. | |
207 | ||
208 | xgpsspeed is a speedometer that uses position information from the | |
2f6e6399 | 209 | GPS. |
90c8b3d7 | 210 | |
2f6e6399 | 211 | %description clients-gui -l pl.UTF-8 |
21673dc2 JR |
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. | |
4d5d1f20 | 215 | |
21673dc2 | 216 | xgpsspeed to prędkościomierz używający informacji o położeniu z GPS-a. |
4d5d1f20 | 217 | |
90c8b3d7 | 218 | %prep |
219 | %setup -q | |
d96c1154 | 220 | %patch0 -p1 |
52d28086 | 221 | %patch1 -p1 |
45af9b8b JB |
222 | |
223 | %{__sed} -i -e 's,/usr/local/sbin,%{_sbindir},' systemd/*.service | |
90c8b3d7 | 224 | |
225 | %build | |
83e6c4a2 | 226 | %scons_env \ |
45af9b8b | 227 | %scons build \ |
83e6c4a2 | 228 | libdir=%{_lib} \ |
45af9b8b | 229 | %{!?with_bluez:bluez=False} \ |
4cf54e14 | 230 | chrpath=False \ |
45af9b8b JB |
231 | %{?with_dbus:dbus_export=True} \ |
232 | leapfetch=False \ | |
233 | ncurses=True \ | |
234 | nostrip=True \ | |
235 | python_libdir=%{py_sitedir} \ | |
236 | %{!?with_qt:qt=False} \ | |
237 | %{?with_qt:%{!?with_qt4:qt_versioned=5}} \ | |
4cf54e14 ER |
238 | shared=True \ |
239 | strip=False \ | |
45af9b8b JB |
240 | systemd=%{?with_systemd:True}%{!?with_systemd:False} \ |
241 | usb=True | |
d96c1154 | 242 | |
90c8b3d7 | 243 | %install |
244 | rm -rf $RPM_BUILD_ROOT | |
d96c1154 JB |
245 | |
246 | %scons_env \ | |
247 | DESTDIR=$RPM_BUILD_ROOT \ | |
45af9b8b | 248 | %scons -j1 install %{?with_systemd:systemd_install} udev-install |
d96c1154 | 249 | |
45af9b8b JB |
250 | # kill -L/usr/lib* from qt Libs |
251 | %{__sed} -i -e 's,-L/[^ ]* *,,' $RPM_BUILD_ROOT%{_pkgconfigdir}/Qgpsmm.pc | |
d96c1154 JB |
252 | |
253 | # invoke python directly | |
254 | %{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' \ | |
45af9b8b | 255 | $RPM_BUILD_ROOT%{_bindir}/{gegps,gpscat,gpsfake,gpsprof,ubxtool,xgps,xgpsspeed,zerk} |
d96c1154 JB |
256 | |
257 | # omitted from make install | |
258 | install gpsinit $RPM_BUILD_ROOT%{_sbindir} | |
d96c1154 | 259 | |
45af9b8b | 260 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/sysconfig} |
52d28086 | 261 | #install packaging/rpm/gpsd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/gpsd |
45af9b8b | 262 | #cp -p packaging/rpm/gpsd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/gpsd |
4cf54e14 ER |
263 | cp -p packaging/X11/{xgps,xgpsspeed}.desktop $RPM_BUILD_ROOT%{_desktopdir} |
264 | cp -p packaging/X11/gpsd-logo.png $RPM_BUILD_ROOT%{_pixmapsdir} | |
fe2d2d8e | 265 | |
45af9b8b JB |
266 | %if %{with systemd} |
267 | cat >$RPM_BUILD_ROOT/etc/sysconfig/gpsd <<'EOF' | |
268 | # Options for gpsd, including serial devices | |
269 | OPTIONS="" | |
270 | # Set to 'true' to add USB devices automatically via udev | |
271 | USBAUTO="true" | |
272 | EOF | |
273 | %endif | |
274 | ||
378fdacb | 275 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
276 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
4116cf5e JK |
277 | %py_postclean |
278 | ||
90c8b3d7 | 279 | %clean |
280 | rm -rf $RPM_BUILD_ROOT | |
281 | ||
4d5d1f20 JB |
282 | %post libs -p /sbin/ldconfig |
283 | %postun libs -p /sbin/ldconfig | |
90c8b3d7 | 284 | |
396eb448 JB |
285 | %post qt-libs -p /sbin/ldconfig |
286 | %postun qt-libs -p /sbin/ldconfig | |
287 | ||
90c8b3d7 | 288 | %files |
289 | %defattr(644,root,root,755) | |
45af9b8b | 290 | %doc AUTHORS COPYING INSTALL NEWS README TODO |
810597c4 | 291 | %attr(755,root,root) %{_bindir}/gpsmon |
45af9b8b JB |
292 | %attr(755,root,root) %{_bindir}/ntpshmmon |
293 | %attr(755,root,root) %{_bindir}/ppscheck | |
52d28086 JB |
294 | %attr(755,root,root) %{_sbindir}/gpsd |
295 | %attr(755,root,root) %{_sbindir}/gpsdctl | |
d96c1154 | 296 | %attr(755,root,root) %{_sbindir}/gpsinit |
810597c4 | 297 | %{_mandir}/man1/gpsmon.1* |
45af9b8b | 298 | %{_mandir}/man1/ntpshmmon.1* |
52d28086 JB |
299 | %{_mandir}/man8/gpsd.8* |
300 | %{_mandir}/man8/gpsdctl.8* | |
d96c1154 | 301 | %{_mandir}/man8/gpsinit.8* |
45af9b8b | 302 | %{_mandir}/man8/ppscheck.8* |
fe2d2d8e JB |
303 | |
304 | %files -n udev-gpsd | |
305 | %defattr(644,root,root,755) | |
45af9b8b JB |
306 | %if %{with systemd} |
307 | %{systemdunitdir}/gpsd.service | |
308 | %{systemdunitdir}/gpsd.socket | |
309 | %{systemdunitdir}/gpsdctl@.service | |
310 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gpsd | |
311 | %else | |
52d28086 | 312 | %attr(755,root,root) /lib/udev/gpsd.hotplug |
45af9b8b | 313 | %endif |
4cf54e14 | 314 | /lib/udev/rules.d/25-gpsd.rules |
52d28086 | 315 | #%attr(754,root,root) /etc/rc.d/init.d/gpsd |
4a2c2802 | 316 | |
4d5d1f20 | 317 | %files libs |
90c8b3d7 | 318 | %defattr(644,root,root,755) |
4d5d1f20 | 319 | %attr(755,root,root) %{_libdir}/libgps.so.*.*.* |
45af9b8b | 320 | %attr(755,root,root) %ghost %{_libdir}/libgps.so.25 |
90c8b3d7 | 321 | |
4d5d1f20 | 322 | %files devel |
90c8b3d7 | 323 | %defattr(644,root,root,755) |
810597c4 | 324 | %attr(755,root,root) %{_bindir}/gpsdecode |
4d5d1f20 | 325 | %attr(755,root,root) %{_libdir}/libgps.so |
90c8b3d7 | 326 | %{_includedir}/gps.h |
2f6e6399 | 327 | %{_includedir}/libgpsmm.h |
2bfd87da | 328 | %{_pkgconfigdir}/libgps.pc |
810597c4 | 329 | %{_mandir}/man1/gpsdecode.1* |
90c8b3d7 | 330 | %{_mandir}/man3/libgps.3* |
2f6e6399 | 331 | %{_mandir}/man3/libgpsmm.3* |
52d28086 | 332 | %{_mandir}/man5/gpsd_json.5* |
90c8b3d7 | 333 | %{_mandir}/man5/srec.5* |
4d5d1f20 | 334 | |
396eb448 JB |
335 | %files qt-libs |
336 | %defattr(644,root,root,755) | |
337 | %attr(755,root,root) %{_libdir}/libQgpsmm.so.*.*.* | |
45af9b8b | 338 | %attr(755,root,root) %ghost %{_libdir}/libQgpsmm.so.25 |
396eb448 JB |
339 | |
340 | %files qt-devel | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_libdir}/libQgpsmm.so | |
52d28086 | 343 | %{_mandir}/man3/libQgpsmm.3* |
d96c1154 JB |
344 | %{_libdir}/libQgpsmm.prl |
345 | %{_pkgconfigdir}/Qgpsmm.pc | |
396eb448 | 346 | |
4116cf5e JK |
347 | %files -n python-gps |
348 | %defattr(644,root,root,755) | |
52d28086 | 349 | %attr(755,root,root) %{_bindir}/gegps |
2f6e6399 JB |
350 | %attr(755,root,root) %{_bindir}/gpscat |
351 | %attr(755,root,root) %{_bindir}/gpsfake | |
352 | %attr(755,root,root) %{_bindir}/gpsprof | |
45af9b8b JB |
353 | %attr(755,root,root) %{_bindir}/ubxtool |
354 | %attr(755,root,root) %{_bindir}/zerk | |
378fdacb | 355 | %dir %{py_sitedir}/gps |
356 | %attr(755,root,root) %{py_sitedir}/gps/*.so | |
357 | %{py_sitedir}/gps/*.py[co] | |
52d28086 JB |
358 | %{py_sitedir}/gps-%{version}.egg-info |
359 | %{_mandir}/man1/gegps.1* | |
2f6e6399 JB |
360 | %{_mandir}/man1/gpscat.1* |
361 | %{_mandir}/man1/gpsfake.1* | |
362 | %{_mandir}/man1/gpsprof.1* | |
45af9b8b JB |
363 | %{_mandir}/man1/ubxtool.1* |
364 | %{_mandir}/man1/zerk.1* | |
4116cf5e | 365 | |
4d5d1f20 JB |
366 | %files clients |
367 | %defattr(644,root,root,755) | |
45af9b8b | 368 | %attr(755,root,root) %{_bindir}/cgps |
b7bddaef | 369 | %attr(755,root,root) %{_bindir}/gps2udp |
dc7c690b | 370 | %attr(755,root,root) %{_bindir}/gpsctl |
4d5d1f20 | 371 | %attr(755,root,root) %{_bindir}/gpspipe |
45af9b8b | 372 | %attr(755,root,root) %{_bindir}/gpsrinex |
3c22fb66 | 373 | %{?with_dbus:%attr(755,root,root) %{_bindir}/gpxlogger} |
a7db052a | 374 | %{_mandir}/man1/cgps.1* |
a7db052a | 375 | %{_mandir}/man1/gps.1* |
45af9b8b JB |
376 | %{_mandir}/man1/gps2udp.1* |
377 | %{_mandir}/man1/gpsctl.1* | |
4d5d1f20 | 378 | %{_mandir}/man1/gpspipe.1* |
45af9b8b JB |
379 | %{_mandir}/man1/gpsrinex.1* |
380 | %{_mandir}/man1/gpxlogger.1* | |
2f6e6399 | 381 | |
2f6e6399 JB |
382 | %files clients-gui |
383 | %defattr(644,root,root,755) | |
810597c4 | 384 | %attr(755,root,root) %{_bindir}/lcdgps |
2f6e6399 JB |
385 | %attr(755,root,root) %{_bindir}/xgps |
386 | %attr(755,root,root) %{_bindir}/xgpsspeed | |
b88610fc | 387 | %{_mandir}/man1/lcdgps.1* |
2f6e6399 JB |
388 | %{_mandir}/man1/xgps.1* |
389 | %{_mandir}/man1/xgpsspeed.1* | |
fe2d2d8e JB |
390 | %{_desktopdir}/xgps.desktop |
391 | %{_desktopdir}/xgpsspeed.desktop | |
392 | %{_pixmapsdir}/gpsd-logo.png |