summaryrefslogtreecommitdiff
path: root/gpsd.spec.in
blob: be3d42cbfa5732edb431da04cd5f1ecf3e6fbd4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
Name: gpsd
%define SO3VERSION	2.0.0
%define SO1VERSION	2
Summary: service daemon for mediating access to a GPS
Version: @VERSION@
Release: 1
License: GPL
Group: System Environment/Daemons
Provides: gpsd
URL: http://developer.berlios.de/projects/gpsd/
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
#Destinations: mailto:gpsd-announce@lists.berlios.de, mailto:gpsd-users@lists.berlios.de, mailto:gpsd-dev@lists.berlios.de

%description 
gpsd is a service daemon that mediates access to a GPS sensor
connected to the host computer by serial or USB interface, making its
data on the location/course/velocity of the sensor available to be
queried on TCP port 2947 of the host computer.  With gpsd, multiple
GPS client applications (such as navigational and wardriving software) 
can share access to a GPS without contention or loss of data.  Also,
gpsd responds to queries with a format that is substantially easier
to parse than NMEA 0183.

After installing this RPM, gpsd will try to start up at boot time.
You must make a symlink named /dev/gps to the serial or USB port that
your GPS will plug in to.  Normally this will be /dev/ttyUSB0 or
/dev/ttyS0.  The daemon will be quiescent when there are no clients
asking for location information, and copes gracefully when the GPS is
unplugged.

%package -n gpsd-devel
Summary: Client libraries in C and Python for talking to a running gpsd or GPS.
Group: Development/Libraries
Requires: gpsd

%description -n gpsd-devel
This package provides C libraries and Python modules that manage
access to a GPS for applications.  You will need to have gpsd installed
for it to work.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
# gpsd files
mkdir -p "$RPM_BUILD_ROOT"%{_sbindir}
cp .libs/gpsd "$RPM_BUILD_ROOT"%{_sbindir}
mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
cp .libs/gps .libs/xgpsspeed gpsprobe "$RPM_BUILD_ROOT"%{_bindir}
mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man1/
cp gpsd.1 gpsprobe.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/
mkdir -p "$RPM_BUILD_ROOT"/etc/init.d/
cp gpsd.init "$RPM_BUILD_ROOT"/etc/init.d/gpsd
# gpsd-devel files
mkdir -p "$RPM_BUILD_ROOT"%{_libdir}/
cp .libs/libgps.la "$RPM_BUILD_ROOT"%{_libdir}
cp .libs/libgps.so.%{SO3VERSION} "$RPM_BUILD_ROOT"%{_libdir}
ln -f "$RPM_BUILD_ROOT"%{_libdir}/libgps.so.%{SO3VERSION} "$RPM_BUILD_ROOT"%{_libdir}/libgps.so.%{SO1VERSION}
ln -f "$RPM_BUILD_ROOT"%{_libdir}/libgps.so.%{SO3VERSION} "$RPM_BUILD_ROOT"%{_libdir}/libgps.so
mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man3/
cp libgps.3 "$RPM_BUILD_ROOT"%{_mandir}/man3/
cp libgpsd.3 "$RPM_BUILD_ROOT"%{_mandir}/man3/
mkdir -p "$RPM_BUILD_ROOT"%{_includedir}
cp gpsd.h "$RPM_BUILD_ROOT"%{_includedir}
cp gps.h "$RPM_BUILD_ROOT"%{_includedir}
PYVERS=`python -c "import sys; print sys.version[:3]"`
mkdir -p "$RPM_BUILD_ROOT"%{_libdir}/python${PYVERS}/site-packages
cp gps.py gpsd.py "$RPM_BUILD_ROOT"%{_libdir}/python${PYVERS}/site-packages
mkdir -p "$RPM_BUILD_ROOT"%{_libdir}/X11/app-defaults/
cp gps.ad "$RPM_BUILD_ROOT"%{_libdir}/X11/app-defaults/gps
cp xgpsspeed.ad "$RPM_BUILD_ROOT"%{_libdir}/X11/app-defaults/xgpsspeed

