"Initial commit to Gerrit"
[profile/ivi/gpsd.git] / packaging / rpm / gpsd.spec.in
1 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
2
3 Name: gpsd
4 Version: @VERSION@
5 Release: 3%{?dist}
6 Summary: Service daemon for mediating access to a GPS
7
8 Group: System Environment/Daemons
9 License: BSD
10 URL: http://developer.berlios.de/projects/gpsd/
11 Source0: http://download.berlios.de/gpsd/%{name}-%{version}.tar.gz
12 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13
14 BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python-devel
15 BuildRequires: libXaw-devel desktop-file-utils
16 BuildRequires: qt-devel
17
18 Requires: udev
19 Requires(post): /sbin/ldconfig
20 Requires(post): /sbin/chkconfig
21 Requires(preun): initscripts
22 Requires(preun): /sbin/chkconfig
23 Requires(postun): /sbin/ldconfig
24
25 %description 
26 gpsd is a service daemon that mediates access to a GPS sensor
27 connected to the host computer by serial or USB interface, making its
28 data on the location/course/velocity of the sensor available to be
29 queried on TCP port 2947 of the host computer.  With gpsd, multiple
30 GPS client applications (such as navigational and wardriving software)
31 can share access to a GPS without contention or loss of data.  Also,
32 gpsd responds to queries with a format that is substantially easier to
33 parse than NMEA 0183.  
34
35 %package devel
36 Summary: Client libraries in C and Python for talking to a running gpsd or GPS
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
39 Requires: pkgconfig
40
41 %description devel
42 This package provides C header files and python modules for the gpsd shared 
43 libraries that manage access to a GPS for applications
44
45 %package -n libQgpsmm
46 Summary: Qt Client libraries for talking to a running gpsd or GPS
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: qt
50 Requires: pkgconfig
51
52 %description -n libQgpsmm
53 This package provides Qt shared libraries that manage access to a GPS
54 for Qt applications
55
56 %package clients
57 Summary: Clients for gpsd
58 Group: Applications/System
59
60 %description clients
61 xgps is a simple test client for gpsd with an X interface. It displays
62 current GPS position/time/velocity information and (for GPSes that
63 support the feature) the locations of accessible satellites.
64
65 xgpsspeed is a speedometer that uses position information from the GPS.
66 It accepts an -h option and optional argument as for gps, or a -v option
67 to dump the package version and exit. Additionally, it accepts -rv
68 (reverse video) and -nc (needle color) options.
69
70 cgps resembles xgps, but without the pictorial satellite display.  It
71 can run on a serial terminal or terminal emulator.
72
73 %prep
74 %setup -q
75
76 %build
77 %configure \
78         --enable-dbus \
79         --disable-static
80 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
81 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
82
83 make %{?_smp_mflags}
84
85 %install
86 rm -rf %{buildroot}
87 make DESTDIR=%{buildroot} pythondir=%{python_sitearch} install
88
89 # init scripts
90 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/init.d
91 %{__install} -p -m 0755 packaging/rpm/gpsd.init \
92         %{buildroot}%{_sysconfdir}/init.d/gpsd
93
94 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
95 %{__install} -p -m 0644 packaging/rpm/gpsd.sysconfig \
96         %{buildroot}%{_sysconfdir}/sysconfig/gpsd
97
98 # udev rules
99 %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/udev/rules.d
100 %{__install} -p -m 0644 gpsd.rules \
101         %{buildroot}%{_sysconfdir}/udev/rules.d/99-gpsd.rules
102
103 # hotplug script
104 %{__install} -d -m 0755 %{buildroot}/lib/udev
105 %{__install} -p -m 0755 gpsd.hotplug gpsd.hotplug.wrapper \
106         %{buildroot}/lib/udev
107
108 # remove .la files
109 rm -f %{buildroot}%{_libdir}/libgps*.la
110
111 # fix non-executable python script
112 %{__chmod} +x %{buildroot}%{python_sitearch}/gps/gps.py
113
114 # Install the .desktop files
115 desktop-file-install --vendor fedora \
116         --dir %{buildroot}%{_datadir}/applications \
117         --add-category X-Fedora \
118         packaging/X11/xgps.desktop
119 desktop-file-install --vendor fedora \
120         --dir %{buildroot}%{_datadir}/applications \
121         --add-category X-Fedora \
122         packaging/X11/xgpsspeed.desktop
123
124 # Install logo icon for .desktop files
125 %{__install} -d -m 0755 %{buildroot}%{_datadir}/gpsd
126 %{__install} -p -m 0644 packaging/X11/gpsd-logo.png %{buildroot}%{_datadir}/gpsd/gpsd-logo.png
127
128 %clean
129 rm -rf %{buildroot}
130
131 %post
132 /sbin/ldconfig
133 /sbin/chkconfig --add %{name}
134
135 %preun
136 if [ $1 = 0 ]; then
137         /sbin/service %{name} stop > /dev/null 2>&1 || true
138         /sbin/chkconfig --del %{name}
139 fi
140
141 %postun -p /sbin/ldconfig
142
143 %files
144 %defattr(-,root,root,-)
145 %doc README INSTALL COPYING
146 %config(noreplace) %{_sysconfdir}/init.d/%{name}
147 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
148 %config(noreplace) %{_sysconfdir}/udev/rules.d/*
149 %{_sbindir}/gpsd
150 %{_bindir}/gpsprof
151 %{_bindir}/gpsmon
152 %{_bindir}/gpsctl
153 %{_libdir}/libgps*.so.*
154 /lib/udev/gpsd*
155 %{python_sitearch}/gps*
156 %exclude %{python_sitearch}/gps/fake*
157 %{_mandir}/man8/gpsd.8*
158 %{_mandir}/man1/gpsprof.1*
159 %{_mandir}/man1/gpsmon.1*
160 %{_mandir}/man1/gpsctl.1*
161
162 %files devel
163 %defattr(-,root,root,-)
164 %doc TODO
165 %{_bindir}/gpsfake
166 %{_libdir}/libgps*.so
167 %{_libdir}/pkgconfig/*.pc
168 %{python_sitearch}/gps/fake*
169 %{_includedir}/gps.h
170 %{_includedir}/libgpsmm.h
171 %{_includedir}/gpsd.h
172 %{_mandir}/man1/gpsfake.1*
173 %{_mandir}/man3/libgps.3*
174 %{_mandir}/man3/libgpsmm.3*
175 %{_mandir}/man3/libgpsd.3*
176 %{_mandir}/man5/rtcm-104.5*
177 %{_mandir}/man5/srec.5*
178
179 %files -n libQgpsmm
180 %defattr(-,root,root,-)
181 %{_qt4_libdir}/libQgpsmm.so*
182
183 %files clients
184 %defattr(-,root,root,-)
185 %{_bindir}/cgps
186 %{_bindir}/gpscat
187 %{_bindir}/gpsdecode
188 %{_bindir}/gpspipe
189 %{_bindir}/gpxlogger
190 %{_bindir}/lcdgps
191 %{_bindir}/xgps
192 %{_bindir}/xgpsspeed
193 %{_mandir}/man1/gps.1*
194 %{_mandir}/man1/gpsdecode.1*
195 %{_mandir}/man1/gpspipe.1*
196 %{_mandir}/man1/lcdgps.1*
197 %{_mandir}/man1/xgps.1*
198 %{_mandir}/man1/xgpsspeed.1*
199 %{_mandir}/man1/cgps.1*
200 %{_mandir}/man1/gpscat.1*
201 %{_datadir}/applications/*.desktop
202 %dir %{_datadir}/gpsd
203 %{_datadir}/gpsd/gpsd-logo.png
204
205 %changelog
206 * Mon Jul 05 2010 Michael R. Davis <mrdvt@cpan.org> - 2.95-3
207 - Updated to move rpm files to packaging/rpm folder
208 - Renamed gpsd-qt to libQgpsmm
209
210 * Sun Jul 04 2010 Michael R. Davis <mrdvt@cpan.org> - 2.95-2
211 - missing X11/app-defaults/xgpsspeed
212
213 * Sat Jul 03 2010 Michael R. Davis <mrdvt@cpan.org> - 2.95-1
214 - back ported spec to gpsd from Fedora 14
215 - updated to 2.95
216 - added gpsd-qt package
217
218 * Thu May 06 2010 Miroslav Lichvar <mlichvar@redhat.com> - 2.94-1
219 - update to 2.94 (#556642)
220
221 * Tue Mar 02 2010 Miroslav Lichvar <mlichvar@redhat.com> - 2.39-7
222 - don't use deprecated SYSFS{} in udev rules (#569089)
223 - fix init script LSB compliance
224
225 * Mon Feb 15 2010 Miroslav Lichvar <mlichvar@redhat.com> - 2.39-6
226 - fix linking with --no-add-needed (#564662)
227 - use %%global macro instead of %%define
228
229 * Wed Aug 12 2009 Marek Mahut <mmahut@fedoraproject.org> - 2.39-5
230 - RHBZ#505588: gpsd has a broken initscript that fails to launch daemon
231
232 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.39-4
233 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
234
235 * Tue Mar 31 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.39-3
236 - some of the gpsd client bits went into gpsdclient.h, but that file wasn't getting installed
237   specifically, viking needs that header to build. 
238
239 * Wed Mar 25 2009 Douglas E. Warner <silfreed@silfreed.net> - 2.39-2
240 - adding patch to try to fix parallel make errors
241
242 * Thu Mar 19 2009 Douglas E. Warner <silfreed@silfreed.net> - 2.39-1
243 - updating to 2.39
244 - fixed potential core dump in C client handling of "K" responses
245 - Made device hotplugging work again; had been broken by changes in udev
246 - Introduced major and minor API version symbols into the public interfaces
247 - The sirfmon utility is gone, replaced by gpsmon which does the same job
248   for multiple GPS types
249 - Fixed a two-year old error in NMEA parsing that nobody noticed because its
250   only effect was to trash VDOP values from GSA sentences, and gpsd computes
251   those with an internal error model when they look wonky
252 - cgpxlogger has been merged into gpxlogger
253 - Speed-setting commands now allow parity and stop-bit setting if the GPS
254   chipset and adaptor can support it
255 - Specfile and other packaging paraphenalia now live in a packaging
256   subdirectory
257 - rtcmdecode becomes gpsdecode and can now de-armor and dump AIDVM packets
258 - The client library now work correctly in locales where the decimal separator
259   is not a period
260
261 * Mon Mar 16 2009 Douglas E. Warner <silfreed@silfreed.net> - 2.38-1
262 - updating to 2.38
263 - creating init script and sysconfig files
264 - migrating hotplug rules to udev + hotplug wrapper script from svn r5147
265 - updating pyexecdir patch
266 - fixing udev rule subsystem match
267 - Regression test load for RoyalTek RGM3800 and Blumax GPS-009 added
268 - Scaling on E error-estimate fields fixed to match O
269 - Listen on localhost only by default to avoid security problems; this can be
270   overridden with the -G command-line option
271 - The packet-state machine can now recognize RTCM3 packets, though support is
272   not yet complete
273 - Added support for ublox5 and mkt-3301 devices
274 - Add a wrapper around gpsd_hexdump to save CPU
275 - Lots of little fixes to various packet parsers
276 - Always keep the device open: "-n" is not optional any more
277 - xgpsspeed no longer depends on Motif
278 - gpsctl can now ship arbitrary payloads to a device; 
279   It's possible to send binary through the control channel with the
280   new "&" command
281 - Experimental new driver for Novatel SuperStarII
282 - The 'g' mode switch command now requires, and returns, 'rtcm104v2' rather
283   than 'rtcm104'; this is design forward for when RTCM104v2 is fully working
284
285 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.37-4
286 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
287
288 * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.37-3
289 - Rebuild for Python 2.6
290
291 * Wed Mar 19 2008 Douglas E. Warner <silfreed@silfreed.net> - 2.37-2
292 - moving gpspacket.so python lib to main package
293
294 * Wed Feb 27 2008 Douglas E. Warner <silfreed@silfreed.net> - 2.37-1
295 - update to 2.37
296 - removed install-gpsd_config.h.patch
297 - installed pkgconfig files in devel package
298 - added patch to install python modules in sitearch
299 - removing rpath from inclucded libtool
300 - moving X11 app-defaults to datadir
301 - using macros for commands in install; using install instead of cp and mkdir
302 - cleaning up spaces/tabs for rpmlint
303
304 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.34-9
305 - Autorebuild for GCC 4.3
306
307 * Sun Aug 19 2007 Matthew Truch <matt at truch.net> - 2.34-8
308 - Patch Makefile to also install gpsd_config.h as needed by
309   libgpsmm.h.  Redhat BZ 253433.
310
311 * Sat Jun 30 2007 Matthew Truch <matt at truch.net> - 2.34-7
312 - Make sure the logo is actually included (via the spec file).
313   I need to wake up before I try even trivial updates.  
314
315 * Sat Jun 30 2007 Matthew Truch <matt at truch.net> - 2.34-6
316 - Learn how to use search and replace (aka fix all instances of
317   gpsd-logo.png spelled incorrectly as gspd-logo.png).
318
319 * Sat Jun 30 2007 Matthew Truch <matt at truch.net> - 2.34-5
320 - Fix desktop file and logo file name.
321
322 * Sat Jun 30 2007 Matthew Truch <matt at truch.net> - 2.34-4
323 - Include icon for .desktop files per BZ 241428
324
325 * Tue Mar 20 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.34-3
326 - Bump release for FE5 -> Fedora 7 upgrade path.
327
328 * Tue Feb 27 2007 Matthew Truch <matt at truch.net> - 2.34-2
329 - BR python-devel instead of python to make it build.  
330
331 * Tue Feb 27 2007 Matthew Truch <matt at truch.net> - 2.34-1
332 - Upgrade to 2.34.
333 - Get rid of %%makeinstall (which was never needed).
334 - Possibly fix hotplug issuses (BZ 219750).
335 - Use %%python_sitelib for python site-files stuff.
336
337 * Sat Dec 9 2006 Matthew Truch <matt at truch.net> - 2.33-6
338 - Rebuild to pull in new version of python.
339
340 * Tue Sep 26 2006 Matthew Truch <matt at truch.net> - 2.33-5
341 - Remove openmotif requirment, and switch to lesstif.
342
343 * Mon Aug 28 2006 Matthew Truch <matt at truch.net> - 2.33-4
344 - Bump release for rebuild in prep. for FC6.
345
346 * Thu Jul 20 2006 Matthew Truch <matt at truch.net> - 2.33-3
347 - Actually, was a missing BR glib-dbus-devel. Ooops.
348
349 * Thu Jul 20 2006 Matthew Truch <matt at truch.net> - 2.33-2
350 - Missing BR glib-devel
351
352 * Thu Jul 20 2006 Matthew Truch <matt at truch.net> - 2.33-1
353 - Update to version 2.33
354
355 * Wed Apr 19 2006 Matthew Truch <matt at truch.net> - 2.32-5
356 - Don't --enable-tnt in build as it causes some gpses to not work
357   properly with sattelite view mode.  See bugzilla bug 189220.
358
359 * Thu Apr 13 2006 Matthew Truch <matt at truch.net> - 2.32-4
360 - Add dbus-glib to BuildRequires as needed for build.
361
362 * Sun Apr 9 2006 Matthew Truch <matt at truch.net> - 2.32-3
363 - Include xmlto and python in buildrequires so things build right.
364 - Don't package static library file.  
365
366 * Wed Apr 5 2006 Matthew Truch <matt at truch.net> - 2.32-2
367 - Use ye olde %%{?dist} tag.
368
369 * Wed Apr 5 2006 Matthew Truch <matt at truch.net> - 2.32-1
370 - Initial Fedora Extras specfile