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