%clean
[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"

%post -n gpsd
/sbin/chkconfig --add gpsd
/sbin/chkconfig gpsd on
/sbin/ldconfig

%preun -n gpsd
/sbin/chkconfig --del gpsd

%postun -n gpsd
/sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc README INSTALL COPYING gpsd.xml TODO
%defattr(-,root,root,-)
%attr(755, root, root) %{_sbindir}/gpsd
%attr(755, root, root) %{_bindir}/gps
%attr(755, root, root) %{_bindir}/xgpsspeed
%attr(755, root, root) %{_bindir}/gpsprobe
%{_libdir}/libgps.so.%{SO3VERSION}
%{_libdir}/libgps.so.%{SO1VERSION}
%{_mandir}/man1/gpsd.1*
%{_mandir}/man1/gpsprobe.1*
%{_mandir}/man3/libgps.3*
%{_mandir}/man3/libgpsd.3*
%attr(755, root, root) %{_sysconfdir}/init.d/gpsd
%{_libdir}/X11/app-defaults/gps
%{_libdir}/X11/app-defaults/xgpsspeed

%files -n gpsd-devel
%doc README INSTALL COPYING libgps.xml libgpsd.xml HACKING
%{_libdir}/libgps.la
%{_libdir}/libgps.so
%{_includedir}/gps.h
%{_includedir}/gpsd.h
%{_libdir}/python*/site-packages/gps.py
%{_libdir}/python*/site-packages/gpsd.py

%changelog
* Thu Sep 30 2004 Eric S. Raymond <esr@snark.thyrsus.com> - @VERSION@-1
  Documentation improvements.

* Thu Sep 30 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.1-1
- Various internal cleanups, including fossil removal in the
  configuration machinery.  FV-18, Tripmate, Earthmate and are now
  enabled but can be disable with --disable-$NAME at configure time.
  When you call configure with --disable-shared, libgps is linked
  statically to the binaries (native libs are still linked
  shared). Fixed buggy handling of -p option in gps.c and xgpsspeed.c;
  it's now an optional command-line argument.

* Thu Sep 16 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.0-1
- Packaging fixes for 2.0 release.

* Wed Sep  8 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.98-1
- Only do one getdtablesize() call, otherwise we do several
  getrlimits() each poll cycle.  TripMate is working.  gpsprobe now
  deduces NMEA version.  Zodiac Earthmate seems to work.

* Wed Sep 08 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.97-1
  Removed PRWIZCH support (it still passes through in raw mode).
  Build Motif-dependent programs conditionally.  Added gpsprobe.
  Fixed a brown-paper-bag-bug in 1.96 RPM packaging.

* Tue Aug 31 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.96-1
- Implemented non-blocking writes to clients, so a stalled client
  cannot stall gpsd.  Fixed a nasty array-overrun bug.  Timestamps
  are now in ISO8601 format, with sub-second precision if the GPS
  delivers that.  First cuts at Python interfaces included.  libgps.a
  interface now bundles session fd into an allocated session block.
  Automake-based build machinery from Jens Oberender; RPM now
  installs shared libraries.  FV18 driver added. Offline timer in GPS.

* Wed Aug 25 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.95-1
- Fixed broken 'make dist', missing display.c and Tachometer.c 
  are in there now.

* Tue Aug 24 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.94-1
- Fix embarrassing bug -- watcher mode did not work for more than one
  client at a time.  Y command now carries information about which 
  satellites were used in the last fix.  New timeout mechanism, no
  longer dependent on FIONREAD.

* Mon Aug 23 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.93-1
- Fourth prerelease. Daemon-side timeouts are gone, they complicated
  the interface without adding anything.  Command responses now 
  contain ? to tag invalid data. -D2 feature of 1.92 backed out.

* Sun Aug 22 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.92-1
- Third prerelease.  Clients in watcher mode now get notified when
  the GPS goes online or offline.  Major name changes -- old libgps
  is new libgpsd and vice-versa (so the high-level interface is more
  prominent).  Specfile now includes code to install gpsd so it will
  be started at boot time.  -D2 now causes command error messages
  to be echoed to the client.

* Sat Aug 21 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.91-1
- Second pre-2.0 release.  Features a linkable C library that hides the 
  details of communicating with the daemon.  The daemon now recovers
  gracefully from having the GPS unplugged and plugged in at any time;
  one of the bits of status it can report is whether the GPS is online.
  The gps and xgpsspeed clients now query the daemon; their code 
  for direct access to the serial port has been deliberately removed.

* Sun Aug 15 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.90
- Creation of specfile.

# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:rpm-spec-mode
# End: