]> git.pld-linux.org Git - packages/gpsd.git/blob - gpsd.spec
- updated to 3.19
[packages/gpsd.git] / gpsd.spec
1 #
2 # Conditional build:
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
8 #
9 Summary:        Service daemon for mediating access to a GPS
10 Summary(pl.UTF-8):      Oprogramowanie komunikujące się z GPS-em
11 Name:           gpsd
12 Version:        3.19
13 Release:        1
14 License:        BSD
15 Group:          Daemons
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/
21 %if %{with dbus}
22 BuildRequires:  dbus-devel
23 BuildRequires:  dbus-glib-devel
24 %endif
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
38 BuildRequires:  xmlto
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
46 Requires:       %{name}-libs = %{version}-%{release}
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
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
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
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.
86
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.
93
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
107 %package libs
108 Summary:        GPSd client library
109 Summary(pl.UTF-8):      Biblioteka kliencka GPSd
110 Group:          Libraries
111
112 %description libs
113 GPSd client library.
114
115 %description libs -l pl.UTF-8
116 Biblioteka kliencka GPSd.
117
118 %package devel
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
125
126 %description devel
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
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.
135
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
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
175 %package clients
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
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
202
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.
207
208 xgpsspeed is a speedometer that uses position information from the
209 GPS.
210
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.
215
216 xgpsspeed to prędkościomierz używający informacji o położeniu z GPS-a.
217
218 %prep
219 %setup -q
220 %patch0 -p1
221 %patch1 -p1
222
223 %{__sed} -i -e 's,/usr/local/sbin,%{_sbindir},' systemd/*.service
224
225 %build
226 %scons_env \
227 %scons build \
228         libdir=%{_lib} \
229         %{!?with_bluez:bluez=False} \
230         chrpath=False \
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}} \
238         shared=True \
239         strip=False \
240         systemd=%{?with_systemd:True}%{!?with_systemd:False} \
241         usb=True
242
243 %install
244 rm -rf $RPM_BUILD_ROOT
245
246 %scons_env \
247 DESTDIR=$RPM_BUILD_ROOT \
248 %scons -j1 install %{?with_systemd:systemd_install} udev-install
249
250 # kill -L/usr/lib* from qt Libs
251 %{__sed} -i -e 's,-L/[^ ]* *,,' $RPM_BUILD_ROOT%{_pkgconfigdir}/Qgpsmm.pc
252
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}
256
257 # omitted from make install
258 install gpsinit $RPM_BUILD_ROOT%{_sbindir}
259
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}
265
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
275 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
276 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
277 %py_postclean
278
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %post   libs -p /sbin/ldconfig
283 %postun libs -p /sbin/ldconfig
284
285 %post   qt-libs -p /sbin/ldconfig
286 %postun qt-libs -p /sbin/ldconfig
287
288 %files
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*
303
304 %files -n udev-gpsd
305 %defattr(644,root,root,755)
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
312 %attr(755,root,root) /lib/udev/gpsd.hotplug
313 %endif
314 /lib/udev/rules.d/25-gpsd.rules
315 #%attr(754,root,root) /etc/rc.d/init.d/gpsd
316
317 %files libs
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libgps.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libgps.so.25
321
322 %files devel
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/gpsdecode
325 %attr(755,root,root) %{_libdir}/libgps.so
326 %{_includedir}/gps.h
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*
334
335 %files qt-libs
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libQgpsmm.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libQgpsmm.so.25
339
340 %files qt-devel
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
346
347 %files -n python-gps
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*
365
366 %files clients
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*
381
382 %files clients-gui
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
This page took 0.233229 seconds and 3 git commands to generate.