]> git.pld-linux.org Git - packages/gpsd.git/blame - gpsd.spec
- updated to 3.19
[packages/gpsd.git] / gpsd.spec
CommitLineData
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 9Summary: Service daemon for mediating access to a GPS
7704e599 10Summary(pl.UTF-8): Oprogramowanie komunikujące się z GPS-em
90c8b3d7 11Name: gpsd
45af9b8b
JB
12Version: 3.19
13Release: 1
90c8b3d7 14License: BSD
15Group: Daemons
4cf54e14 16Source0: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
45af9b8b
JB
17# Source0-md5: b3bf88706794eb8e5f2c2543bf7ba87b
18Patch0: %{name}-desktop.patch
19Patch1: %{name}-destdir.patch
4cf54e14 20URL: http://www.catb.org/gpsd/
df34cb17 21%if %{with dbus}
90c8b3d7 22BuildRequires: dbus-devel
23BuildRequires: dbus-glib-devel
24%endif
396eb448 25%{?with_bluez:BuildRequires: bluez-libs-devel}
76626dbc 26BuildRequires: docbook-dtd412-xml
9f13a9eb 27BuildRequires: docbook-style-xsl
4cf54e14 28BuildRequires: libcap-devel
76626dbc 29BuildRequires: libstdc++-devel
396eb448 30BuildRequires: libusb-devel >= 1.0.0
76626dbc 31BuildRequires: libxslt-progs
4d5d1f20 32BuildRequires: ncurses-devel
76626dbc 33BuildRequires: pkgconfig
4cf54e14 34BuildRequires: python-devel >= 1:2.5
4116cf5e 35BuildRequires: rpm-pythonprov
4cf54e14
ER
36BuildRequires: scons >= 2.0.1
37BuildRequires: sed >= 4.0
76626dbc 38BuildRequires: xmlto
45af9b8b
JB
39%if %{with qt}
40%if %{with qt4}
41BuildRequires: QtNetwork-devel >= 4.4
42%else
43BuildRequires: Qt5Network-devel >= 5.0
44%endif
45%endif
4d5d1f20 46Requires: %{name}-libs = %{version}-%{release}
90c8b3d7 47BuildRoot: %{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
60gpsd is a service daemon that mediates access to a GPS sensor
61connected to the host computer by serial or USB interface, making its
62data on the location/course/velocity of the sensor available to be
63queried on TCP port 2947 of the host computer. With gpsd, multiple GPS
64client applications (such as navigational and wardriving software) can
65share access to a GPS without contention or loss of data. Also, gpsd
66responds to queries with a format that is substantially easier to
67parse than NMEA 0183. A client library is provided for applications.
68
69After installing this RPM, gpsd will automatically connect to USB
70GPSes when they are plugged in and requires no configuration. For
71serial GPSes, you will need to start gpsd by hand. Once connected, the
72daemon automatically discovers the correct baudrate, stop bits, and
73protocol. The daemon will be quiescent when there are no clients
74asking for location information, and copes gracefully when the GPS is
75unplugged and replugged.
76
21673dc2
JR
77%description -l pl.UTF-8
78gpsd to demon usługi pośredniczącej w dostępie do sensora GPS
79połączonego z komputerem poprzez interfejs szeregowy lub USB,
80udostępniający dane o położeniu, kierunku ruchu i prędkości z sensora
81na porcie TCP 2947 komputera. Przy użyciu gpsd wiele aplikacji
82klienckich GPS (takich jak oprogramowanie nawigacyjne) może
83współdzielić dostęp do GPS-a bez utraty danych. Ponadto gpsd odpowiada
84na zapytania w formacie znacznie łatwiejszym do przetworzenia niż NMEA
4d5d1f20
JB
850183. Dostarczona jest biblioteka kliencka dla aplikacji.
86
21673dc2
JR
87Po zainstalowaniu tego pakietu gpsd będzie się automatycznie łączył z
88GPS-ami USB po podłączeniu ich. Dla GPS-ów szeregowych trzeba
89uruchomić gpsd ręcznie. Po poączeniu demon automatycznie wykrywa
90właściwą prędkość, liczbę bitów stopu i protokół. Demon oczekuje
91spokojnie kiedy nie ma klientów i radzi sobie dobrze z odłączaniem i
92ponownym podłączaniem GPS-a.
4d5d1f20 93
fe2d2d8e
JB
94%package -n udev-gpsd
95Summary: UDEV support for GPS hotplugging
96Summary(pl.UTF-8): Obsługa UDEV-a do podłączania urządzeń GPS
97Group: Applications/System
98Requires: %{name} = %{version}-%{release}
99Requires: udev-core >= 1:127
100
101%description -n udev-gpsd
102UDEV support for GPS hotplugging.
103
104%description -n udev-gpsd -l pl.UTF-8
105Obsługa UDEV-a do podłączania urządzeń GPS.
106
4d5d1f20 107%package libs
dc7c690b 108Summary: GPSd client library
109Summary(pl.UTF-8): Biblioteka kliencka GPSd
4d5d1f20
JB
110Group: Libraries
111
112%description libs
dc7c690b 113GPSd client library.
4d5d1f20 114
21673dc2 115%description libs -l pl.UTF-8
dc7c690b 116Biblioteka kliencka GPSd.
4d5d1f20
JB
117
118%package devel
90c8b3d7 119Summary: Client libraries in C and Python for talking to a running gpsd or GPS
7704e599 120Summary(pl.UTF-8): Biblioteki klienckie dla C i Pythona do komunikacji z gpsd lub GPS-em
90c8b3d7 121Group: Development/Libraries
4d5d1f20 122Requires: %{name}-libs = %{version}-%{release}
396eb448 123Requires: libstdc++-devel
52d28086 124Obsoletes: gpsd-static
90c8b3d7 125
4d5d1f20 126%description devel
90c8b3d7 127This package provides C header files for the gpsd shared libraries
128that manage access to a GPS for applications; also Python modules. You
129will need to have gpsd installed for it to work.
130
21673dc2
JR
131%description devel -l pl.UTF-8
132Ten pakiet zawiera pliki nagłówkowe C dla bibliotek współdzielonych
133gpsd zarządzających dostępem do GPS-a dla aplikacji, a także moduły
134Pythona. Do działania bibliotek potrzebny jest gpsd.
4d5d1f20 135
396eb448
JB
136%package qt-libs
137Summary: GPS Qt4 integration library
138Summary(pl.UTF-8): Biblioteka integrująca GPS z Qt4
139Group: X11/Libraries
140Requires: %{name}-libs = %{version}-%{release}
141Requires: QtNetwork >= 4.4
142
143%description qt-libs
144GPS Qt4 integration library.
145
146%description qt-libs -l pl.UTF-8
147Biblioteka integrująca GPS z Qt4.
148
149%package qt-devel
150Summary: Development files for GPS Qt4 integration library
151Summary(pl.UTF-8): Pliki programistyczne biblioteki integrującej GPS z Qt4
152Group: X11/Development/Libraries
153Requires: %{name}-devel = %{version}-%{release}
154Requires: %{name}-qt-libs = %{version}-%{release}
155Requires: QtNetwork-devel >= 4.4
156
157%description qt-devel
158Development files for GPS Qt4 integration library.
159
160%description qt-devel -l pl.UTF-8
161Pliki programistyczne biblioteki integrującej GPS z Qt4.
162
4116cf5e
JK
163%package -n python-gps
164Summary: Python GPSd client library
165Summary(pl.UTF-8): Biblioteka kliencka GPSd dla Pythona
166Group: Libraries/Python
167Requires: %{name}-libs = %{version}-%{release}
168
169%description -n python-gps
170GPSd client library for Python.
171
172%description -n python-gps -l pl.UTF-8
173Biblioteka kliencka GPSd dla Pythona.
174
4d5d1f20 175%package clients
2f6e6399
JB
176Summary: Clients for gpsd
177Summary(pl.UTF-8): Aplikacje klienckie dla gpsd
178Group: Applications/System
179Requires: %{name}-libs = %{version}-%{release}
180
181%description clients
182cgps is a simple test client for gpsd. It displays current GPS
183position/time/velocity information and (for GPSes that support the
184feature) the locations of accessible satellites. cgps resembles xgps,
185but without the pictorial satellite display. It can run on a serial
186terminal or terminal emulator.
187
188%description clients -l pl.UTF-8
189cgps to prosty klient testowy dla gpsd. Wyświetla bieżące informacje
190GPS o położeniu, czasie i prędkości oraz (w przypadku GPS-ów
191obsługujących to) położenia dostępnych satelitów. Jest podobny do
192xgps, ale nie ma rysunkowego przedstawiania satelitów. Może działać na
193terminalu szeregowym lub emulatorze terminala.
194
195%package clients-gui
90c8b3d7 196Summary: Clients for gpsd with an X interface
7704e599 197Summary(pl.UTF-8): Aplikacje klienckie z interfejsem X
90c8b3d7 198Group: Applications/System
4d5d1f20 199Requires: %{name}-libs = %{version}-%{release}
396eb448
JB
200Requires: python-gps = %{version}-%{release}
201Requires: python-pygtk-gtk >= 2:2.0
90c8b3d7 202
2f6e6399 203%description clients-gui
90c8b3d7 204xgps is a simple test client for gpsd with an X interface. It displays
205current GPS position/time/velocity information and (for GPSes that
206support the feature) the locations of accessible satellites.
207
208xgpsspeed is a speedometer that uses position information from the
2f6e6399 209GPS.
90c8b3d7 210
2f6e6399 211%description clients-gui -l pl.UTF-8
21673dc2
JR
212xgps to prosty klient testowy dla gpsd z interfejsem X. Wyświetla
213bieżące informacje GPS o położeniu, czasie i prędkości oraz (w
214przypadku GPS-ów obsługujących to) położenia dostępnych satelitów.
4d5d1f20 215
21673dc2 216xgpsspeed 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
244rm -rf $RPM_BUILD_ROOT
d96c1154
JB
245
246%scons_env \
247DESTDIR=$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
258install gpsinit $RPM_BUILD_ROOT%{_sbindir}
d96c1154 259
45af9b8b 260install -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
263cp -p packaging/X11/{xgps,xgpsspeed}.desktop $RPM_BUILD_ROOT%{_desktopdir}
264cp -p packaging/X11/gpsd-logo.png $RPM_BUILD_ROOT%{_pixmapsdir}
fe2d2d8e 265
45af9b8b
JB
266%if %{with systemd}
267cat >$RPM_BUILD_ROOT/etc/sysconfig/gpsd <<'EOF'
268# Options for gpsd, including serial devices
269OPTIONS=""
270# Set to 'true' to add USB devices automatically via udev
271USBAUTO="true"
272EOF
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
280rm -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
This page took 0.094632 seconds and 4 git commands to generate.