%if 0%{?fedora} || 0%{?rhel} >= 9 %global scons scons %else %global scons scons-3 %endif Name: gpsd-latest Version: 3.25 Release: 2%{?dist} Epoch: 1 Summary: Service daemon for mediating access to a GPS License: BSD-2-Clause URL: https://gpsd.gitlab.io/gpsd/index.html Source0: https://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-%{version}.tar.gz Source11: gpsd.sysconfig BuildRequires: dbus-devel BuildRequires: dbus-glib-devel BuildRequires: ncurses-devel BuildRequires: xmlto BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: gtk3-devel BuildRequires: python3-scons BuildRequires: python3-gobject BuildRequires: python3-cairo BuildRequires: python3-pyserial BuildRequires: desktop-file-utils BuildRequires: bluez-libs-devel BuildRequires: pps-tools-devel BuildRequires: /usr/bin/c++ BuildRequires: systemd %ifnarch s390 s390x BuildRequires: libusb1-devel %endif 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. This package is intended to follow the latest upstream release. No devel package is provided for other applications to use the libgps library. %package libs Summary: Client libraries in C for talking to a running gpsd or GPS Conflicts: gpsd-libs%{?_isa} < %{epoch}:%{version}-%{release} %description libs This package contains the gpsd libraries that manage access to a GPS for applications. This package is intended to follow the latest upstream release. No devel package is provided for other applications to use the libgps library. %package -n python3-%{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 python3-%{name} This package contains the python3 modules that manage access to a GPS for applications. %package clients Summary: Clients for gpsd Requires: python3-%{name} = %{epoch}:%{version}-%{release} Requires: python3-pyserial Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} %description clients This package contains various clients using gpsd. %prep %setup -q -n gpsd-%{version} # don't try reloading systemd when installing in the build root sed -i 's|systemctl daemon-reload|true|' SConscript iconv -f iso8859-1 -t utf8 NEWS > NEWS_ && mv NEWS_ NEWS %build export CCFLAGS="%{optflags}" # scons ignores LDFLAGS. LINKFLAGS partially work (some flags like # -spec=... are filtered) export LINKFLAGS="%{__global_ldflags}" # breaks with %%{_smp_mflags} %{scons} \ dbus_export=yes \ systemd=yes \ libQgpsmm=no \ debug=yes \ leapfetch=no \ prefix="" \ sysconfdif=%{_sysconfdir} \ bindir=%{_bindir} \ includedir=%{_includedir} \ libdir=%{_libdir} \ sbindir=%{_sbindir} \ mandir=%{_mandir} \ mibdir=%{_docdir}/gpsd \ 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 # avoid rebuilding export CCFLAGS="%{optflags}" 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} # Remove shebang and fix permissions sed -i '/^#!.*python/d' %{buildroot}%{python3_sitearch}/gps/{aio,}gps.py chmod 644 %{buildroot}%{python3_sitearch}/gps/gps.py rm -f %{buildroot}%{_libdir}/libgpsdpacket.so # If qt build was disabled, clean up the files that may have been installed # anyway rm -f %{buildroot}%{_libdir}/libQgpsmm* \ %{buildroot}%{_libdir}/pkgconfig/Qgpsmm* \ %{buildroot}%{_mandir}/man3/libQgpsmm.3* 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 %files %doc README.adoc NEWS %license COPYING %config(noreplace) %{_sysconfdir}/sysconfig/gpsd %{_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.30* %exclude %{_libdir}/libgps.so %exclude %{_libdir}/pkgconfig/libgps.pc %exclude %{_includedir}/gps.h %exclude %{_includedir}/libgpsmm.h %exclude %{_mandir}/man3/libgps.3* %exclude %{_mandir}/man3/libgpsmm.3* %exclude %{_mandir}/man5/gpsd_json.5* %files -n python3-%{name} %{_libdir}/libgpsdpacket.so.* %{python3_sitearch}/gps* %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 * Thu May 11 2023 Miroslav Lichvar - 1:3.25-2 - fix issues reported by rpmlint * Tue May 9 2023 Miroslav Lichvar - 1:3.25-1 - initial release for EPEL based on Fedora gpsd package