1 |
ahmad |
24452 |
%define _hotplugdir %{_prefix}/lib/hotplug |
2 |
|
|
|
3 |
|
|
%define major 19 |
4 |
|
|
%define gpsd_major 0 |
5 |
|
|
%define libname %mklibname %{name} %{major} |
6 |
|
|
%define libqtname %mklibname Qgpsmm %{major} |
7 |
|
|
%define develname %mklibname %{name} -d |
8 |
|
|
%define staticname %mklibname %{name} -s -d |
9 |
|
|
|
10 |
|
|
Name: gpsd |
11 |
|
|
Summary: GPS data translator and GUI |
12 |
|
|
Version: 2.95 |
13 |
|
|
Release: %mkrel 2 |
14 |
|
|
Source0: http://prdownload.berlios.de/%{name}/%{name}-%{version}.tar.gz |
15 |
|
|
#Source2: gpsd.sysconfig |
16 |
|
|
Patch1: gpsd-2.90-udev.patch |
17 |
|
|
Patch2: gpsd-2.95-fix-link.patch |
18 |
|
|
URL: http://gpsd.berlios.de |
19 |
|
|
License: BSD |
20 |
|
|
Group: Sciences/Geosciences |
21 |
|
|
Provides: gps3d |
22 |
|
|
Obsoletes: gps3d |
23 |
|
|
BuildRequires: ncurses-devel |
24 |
|
|
BuildRequires: udev-tools |
25 |
|
|
BuildRequires: lesstif-devel |
26 |
|
|
BuildRequires: xmlto |
27 |
|
|
BuildRequires: dbus-devel |
28 |
|
|
BuildRequires: dbus-glib-devel |
29 |
|
|
BuildRequires: python |
30 |
|
|
BuildRequires: python-devel |
31 |
|
|
BuildRequires: bluez-devel |
32 |
|
|
BuildRequires: qt4-devel |
33 |
|
|
Requires: %{name}-python = %{version}-%{release} |
34 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
35 |
|
|
|
36 |
|
|
%description |
37 |
|
|
gpsd is a service daemon that mediates access to a GPS sensor |
38 |
|
|
connected to the host computer by serial or USB interface, making its |
39 |
|
|
data on the location/course/velocity of the sensor available to be |
40 |
|
|
queried on TCP port 2947 of the host computer. With gpsd, multiple |
41 |
|
|
GPS client applications (such as navigational and wardriving software) |
42 |
|
|
can share access to a GPS without contention or loss of data. Also, |
43 |
|
|
gpsd responds to queries with a format that is substantially easier to |
44 |
|
|
parse than NMEA 0183. A client library is provided for applications. |
45 |
|
|
|
46 |
|
|
After installing this RPM, gpsd will automatically connect to USB |
47 |
|
|
GPSes when they are plugged in and requires no configuration. For |
48 |
|
|
serial GPSes, you will need to start gpsd by hand. Once connected, |
49 |
|
|
the daemon automatically discovers the correct baudrate, stop bits, |
50 |
|
|
and protocol. The daemon will be quiescent when there are no |
51 |
|
|
clients asking for location information, and copes gracefully when the |
52 |
|
|
GPS is unplugged and replugged. |
53 |
|
|
|
54 |
|
|
%package -n %{libname} |
55 |
|
|
Summary: Libraries for gpsd |
56 |
|
|
Group: System/Libraries |
57 |
|
|
Obsoletes: %{mklibname gpsd 15} > 2.34 |
58 |
|
|
|
59 |
|
|
%description -n %{libname} |
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 |
64 |
|
|
GPS client applications (such as navigational and wardriving software) |
65 |
|
|
can share access to a GPS without contention or loss of data. Also, |
66 |
|
|
gpsd 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, |
72 |
|
|
the daemon automatically discovers the correct baudrate, stop bits, |
73 |
|
|
and protocol. The daemon will be quiescent when there are no |
74 |
|
|
clients asking for location information, and copes gracefully when the |
75 |
|
|
GPS is unplugged and replugged. |
76 |
|
|
|
77 |
|
|
%package -n %{libqtname} |
78 |
|
|
Summary: Qt bindings for gpsd |
79 |
|
|
Group: System/Libraries |
80 |
|
|
|
81 |
|
|
%description -n %{libqtname} |
82 |
|
|
This package contains Qt bindings for gpsd. |
83 |
|
|
|
84 |
|
|
%package -n %{develname} |
85 |
|
|
Summary: Client libraries in C and Python for talking to a running gpsd or GPS |
86 |
|
|
Group: Development/C |
87 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
88 |
|
|
Provides: lib%{name}-devel = %{version}-%{release} |
89 |
|
|
Requires: %{libname} = %{version} |
90 |
|
|
Requires: %{libqtname} = %{version} |
91 |
|
|
Obsoletes: %{mklibname gpsd 15 -d} |
92 |
|
|
|
93 |
|
|
%description -n %{develname} |
94 |
|
|
This package provides C header files for the gpsd shared libraries |
95 |
|
|
that manage access to a GPS for applications; also Python modules. |
96 |
|
|
You will need to have gpsd installed for it to work. |
97 |
|
|
|
98 |
|
|
%package -n %{staticname} |
99 |
|
|
Summary: Static libraries for gpsd |
100 |
|
|
Group: Development/C |
101 |
|
|
Provides: %{name}-static-devel = %{version}-%{release} |
102 |
|
|
Provides: lib%{name}-static-devel = %{version}-%{release} |
103 |
|
|
Requires: %{develname} = %{version} |
104 |
|
|
Obsoletes: %{mklibname gpsd 15 -s -d} |
105 |
|
|
|
106 |
|
|
%description -n %{staticname} |
107 |
|
|
This package provides C header files for the gpsd shared libraries |
108 |
|
|
that manage access to a GPS for applications; also Python modules. |
109 |
|
|
You will need to have gpsd installed for it to work. |
110 |
|
|
|
111 |
|
|
%package clients |
112 |
|
|
Summary: Clients for gpsd with an X interface |
113 |
|
|
Group: Sciences/Geosciences |
114 |
|
|
|
115 |
|
|
%description clients |
116 |
|
|
xgps is a simple test client for gpsd with an X interface. It displays |
117 |
|
|
current GPS position/time/velocity information and (for GPSes that |
118 |
|
|
support the feature) the locations of accessible satellites. |
119 |
|
|
|
120 |
|
|
xgpsspeed is a speedometer that uses position information from the GPS. |
121 |
|
|
It accepts an -h option and optional argument as for gps, or a -v option |
122 |
|
|
to dump the package version and exit. Additionally, it accepts -rv |
123 |
|
|
(reverse video) and -nc (needle color) options. |
124 |
|
|
|
125 |
|
|
%package python |
126 |
|
|
Summary: Python bindings for gpsd |
127 |
|
|
Group: Development/Python |
128 |
|
|
Requires: %{libname} = %{version} |
129 |
|
|
Requires: python |
130 |
|
|
|
131 |
|
|
%description python |
132 |
|
|
This package contains the Python bindings for gpsd. It will be needed |
133 |
|
|
for any applications that interface with gpsd via python. |
134 |
|
|
|
135 |
|
|
%prep |
136 |
|
|
%setup -q |
137 |
|
|
%patch1 -p1 -b .udev |
138 |
|
|
%patch2 -p0 -b .link |
139 |
|
|
|
140 |
|
|
%build |
141 |
|
|
%configure2_5x --enable-dbus --enable-bluetooth |
142 |
|
|
|
143 |
|
|
%make |
144 |
|
|
|
145 |
|
|
%install |
146 |
|
|
rm -rf %{buildroot} |
147 |
|
|
|
148 |
|
|
%makeinstall_std |
149 |
|
|
|
150 |
|
|
# additional gpsd files |
151 |
|
|
#mkdir -p %{buildroot}%{_datadir}/X11/app-defaults/ |
152 |
|
|
#install -m644 xgpsspeed.ad %{buildroot}%{_datadir}/X11/app-defaults/xgpsspeed |
153 |
|
|
|
154 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d |
155 |
|
|
/usr/sbin/udev_import_usermap --no-modprobe usb gpsd.usermap > %{buildroot}%{_sysconfdir}/udev/rules.d/70-gpsd.rules |
156 |
|
|
|
157 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/udev/agents.d/usb |
158 |
|
|
install -m755 gpsd.hotplug %{buildroot}%{_sysconfdir}/udev/agents.d/usb/gpsd |
159 |
|
|
|
160 |
|
|
#install -m755 gps.py -D %{buildroot}%{_libdir}/python${PYVERSION}/site-packages/gps.py |
161 |
|
|
|
162 |
|
|
# init scripts |
163 |
|
|
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/init.d |
164 |
|
|
%{__install} -p -m 0755 packaging/rpm/gpsd.init \ |
165 |
|
|
%{buildroot}%{_sysconfdir}/init.d/gpsd |
166 |
|
|
|
167 |
|
|
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig |
168 |
|
|
%{__install} -p -m 0644 packaging/rpm/gpsd.sysconfig \ |
169 |
|
|
%{buildroot}%{_sysconfdir}/sysconfig/gpsd |
170 |
|
|
|
171 |
|
|
mkdir -p %{buildroot}%{_datadir}/applications |
172 |
|
|
cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}-clients.desktop << EOF |
173 |
|
|
[Desktop Entry] |
174 |
|
|
Name=XGPS |
175 |
|
|
Comment=XGPS |
176 |
|
|
Exec=xgps |
177 |
|
|
Icon=communications_section |
178 |
|
|
Terminal=false |
179 |
|
|
Type=Application |
180 |
|
|
StartupNotify=true |
181 |
|
|
Categories=Science;Geology; |
182 |
|
|
EOF |
183 |
|
|
|
184 |
|
|
#remove unpackaged file |
185 |
|
|
#rm -f %{buildroot}%{_libdir}/python/site-packages/gps.py |
186 |
|
|
|
187 |
|
|
#put the python file(s) in the right place (it's arch-dependent) |
188 |
|
|
|
189 |
|
|
# fixme: may need to be adapted to include other 64-bit arches, I'm |
190 |
|
|
# not sure what directory they use - AdamW 2007/07 |
191 |
|
|
%ifarch x86_64 |
192 |
|
|
mkdir -p %{buildroot}%{py_platsitedir} |
193 |
|
|
mv %{buildroot}%{py_puresitedir}/* %{buildroot}%{py_platsitedir} |
194 |
|
|
%endif |
195 |
|
|
|
196 |
|
|
rm -rf %{buildroot}%{_libdir}/*.la |
197 |
|
|
|
198 |
|
|
%if %mdkversion < 200900 |
199 |
|
|
%post -n %{libname} -p /sbin/ldconfig |
200 |
|
|
%endif |
201 |
|
|
|
202 |
|
|
%if %mdkversion < 200900 |
203 |
|
|
%postun -n %{libname} -p /sbin/ldconfig |
204 |
|
|
%endif |
205 |
|
|
|
206 |
|
|
%if %mdkversion < 200900 |
207 |
|
|
%post clients |
208 |
|
|
%update_menus |
209 |
|
|
%endif |
210 |
|
|
|
211 |
|
|
%if %mdkversion < 200900 |
212 |
|
|
%postun clients |
213 |
|
|
%clean_menus |
214 |
|
|
%endif |
215 |
|
|
|
216 |
|
|
%clean |
217 |
|
|
rm -rf %{buildroot} |
218 |
|
|
|
219 |
|
|
%files |
220 |
|
|
%defattr(-,root,root,-) |
221 |
|
|
%doc README |
222 |
|
|
%{_sbindir}/gpsd |
223 |
|
|
%{_bindir}/gpscat |
224 |
|
|
%{_bindir}/gpsctl |
225 |
|
|
%{_bindir}/gpsprof |
226 |
|
|
%{_bindir}/gpsmon |
227 |
|
|
%{_bindir}/gpsdecode |
228 |
|
|
%{_mandir}/man8/gpsd.8* |
229 |
|
|
%{_mandir}/man1/gpsprof.1* |
230 |
|
|
%{_mandir}/man1/gps.1* |
231 |
|
|
%{_mandir}/man1/gpscat.1* |
232 |
|
|
%{_mandir}/man1/gpsctl.1* |
233 |
|
|
%{_mandir}/man1/gpsmon.1* |
234 |
|
|
%{_mandir}/man1/gpsdecode.1* |
235 |
|
|
%{_mandir}/man5/rtcm*.5* |
236 |
|
|
%{_mandir}/man5/srec.5* |
237 |
|
|
%{_sysconfdir}/init.d/%{name} |
238 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
239 |
|
|
%{_sysconfdir}/udev/agents.d/usb/gpsd |
240 |
|
|
%{_sysconfdir}/udev/rules.d/70-gpsd.rules |
241 |
|
|
|
242 |
|
|
%files -n %{libname} |
243 |
|
|
%defattr(-,root,root) |
244 |
|
|
%{_libdir}/libgps.so.%{major}* |
245 |
|
|
%{_libdir}/libgpsd.so.%{gpsd_major}* |
246 |
|
|
|
247 |
|
|
%files -n %{libqtname} |
248 |
|
|
%defattr(-,root,root) |
249 |
|
|
%{_libdir}/libQgpsmm.so.%{major}* |
250 |
|
|
|
251 |
|
|
%files -n %{develname} |
252 |
|
|
%defattr(-,root,root,-) |
253 |
|
|
%doc TODO |
254 |
|
|
%{_includedir}/gps.h |
255 |
|
|
%{_includedir}/libgpsmm.h |
256 |
|
|
%{_includedir}/gpsd.h |
257 |
|
|
%{_libdir}/libgps.so |
258 |
|
|
%{_libdir}/libgpsd.so |
259 |
|
|
%{_libdir}/libQgpsmm.so |
260 |
|
|
%{_libdir}/pkgconfig/*.pc |
261 |
|
|
%{_mandir}/man1/gpsfake.1* |
262 |
|
|
%{_mandir}/man3/libgps.3* |
263 |
|
|
%{_mandir}/man3/libgpsmm.3* |
264 |
|
|
%{_mandir}/man3/libgpsd.3* |
265 |
|
|
%{_bindir}/gpsfake |
266 |
|
|
|
267 |
|
|
%files -n %{staticname} |
268 |
|
|
%defattr(-,root,root) |
269 |
|
|
%{_libdir}/*.a |
270 |
|
|
|
271 |
|
|
%files clients |
272 |
|
|
%defattr(-,root,root,-) |
273 |
|
|
%{_bindir}/xgps |
274 |
|
|
%{_bindir}/cgps |
275 |
|
|
%{_bindir}/gpspipe |
276 |
|
|
%{_bindir}/xgpsspeed |
277 |
|
|
%{_bindir}/gpxlogger |
278 |
|
|
%{_bindir}/lcdgps |
279 |
|
|
%{_mandir}/man1/xgps.1* |
280 |
|
|
%{_mandir}/man1/cgps.1* |
281 |
|
|
#%{_mandir}/man1/cgpxlogger.1* |
282 |
|
|
%{_mandir}/man1/gpspipe.1* |
283 |
|
|
%{_mandir}/man1/lcdgps.1.* |
284 |
|
|
%{_mandir}/man1/xgpsspeed.1* |
285 |
|
|
#%{_datadir}/X11/app-defaults/xgpsspeed |
286 |
|
|
%{_datadir}/applications/mandriva-%{name}-clients.desktop |
287 |
|
|
|
288 |
|
|
%files python |
289 |
|
|
%defattr(-,root,root,-) |
290 |
|
|
%{py_platsitedir}/* |
291 |
|
|
|
292 |
|
|
|