10 |
Name: gpsd |
Name: gpsd |
11 |
Summary: GPS data translator and GUI |
Summary: GPS data translator and GUI |
12 |
Version: 2.95 |
Version: 2.95 |
13 |
Release: %mkrel 2 |
Release: %mkrel 4 |
14 |
Source0: http://prdownload.berlios.de/%{name}/%{name}-%{version}.tar.gz |
Source0: http://prdownload.berlios.de/%{name}/%{name}-%{version}.tar.gz |
15 |
#Source2: gpsd.sysconfig |
#Patch1: gpsd-2.90-udev.patch |
|
Patch1: gpsd-2.90-udev.patch |
|
16 |
Patch2: gpsd-2.95-fix-link.patch |
Patch2: gpsd-2.95-fix-link.patch |
17 |
|
# (Fedora) make 'make' not ignore -w even when it's used |
18 |
|
Patch3: gpsd-2.95-silentmake.patch |
19 |
|
# (Fedora) add /usr/sbin/ to PATH in gpsd.hotplug.wrapper |
20 |
|
Patch4: gpsd-2.95-hotplugvars.patch |
21 |
|
# (Fedora) add patch to prevent a crash in gpscat when started without arguments; |
22 |
|
# and instead of crashing show the usage output |
23 |
|
Patch5: gpsd-2.95-gpscatnoarg.patch |
24 |
URL: http://gpsd.berlios.de |
URL: http://gpsd.berlios.de |
25 |
License: BSD |
License: BSD |
26 |
Group: Sciences/Geosciences |
Group: Sciences/Geosciences |
140 |
|
|
141 |
%prep |
%prep |
142 |
%setup -q |
%setup -q |
143 |
%patch1 -p1 -b .udev |
#%patch1 -p1 -b .udev |
144 |
%patch2 -p0 -b .link |
%patch2 -p0 -b .link |
145 |
|
|
146 |
|
%patch3 -p1 -b .silentmake |
147 |
|
%patch4 -p1 -b .hotplugvars |
148 |
|
%patch5 -p1 -b .gpscatnoargs |
149 |
|
|
150 |
%build |
%build |
151 |
%configure2_5x --enable-dbus --enable-bluetooth |
%configure2_5x --enable-dbus --enable-bluetooth |
152 |
|
|
155 |
%install |
%install |
156 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
157 |
|
|
158 |
%makeinstall_std |
%makeinstall_std pythondir=%{py_platsitedir} |
|
|
|
|
# additional gpsd files |
|
|
#mkdir -p %{buildroot}%{_datadir}/X11/app-defaults/ |
|
|
#install -m644 xgpsspeed.ad %{buildroot}%{_datadir}/X11/app-defaults/xgpsspeed |
|
159 |
|
|
160 |
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d |
# install udev rules |
161 |
/usr/sbin/udev_import_usermap --no-modprobe usb gpsd.usermap > %{buildroot}%{_sysconfdir}/udev/rules.d/70-gpsd.rules |
install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/rules.d |
162 |
|
install -p -m 0644 gpsd.rules %{buildroot}%{_sysconfdir}/udev/rules.d/99-gpsd.rules |
163 |
|
|
164 |
mkdir -p %{buildroot}%{_sysconfdir}/udev/agents.d/usb |
install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/agents.d/usb |
165 |
install -m755 gpsd.hotplug %{buildroot}%{_sysconfdir}/udev/agents.d/usb/gpsd |
install -m755 gpsd.hotplug %{buildroot}%{_sysconfdir}/udev/agents.d/usb/gpsd |
166 |
|
|
167 |
#install -m755 gps.py -D %{buildroot}%{_libdir}/python${PYVERSION}/site-packages/gps.py |
# make gps.py executable |
168 |
|
chmod a+x %{buildroot}%{py_platsitedir}/gps/gps.py |
169 |
|
|
170 |
# init scripts |
# install init scripts |
171 |
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/init.d |
install -d -m 0755 %{buildroot}%{_sysconfdir}/init.d |
172 |
%{__install} -p -m 0755 packaging/rpm/gpsd.init \ |
install -p -m 0755 packaging/rpm/gpsd.init %{buildroot}%{_sysconfdir}/init.d/gpsd |
173 |
%{buildroot}%{_sysconfdir}/init.d/gpsd |
|
174 |
|
# install sysconfig file |
175 |
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig |
install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig |
176 |
%{__install} -p -m 0644 packaging/rpm/gpsd.sysconfig \ |
install -p -m 0644 packaging/rpm/gpsd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/gpsd |
177 |
%{buildroot}%{_sysconfdir}/sysconfig/gpsd |
|
178 |
|
# install hotplug script |
179 |
mkdir -p %{buildroot}%{_datadir}/applications |
install -d -m 0755 %{buildroot}/lib/udev |
180 |
cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}-clients.desktop << EOF |
install -p -m 0755 gpsd.hotplug gpsd.hotplug.wrapper %{buildroot}/lib/udev |
181 |
[Desktop Entry] |
|
182 |
Name=XGPS |
# install .desktop files |
183 |
Comment=XGPS |
install -d -m 0755 %{buildroot}%{_datadir}/applications/ |
184 |
Exec=xgps |
install -m644 packaging/X11/xgps.desktop %{buildroot}%{_datadir}/applications/ |
185 |
Icon=communications_section |
install -m644 packaging/X11/xgpsspeed.desktop %{buildroot}%{_datadir}/applications/ |
186 |
Terminal=false |
|
187 |
Type=Application |
# install logo for the .desktop file |
188 |
StartupNotify=true |
install -d -m 0755 %{buildroot}%{_datadir}/gpsd |
189 |
Categories=Science;Geology; |
install -m644 packaging/X11/gpsd-logo.png %{buildroot}%{_datadir}/gpsd/gpsd-logo.png |
|
EOF |
|
|
|
|
|
#remove unpackaged file |
|
|
#rm -f %{buildroot}%{_libdir}/python/site-packages/gps.py |
|
|
|
|
|
#put the python file(s) in the right place (it's arch-dependent) |
|
|
|
|
|
# fixme: may need to be adapted to include other 64-bit arches, I'm |
|
|
# not sure what directory they use - AdamW 2007/07 |
|
|
%ifarch x86_64 |
|
|
mkdir -p %{buildroot}%{py_platsitedir} |
|
|
mv %{buildroot}%{py_puresitedir}/* %{buildroot}%{py_platsitedir} |
|
|
%endif |
|
190 |
|
|
191 |
rm -rf %{buildroot}%{_libdir}/*.la |
rm -rf %{buildroot}%{_libdir}/*.la |
192 |
|
|
193 |
%if %mdkversion < 200900 |
%post |
194 |
%post -n %{libname} -p /sbin/ldconfig |
%_post_service %{name} |
195 |
%endif |
|
196 |
|
%preun |
197 |
%if %mdkversion < 200900 |
%_preun_service %{name} |
|
%postun -n %{libname} -p /sbin/ldconfig |
|
|
%endif |
|
|
|
|
|
%if %mdkversion < 200900 |
|
|
%post clients |
|
|
%update_menus |
|
|
%endif |
|
|
|
|
|
%if %mdkversion < 200900 |
|
|
%postun clients |
|
|
%clean_menus |
|
|
%endif |
|
198 |
|
|
199 |
%clean |
%clean |
200 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
208 |
%{_bindir}/gpsprof |
%{_bindir}/gpsprof |
209 |
%{_bindir}/gpsmon |
%{_bindir}/gpsmon |
210 |
%{_bindir}/gpsdecode |
%{_bindir}/gpsdecode |
211 |
|
/lib/udev/gpsd.hotplug |
212 |
|
/lib/udev/gpsd.hotplug.wrapper |
213 |
%{_mandir}/man8/gpsd.8* |
%{_mandir}/man8/gpsd.8* |
214 |
%{_mandir}/man1/gpsprof.1* |
%{_mandir}/man1/gpsprof.1* |
215 |
%{_mandir}/man1/gps.1* |
%{_mandir}/man1/gps.1* |
222 |
%{_sysconfdir}/init.d/%{name} |
%{_sysconfdir}/init.d/%{name} |
223 |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
224 |
%{_sysconfdir}/udev/agents.d/usb/gpsd |
%{_sysconfdir}/udev/agents.d/usb/gpsd |
225 |
%{_sysconfdir}/udev/rules.d/70-gpsd.rules |
%{_sysconfdir}/udev/rules.d/99-gpsd.rules |
226 |
|
|
227 |
%files -n %{libname} |
%files -n %{libname} |
228 |
%defattr(-,root,root) |
%defattr(-,root,root) |
263 |
%{_bindir}/lcdgps |
%{_bindir}/lcdgps |
264 |
%{_mandir}/man1/xgps.1* |
%{_mandir}/man1/xgps.1* |
265 |
%{_mandir}/man1/cgps.1* |
%{_mandir}/man1/cgps.1* |
|
#%{_mandir}/man1/cgpxlogger.1* |
|
266 |
%{_mandir}/man1/gpspipe.1* |
%{_mandir}/man1/gpspipe.1* |
267 |
%{_mandir}/man1/lcdgps.1.* |
%{_mandir}/man1/lcdgps.1.* |
268 |
%{_mandir}/man1/xgpsspeed.1* |
%{_mandir}/man1/xgpsspeed.1* |
269 |
#%{_datadir}/X11/app-defaults/xgpsspeed |
%{_datadir}/applications/xgps.desktop |
270 |
%{_datadir}/applications/mandriva-%{name}-clients.desktop |
%{_datadir}/applications/xgpsspeed.desktop |
271 |
|
%{_datadir}/gpsd/gpsd-logo.png |
272 |
|
|
273 |
%files python |
%files python |
274 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
275 |
%{py_platsitedir}/* |
%{py_platsitedir}/* |
|
|
|
|
|
|