]> git.pld-linux.org Git - packages/gpsd.git/blob - gpsd.spec
e35e9a1eddf4bc4455b5a4e1d77057221c2efc0c
[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 #
6 Summary:        Service daemon for mediating access to a GPS
7 Summary(pl.UTF-8):      Oprogramowanie komunikujące się z GPS-em
8 Name:           gpsd
9 Version:        3.10
10 Release:        5
11 License:        BSD
12 Group:          Daemons
13 Source0:        http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
14 # Source0-md5:  fc5b03aae38b9b5b6880b31924d0ace3
15 Patch0:         %{name}-link.patch
16 Patch1:         %{name}-qt.patch
17 Patch2:         %{name}-desktop.patch
18 Patch3:         %{name}-destdir.patch
19 Patch4:         python-install.patch
20 URL:            http://www.catb.org/gpsd/
21 BuildRequires:  QtNetwork-devel >= 4.4
22 %if %{with dbus}
23 BuildRequires:  dbus-devel
24 BuildRequires:  dbus-glib-devel
25 %endif
26 %{?with_bluez:BuildRequires:    bluez-libs-devel}
27 BuildRequires:  docbook-dtd412-xml
28 BuildRequires:  docbook-style-xsl
29 BuildRequires:  libcap-devel
30 BuildRequires:  libstdc++-devel
31 BuildRequires:  libusb-devel >= 1.0.0
32 BuildRequires:  libxslt-progs
33 BuildRequires:  ncurses-devel
34 BuildRequires:  pkgconfig
35 BuildRequires:  python-devel >= 1:2.5
36 BuildRequires:  qt4-qmake >= 4.4
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  scons >= 2.0.1
39 BuildRequires:  sed >= 4.0
40 BuildRequires:  xmlto
41 Requires:       %{name}-libs = %{version}-%{release}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 # libgpsd expects gpsd_report() defined by user
45 %define         skip_post_check_so      libgpsd\.so.*
46
47 # note: to avoid recompiling/relinking on scons install, whole environment
48 # needs to be the same in both build and install sections
49 %define scons_env \
50         CC="%{__cc}" \\\
51         CXX="%{__cxx}" \\\
52         CFLAGS="%{rpmcflags}" \\\
53         CXXFLAGS="%{rpmcxxflags}" \\\
54         CPPFLAGS="%{rpmcppflags}" \\\
55         LDFLAGS="%{rpmldflags}"
56
57 %description
58 gpsd is a service daemon that mediates access to a GPS sensor
59 connected to the host computer by serial or USB interface, making its
60 data on the location/course/velocity of the sensor available to be
61 queried on TCP port 2947 of the host computer. With gpsd, multiple GPS
62 client applications (such as navigational and wardriving software) can
63 share access to a GPS without contention or loss of data. Also, gpsd
64 responds to queries with a format that is substantially easier to
65 parse than NMEA 0183. A client library is provided for applications.
66
67 After installing this RPM, gpsd will automatically connect to USB
68 GPSes when they are plugged in and requires no configuration. For
69 serial GPSes, you will need to start gpsd by hand. Once connected, the
70 daemon automatically discovers the correct baudrate, stop bits, and
71 protocol. The daemon will be quiescent when there are no clients
72 asking for location information, and copes gracefully when the GPS is
73 unplugged and replugged.
74
75 %description -l pl.UTF-8
76 gpsd to demon usługi pośredniczącej w dostępie do sensora GPS
77 połączonego z komputerem poprzez interfejs szeregowy lub USB,
78 udostępniający dane o położeniu, kierunku ruchu i prędkości z sensora
79 na porcie TCP 2947 komputera. Przy użyciu gpsd wiele aplikacji
80 klienckich GPS (takich jak oprogramowanie nawigacyjne) może
81 współdzielić dostęp do GPS-a bez utraty danych. Ponadto gpsd odpowiada
82 na zapytania w formacie znacznie łatwiejszym do przetworzenia niż NMEA
83 0183. Dostarczona jest biblioteka kliencka dla aplikacji.
84
85 Po zainstalowaniu tego pakietu gpsd będzie się automatycznie łączył z
86 GPS-ami USB po podłączeniu ich. Dla GPS-ów szeregowych trzeba
87 uruchomić gpsd ręcznie. Po poączeniu demon automatycznie wykrywa
88 właściwą prędkość, liczbę bitów stopu i protokół. Demon oczekuje
89 spokojnie kiedy nie ma klientów i radzi sobie dobrze z odłączaniem i
90 ponownym podłączaniem GPS-a.
91
92 %package -n udev-gpsd
93 Summary:        UDEV support for GPS hotplugging
94 Summary(pl.UTF-8):      Obsługa UDEV-a do podłączania urządzeń GPS
95 Group:          Applications/System
96 Requires:       %{name} = %{version}-%{release}
97 Requires:       udev-core >= 1:127
98
99 %description -n udev-gpsd
100 UDEV support for GPS hotplugging.
101
102 %description -n udev-gpsd -l pl.UTF-8
103 Obsługa UDEV-a do podłączania urządzeń GPS.
104
105 %package libs
106 Summary:        GPSd client library
107 Summary(pl.UTF-8):      Biblioteka kliencka GPSd
108 Group:          Libraries
109
110 %description libs
111 GPSd client library.
112
113 %description libs -l pl.UTF-8
114 Biblioteka kliencka GPSd.
115
116 %package devel
117 Summary:        Client libraries in C and Python for talking to a running gpsd or GPS
118 Summary(pl.UTF-8):      Biblioteki klienckie dla C i Pythona do komunikacji z gpsd lub GPS-em
119 Group:          Development/Libraries
120 Requires:       %{name}-libs = %{version}-%{release}
121 Requires:       libstdc++-devel
122 Obsoletes:      gpsd-static
123
124 %description devel
125 This package provides C header files for the gpsd shared libraries
126 that manage access to a GPS for applications; also Python modules. You
127 will need to have gpsd installed for it to work.
128
129 %description devel -l pl.UTF-8
130 Ten pakiet zawiera pliki nagłówkowe C dla bibliotek współdzielonych
131 gpsd zarządzających dostępem do GPS-a dla aplikacji, a także moduły
132 Pythona. Do działania bibliotek potrzebny jest gpsd.
133
134 %package qt-libs
135 Summary:        GPS Qt4 integration library
136 Summary(pl.UTF-8):      Biblioteka integrująca GPS z Qt4
137 Group:          X11/Libraries
138 Requires:       %{name}-libs = %{version}-%{release}
139 Requires:       QtNetwork >= 4.4
140
141 %description qt-libs
142 GPS Qt4 integration library.
143
144 %description qt-libs -l pl.UTF-8
145 Biblioteka integrująca GPS z Qt4.
146
147 %package qt-devel
148 Summary:        Development files for GPS Qt4 integration library
149 Summary(pl.UTF-8):      Pliki programistyczne biblioteki integrującej GPS z Qt4
150 Group:          X11/Development/Libraries
151 Requires:       %{name}-devel = %{version}-%{release}
152 Requires:       %{name}-qt-libs = %{version}-%{release}
153 Requires:       QtNetwork-devel >= 4.4
154
155 %description qt-devel
156 Development files for GPS Qt4 integration library.
157
158 %description qt-devel -l pl.UTF-8
159 Pliki programistyczne biblioteki integrującej GPS z Qt4.
160
161 %package -n python-gps
162 Summary:        Python GPSd client library
163 Summary(pl.UTF-8):      Biblioteka kliencka GPSd dla Pythona
164 Group:          Libraries/Python
165 Requires:       %{name}-libs = %{version}-%{release}
166
167 %description -n python-gps
168 GPSd client library for Python.
169
170 %description -n python-gps -l pl.UTF-8
171 Biblioteka kliencka GPSd dla Pythona.
172
173 %package clients
174 Summary:        Clients for gpsd
175 Summary(pl.UTF-8):      Aplikacje klienckie dla gpsd
176 Group:          Applications/System
177 Requires:       %{name}-libs = %{version}-%{release}
178
179 %description clients
180 cgps is a simple test client for gpsd. It displays current GPS
181 position/time/velocity information and (for GPSes that support the
182 feature) the locations of accessible satellites. cgps resembles xgps,
183 but without the pictorial satellite display. It can run on a serial
184 terminal or terminal emulator.
185
186 %description clients -l pl.UTF-8
187 cgps to prosty klient testowy dla gpsd. Wyświetla bieżące informacje
188 GPS o położeniu, czasie i prędkości oraz (w przypadku GPS-ów
189 obsługujących to) położenia dostępnych satelitów. Jest podobny do
190 xgps, ale nie ma rysunkowego przedstawiania satelitów. Może działać na
191 terminalu szeregowym lub emulatorze terminala.
192
193 %package clients-gui
194 Summary:        Clients for gpsd with an X interface
195 Summary(pl.UTF-8):      Aplikacje klienckie z interfejsem X
196 Group:          Applications/System
197 Requires:       %{name}-libs = %{version}-%{release}
198 Requires:       python-gps = %{version}-%{release}
199 Requires:       python-pygtk-gtk >= 2:2.0
200
201 %description clients-gui
202 xgps is a simple test client for gpsd with an X interface. It displays
203 current GPS position/time/velocity information and (for GPSes that
204 support the feature) the locations of accessible satellites.
205
206 xgpsspeed is a speedometer that uses position information from the
207 GPS.
208
209 %description clients-gui -l pl.UTF-8
210 xgps to prosty klient testowy dla gpsd z interfejsem X. Wyświetla
211 bieżące informacje GPS o położeniu, czasie i prędkości oraz (w
212 przypadku GPS-ów obsługujących to) położenia dostępnych satelitów.
213
214 xgpsspeed to prędkościomierz używający informacji o położeniu z GPS-a.
215
216 %prep
217 %setup -q
218 %patch0 -p1
219 %patch1 -p1
220 %patch2 -p1
221 %patch3 -p1
222 %patch4 -p1
223
224 %build
225 %scons_env \
226 %scons \
227         libdir=%{_lib} \
228         chrpath=False \
229         shared=True \
230         strip=False \
231         systemd=True \
232         ncurses=True \
233         usb=True \
234         %{!?with_bluez:bluez=False} \
235         %{?with_dbus:dbus_export=True}
236
237
238 %install
239 rm -rf $RPM_BUILD_ROOT
240
241 %scons_env \
242 DESTDIR=$RPM_BUILD_ROOT \
243 %scons udev-install
244
245 # fix buggy libdir, kill -L/usr/* from qt Libs
246 %{__sed} -i -e 's,^libdir=.*,libdir=%{_libdir},' \
247         -e 's,-L/[^ ]* *,,' \
248         $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc
249
250 # invoke python directly
251 %{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' \
252         $RPM_BUILD_ROOT%{_bindir}/{gpscat,gpsfake,gpsprof,xgps,xgpsspeed,gegps}
253
254 # omitted from make install
255 install gpsinit $RPM_BUILD_ROOT%{_sbindir}
256 install -Dp dgpsip-servers $RPM_BUILD_ROOT%{_datadir}/gpsd/dgpsip-servers
257 cp -p gpsd.h $RPM_BUILD_ROOT%{_includedir}
258
259 #install packaging/rpm/gpsd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/gpsd
260 #install packaging/rpm/gpsd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/gpsd
261 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
262 cp -p packaging/X11/{xgps,xgpsspeed}.desktop $RPM_BUILD_ROOT%{_desktopdir}
263 cp -p packaging/X11/gpsd-logo.png $RPM_BUILD_ROOT%{_pixmapsdir}
264
265 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
266 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
267 %py_postclean
268
269 # symlinks not needed
270 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so.??.0
271
272 %clean
273 rm -rf $RPM_BUILD_ROOT
274
275 %post   libs -p /sbin/ldconfig
276 %postun libs -p /sbin/ldconfig
277
278 %post   qt-libs -p /sbin/ldconfig
279 %postun qt-libs -p /sbin/ldconfig
280
281 %files
282 %defattr(644,root,root,755)
283 %doc README INSTALL COPYING TODO AUTHORS
284 %attr(755,root,root) %{_bindir}/gpsmon
285 %attr(755,root,root) %{_sbindir}/gpsd
286 %attr(755,root,root) %{_sbindir}/gpsdctl
287 %attr(755,root,root) %{_sbindir}/gpsinit
288 %{_mandir}/man1/gpsmon.1*
289 %{_mandir}/man8/gpsd.8*
290 %{_mandir}/man8/gpsdctl.8*
291 %{_mandir}/man8/gpsinit.8*
292 %dir %{_datadir}/gpsd
293 %{_datadir}/gpsd/dgpsip-servers
294
295 %files -n udev-gpsd
296 %defattr(644,root,root,755)
297 %attr(755,root,root) /lib/udev/gpsd.hotplug
298 /lib/udev/rules.d/25-gpsd.rules
299 #%attr(754,root,root) /etc/rc.d/init.d/gpsd
300 #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gpsd
301
302 %files libs
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libgpsd.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libgpsd.so.22
306 %attr(755,root,root) %{_libdir}/libgps.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/libgps.so.21
308
309 %files devel
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_bindir}/gpsdecode
312 %attr(755,root,root) %{_libdir}/libgps.so
313 %attr(755,root,root) %{_libdir}/libgpsd.so
314 %{_includedir}/gps.h
315 %{_includedir}/gpsd.h
316 %{_includedir}/libgpsmm.h
317 %{_pkgconfigdir}/libgps.pc
318 %{_pkgconfigdir}/libgpsd.pc
319 %{_mandir}/man1/gpsdecode.1*
320 %{_mandir}/man3/libgps.3*
321 %{_mandir}/man3/libgpsd.3*
322 %{_mandir}/man3/libgpsmm.3*
323 %{_mandir}/man5/gpsd_json.5*
324 %{_mandir}/man5/srec.5*
325
326 %files qt-libs
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_libdir}/libQgpsmm.so.*.*.*
329 %attr(755,root,root) %ghost %{_libdir}/libQgpsmm.so.21
330
331 %files qt-devel
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/libQgpsmm.so
334 %{_mandir}/man3/libQgpsmm.3*
335 %{_libdir}/libQgpsmm.prl
336 %{_pkgconfigdir}/Qgpsmm.pc
337
338 %files -n python-gps
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_bindir}/gegps
341 %attr(755,root,root) %{_bindir}/gpscat
342 %attr(755,root,root) %{_bindir}/gpsfake
343 %attr(755,root,root) %{_bindir}/gpsprof
344 %dir %{py_sitedir}/gps
345 %attr(755,root,root) %{py_sitedir}/gps/*.so
346 %{py_sitedir}/gps/*.py[co]
347 %{py_sitedir}/gps-%{version}.egg-info
348 %{_mandir}/man1/gegps.1*
349 %{_mandir}/man1/gpscat.1*
350 %{_mandir}/man1/gpsfake.1*
351 %{_mandir}/man1/gpsprof.1*
352
353 %files clients
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_bindir}/gps2udp
356 %attr(755,root,root) %{_bindir}/gpsctl
357 %attr(755,root,root) %{_bindir}/cgps
358 %attr(755,root,root) %{_bindir}/gpspipe
359 %{?with_dbus:%attr(755,root,root) %{_bindir}/gpxlogger}
360 %{_mandir}/man1/gps2udp.1*
361 %{_mandir}/man1/gpsctl.1*
362 %{_mandir}/man1/cgps.1*
363 %{_mandir}/man1/gps.1*
364 %{_mandir}/man1/gpspipe.1*
365
366 %files clients-gui
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_bindir}/lcdgps
369 %attr(755,root,root) %{_bindir}/xgps
370 %attr(755,root,root) %{_bindir}/xgpsspeed
371 %{_mandir}/man1/lcdgps.1*
372 %{_mandir}/man1/xgps.1*
373 %{_mandir}/man1/xgpsspeed.1*
374 %{_desktopdir}/xgps.desktop
375 %{_desktopdir}/xgpsspeed.desktop
376 %{_pixmapsdir}/gpsd-logo.png
This page took 0.060456 seconds and 2 git commands to generate.