Init package
This commit is contained in:
parent
9785b29a0f
commit
ff25735ce6
BIN
gpsd-3.24.tar.gz
Normal file
BIN
gpsd-3.24.tar.gz
Normal file
Binary file not shown.
16
gpsd-apistatus.patch
Normal file
16
gpsd-apistatus.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/include/gps.h b/include/gps.h
|
||||||
|
index 55b9aa621..e5935304d 100644
|
||||||
|
--- a/include/gps.h
|
||||||
|
+++ b/include/gps.h
|
||||||
|
@@ -173,6 +173,11 @@ struct gps_fix_t {
|
||||||
|
* PPS is the encrypted military P(Y)-code */
|
||||||
|
#define STATUS_PPS_FIX 9
|
||||||
|
|
||||||
|
+// Old status names for compatibility
|
||||||
|
+#define STATUS_NO_FIX STATUS_UNK
|
||||||
|
+#define STATUS_FIX STATUS_GPS
|
||||||
|
+#define STATUS_DGPS_FIX STATUS_DGPS
|
||||||
|
+
|
||||||
|
double ept; // Expected time uncertainty, seconds
|
||||||
|
double latitude; // Latitude in degrees (valid if mode >= 2)
|
||||||
|
double epy; // Latitude position uncertainty, meters
|
||||||
12
gpsd-soname.patch
Normal file
12
gpsd-soname.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up gpsd-3.24/SConscript.soname gpsd-3.24/SConscript
|
||||||
|
--- gpsd-3.24/SConscript.soname 2022-05-04 15:50:30.809931444 +0200
|
||||||
|
+++ gpsd-3.24/SConscript 2022-05-04 16:15:14.022203240 +0200
|
||||||
|
@@ -221,7 +221,7 @@ api_version_major = 3
|
||||||
|
api_version_minor = 15
|
||||||
|
|
||||||
|
# client library version
|
||||||
|
-libgps_version_current = 29
|
||||||
|
+libgps_version_current = 291
|
||||||
|
libgps_version_revision = 1
|
||||||
|
libgps_version_age = 0
|
||||||
|
libgps_version = "%d.%d.%d" % (libgps_version_current, libgps_version_age,
|
||||||
302
gpsd.spec
Normal file
302
gpsd.spec
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
%global _hardened_build 1
|
||||||
|
|
||||||
|
%global with_qt 1
|
||||||
|
|
||||||
|
Name: gpsd
|
||||||
|
Version: 3.24
|
||||||
|
Release: 1
|
||||||
|
Epoch: 1
|
||||||
|
Summary: Service daemon for mediating access to a GPS
|
||||||
|
|
||||||
|
License: BSD
|
||||||
|
URL: http://catb.org/gpsd/
|
||||||
|
Source0: https://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
|
||||||
|
Source11: gpsd.sysconfig
|
||||||
|
# Compatibility patch
|
||||||
|
Patch1: gpsd-apistatus.patch
|
||||||
|
Patch2: gpsd-soname.patch
|
||||||
|
|
||||||
|
BuildRequires: dbus-devel
|
||||||
|
BuildRequires: dbus-glib-devel
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: xmlto
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: gtk3-devel
|
||||||
|
BuildRequires: python-scons
|
||||||
|
BuildRequires: python3-gobject
|
||||||
|
BuildRequires: python-cairo
|
||||||
|
BuildRequires: python3-pyserial
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
BuildRequires: bluez-libs-devel
|
||||||
|
BuildRequires: pps-tools-devel
|
||||||
|
BuildRequires: /usr/bin/c++
|
||||||
|
BuildRequires: systemd
|
||||||
|
%if %{with_qt}
|
||||||
|
BuildRequires: qt-devel
|
||||||
|
%endif
|
||||||
|
BuildRequires: libusb1-devel
|
||||||
|
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
Requires: udev
|
||||||
|
%{?systemd_requires}
|
||||||
|
|
||||||
|
%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 war-driving 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.
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: Client libraries in C for talking to a running gpsd or GPS
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
This package contains the gpsd libraries that manage access
|
||||||
|
to a GPS for applications.
|
||||||
|
|
||||||
|
%package -n python-%{name}
|
||||||
|
Summary: Python libraries and modules for use with gpsd
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
|
|
||||||
|
%description -n python-%{name}
|
||||||
|
This package contains the python3 modules that manage access to a GPS for
|
||||||
|
applications.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for the gpsd library
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package provides C header files for the gpsd shared libraries that
|
||||||
|
manage access to a GPS for applications
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%package qt
|
||||||
|
Summary: C++/Qt5 bindings for the gpsd library
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description qt
|
||||||
|
This package provide C++ and Qt bindings for use with the libgps library from
|
||||||
|
gpsd.
|
||||||
|
|
||||||
|
%package qt-devel
|
||||||
|
Summary: Development files for the C++/Qt5 bindings for the gpsd library
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
Requires: %{name}-qt%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description qt-devel
|
||||||
|
This package provides the development files for the C++ and Qt bindings for use
|
||||||
|
with the libgps library from gpsd.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package clients
|
||||||
|
Summary: Clients for gpsd
|
||||||
|
Requires: python-%{name} = %{epoch}:%{version}-%{release}
|
||||||
|
Requires: python-pyserial
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description clients
|
||||||
|
This package contains various clients using gpsd.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch1 -p1 -b .apistatus
|
||||||
|
%patch2 -p1 -b .soname
|
||||||
|
|
||||||
|
sed -i 's|systemctl daemon-reload|true|' SConscript
|
||||||
|
|
||||||
|
%build
|
||||||
|
%ifarch riscv64
|
||||||
|
export CCFLAGS="%{optflags} -Wno-format-security"
|
||||||
|
%else
|
||||||
|
export CCFLAGS="%{optflags}"
|
||||||
|
%endif
|
||||||
|
export LINKFLAGS="%{__global_ldflags}"
|
||||||
|
|
||||||
|
# breaks with %{_smp_mflags}
|
||||||
|
scons \
|
||||||
|
dbus_export=yes \
|
||||||
|
systemd=yes \
|
||||||
|
%if %{with_qt}
|
||||||
|
libQgpsmm=yes \
|
||||||
|
%else
|
||||||
|
libQgpsmm=no \
|
||||||
|
%endif
|
||||||
|
debug=yes \
|
||||||
|
leapfetch=no \
|
||||||
|
prefix="" \
|
||||||
|
sysconfdif=%{_sysconfdir} \
|
||||||
|
bindir=%{_bindir} \
|
||||||
|
includedir=%{_includedir} \
|
||||||
|
libdir=%{_libdir} \
|
||||||
|
sbindir=%{_sbindir} \
|
||||||
|
mandir=%{_mandir} \
|
||||||
|
docdir=%{_docdir}/gpsd \
|
||||||
|
pkgconfigdir=%{_libdir}/pkgconfig \
|
||||||
|
icondir=%{_datadir}/gpsd \
|
||||||
|
udevdir=$(dirname %{_udevrulesdir}) \
|
||||||
|
unitdir=%{_unitdir} \
|
||||||
|
target_python=python3 \
|
||||||
|
python_shebang=%{python3} \
|
||||||
|
python_libdir=%{python3_sitearch} \
|
||||||
|
build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%ifarch riscv64
|
||||||
|
export CCFLAGS="%{optflags} -Wno-format-security"
|
||||||
|
%else
|
||||||
|
export CCFLAGS="%{optflags}"
|
||||||
|
%endif
|
||||||
|
export LINKFLAGS="%{__global_ldflags}"
|
||||||
|
|
||||||
|
DESTDIR=%{buildroot} scons install systemd_install udev-install
|
||||||
|
|
||||||
|
# use the old name for udev rules
|
||||||
|
mv %{buildroot}%{_udevrulesdir}/{25,99}-gpsd.rules
|
||||||
|
|
||||||
|
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
|
%{__install} -p -m 0644 %{SOURCE11} \
|
||||||
|
%{buildroot}%{_sysconfdir}/sysconfig/gpsd
|
||||||
|
|
||||||
|
# Install the .desktop files
|
||||||
|
desktop-file-install \
|
||||||
|
--dir %{buildroot}%{_datadir}/applications \
|
||||||
|
packaging/X11/xgps.desktop
|
||||||
|
desktop-file-install \
|
||||||
|
--dir %{buildroot}%{_datadir}/applications \
|
||||||
|
packaging/X11/xgpsspeed.desktop
|
||||||
|
|
||||||
|
# Missed in scons install
|
||||||
|
%{__install} -p -m 0755 gpsinit %{buildroot}%{_sbindir}
|
||||||
|
|
||||||
|
# If qt build was disabled, clean up the files that may have been installed
|
||||||
|
# anyway
|
||||||
|
%if !%{with_qt}
|
||||||
|
%{__rm} -f %{buildroot}%{_libdir}/libQgpsmm* \
|
||||||
|
%{buildroot}%{_libdir}/pkgconfig/Qgpsmm* \
|
||||||
|
%{buildroot}%{_mandir}/man3/libQgpsmm.3*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{_docdir}/gpsd
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post gpsd.service gpsd.socket
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun gpsd.service gpsd.socket
|
||||||
|
|
||||||
|
%postun
|
||||||
|
# Don't restart the service
|
||||||
|
%systemd_postun gpsd.service gpsd.socket
|
||||||
|
|
||||||
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%ldconfig_scriptlets qt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README.adoc NEWS
|
||||||
|
%license COPYING
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||||
|
%{_sbindir}/gpsd
|
||||||
|
%{_sbindir}/gpsdctl
|
||||||
|
%{_sbindir}/gpsinit
|
||||||
|
%{_bindir}/gpsmon
|
||||||
|
%{_bindir}/gpsctl
|
||||||
|
%{_bindir}/ntpshmmon
|
||||||
|
%{_bindir}/ppscheck
|
||||||
|
%{_unitdir}/gpsd.service
|
||||||
|
%{_unitdir}/gpsd.socket
|
||||||
|
%{_unitdir}/gpsdctl@.service
|
||||||
|
%{_udevrulesdir}/*.rules
|
||||||
|
%{_mandir}/man8/gpsd.8*
|
||||||
|
%{_mandir}/man8/gpsdctl.8*
|
||||||
|
%{_mandir}/man8/gpsinit.8*
|
||||||
|
%{_mandir}/man8/ppscheck.8*
|
||||||
|
%{_mandir}/man1/gpsmon.1*
|
||||||
|
%{_mandir}/man1/gpsctl.1*
|
||||||
|
%{_mandir}/man1/ntpshmmon.1*
|
||||||
|
|
||||||
|
%files libs
|
||||||
|
%{_libdir}/libgps.so.29*
|
||||||
|
|
||||||
|
%files -n python-%{name}
|
||||||
|
%{_libdir}/libgpsdpacket.so*
|
||||||
|
%{python3_sitearch}/gps*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc TODO HACKING
|
||||||
|
%{_libdir}/libgps.so
|
||||||
|
%{_libdir}/pkgconfig/libgps.pc
|
||||||
|
%{_includedir}/gps.h
|
||||||
|
%{_includedir}/libgpsmm.h
|
||||||
|
%{_mandir}/man3/libgps.3*
|
||||||
|
%{_mandir}/man3/libgpsmm.3*
|
||||||
|
%{_mandir}/man5/gpsd_json.5*
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%files qt
|
||||||
|
%{_libdir}/libQgpsmm.so.29*
|
||||||
|
|
||||||
|
%files qt-devel
|
||||||
|
%{_libdir}/libQgpsmm.so
|
||||||
|
%{_libdir}/libQgpsmm.prl
|
||||||
|
%{_libdir}/pkgconfig/Qgpsmm.pc
|
||||||
|
%{_mandir}/man3/libQgpsmm.3*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files clients
|
||||||
|
%{_bindir}/cgps
|
||||||
|
%{_bindir}/gegps
|
||||||
|
%{_bindir}/gps2udp
|
||||||
|
%{_bindir}/gpscat
|
||||||
|
%{_bindir}/gpscsv
|
||||||
|
%{_bindir}/gpsdebuginfo
|
||||||
|
%{_bindir}/gpsdecode
|
||||||
|
%{_bindir}/gpspipe
|
||||||
|
%{_bindir}/gpsplot
|
||||||
|
%{_bindir}/gpsprof
|
||||||
|
%{_bindir}/gpsrinex
|
||||||
|
%{_bindir}/gpssnmp
|
||||||
|
%{_bindir}/gpssubframe
|
||||||
|
%{_bindir}/gpxlogger
|
||||||
|
%{_bindir}/lcdgps
|
||||||
|
%{_bindir}/xgps
|
||||||
|
%{_bindir}/xgpsspeed
|
||||||
|
%{_bindir}/gpsfake
|
||||||
|
%{_bindir}/ubxtool
|
||||||
|
%{_bindir}/zerk
|
||||||
|
%{_mandir}/man1/gegps.1*
|
||||||
|
%{_mandir}/man1/gps.1*
|
||||||
|
%{_mandir}/man1/gps2udp.1*
|
||||||
|
%{_mandir}/man1/gpscsv.1*
|
||||||
|
%{_mandir}/man1/gpsdebuginfo.1*
|
||||||
|
%{_mandir}/man1/gpsdecode.1*
|
||||||
|
%{_mandir}/man1/gpspipe.1*
|
||||||
|
%{_mandir}/man1/gpsplot.1*
|
||||||
|
%{_mandir}/man1/gpsprof.1*
|
||||||
|
%{_mandir}/man1/gpsrinex.1*
|
||||||
|
%{_mandir}/man1/gpssnmp.1*
|
||||||
|
%{_mandir}/man1/gpssubframe.1*
|
||||||
|
%{_mandir}/man1/gpxlogger.1*
|
||||||
|
%{_mandir}/man1/lcdgps.1*
|
||||||
|
%{_mandir}/man1/xgps.1*
|
||||||
|
%{_mandir}/man1/xgpsspeed.1*
|
||||||
|
%{_mandir}/man1/cgps.1*
|
||||||
|
%{_mandir}/man1/gpscat.1*
|
||||||
|
%{_mandir}/man1/gpsfake.1*
|
||||||
|
%{_mandir}/man1/ubxtool.1*
|
||||||
|
%{_mandir}/man1/zerk.1*
|
||||||
|
%{_datadir}/applications/*.desktop
|
||||||
|
%dir %{_datadir}/gpsd
|
||||||
|
%{_datadir}/gpsd/gpsd-logo.png
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jul 15 2022 misaka00251 <misaka00251@misakanet.cn> - 1:3.24-1
|
||||||
|
- Init package
|
||||||
4
gpsd.sysconfig
Normal file
4
gpsd.sysconfig
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Options for gpsd, including serial devices
|
||||||
|
OPTIONS=""
|
||||||
|
# Set to 'true' to add USB devices automatically via udev
|
||||||
|
USBAUTO="true"
|
||||||
Loading…
x
Reference in New Issue
Block a user