internalize scons (RHEL-14750)

Add scons to sources and use it for building instead of requiring a
system package.

Resolves: RHEL-14750
This commit is contained in:
Miroslav Lichvar 2024-02-20 15:56:27 +01:00
parent 75e324c9e3
commit 73ceac881f
3 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@
/gpsd-3.23.1.tar.gz
/gpsd-3.24.tar.gz
/gpsd-3.25.tar.gz
/scons-4.6.0.tar.gz

View File

@ -7,6 +7,9 @@
%global with_qt 1
%endif
%global scons_ver 4.6.0
%global scons python3 scons-%{scons_ver}/scripts/scons.py
Name: gpsd
Version: 3.25
Release: 10%{?dist}
@ -16,6 +19,8 @@ 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/%{name}-%{version}.tar.gz
# used only for building
Source1: https://github.com/SCons/scons/archive/%{scons_ver}/scons-%{scons_ver}.tar.gz
Source11: gpsd.sysconfig
# add missing IPv6 support
@ -141,7 +146,7 @@ package split. It will be removed after one distribution release cycle, please
do not reference it or depend on it in any way.
%prep
%setup -q
%setup -q -a 1
%patch -P 1 -p1 -b .ipv6
%patch -P 2 -p1 -b .scanfixes
%patch -P 3 -p1 -b .busywait
@ -158,7 +163,7 @@ export CCFLAGS="%{optflags}"
export LINKFLAGS="%{__global_ldflags}"
# breaks with %%{_smp_mflags}
scons \
%{scons} \
dbus_export=yes \
systemd=yes \
%if %{with_qt}
@ -192,7 +197,7 @@ scons \
export CCFLAGS="%{optflags}"
export LINKFLAGS="%{__global_ldflags}"
DESTDIR=%{buildroot} scons install systemd_install udev-install
DESTDIR=%{buildroot} %{scons} install systemd_install udev-install
# use the old name for udev rules
mv %{buildroot}%{_udevrulesdir}/{25,99}-gpsd.rules

View File

@ -1 +1,2 @@
SHA512 (gpsd-3.25.tar.gz) = 0684cbd30defa1a328898589e1d61b2431462a774aff56c588bd00c1fbd92ac94cf6fc1f2b981debac78c34ab09fa24f48ed6334f3ecd09e6b8f5faa92ae1085
SHA512 (scons-4.6.0.tar.gz) = d7dd30bbc94ec014b12b37a106aa536dd5c8b16e9f1605b68cad6721cf6e3959add1f75a42693fd8499734ca19eb76f648800d7cc8081fe334282841cd406954