yggdrasil/yggdrasil.spec

75 lines
1.9 KiB
RPMSpec
Raw Normal View History

2022-01-27 19:13:39 +00:00
%bcond_without check
# https://github.com/redhatinsights/yggdrasil
%global goipath github.com/redhatinsights/yggdrasil
2023-03-07 17:49:51 +00:00
Version: 0.3.1
%global tag 0.3.1
2022-01-27 19:13:39 +00:00
2023-03-07 17:49:51 +00:00
%gometa -f
2022-01-27 19:13:39 +00:00
%global common_description %{expand:
2023-03-07 17:49:51 +00:00
yggdrasil is a system daemon that subscribes to topics on an MQTT broker and
routes any data received on the topics to an appropriate child "worker" process,
exchanging data with its worker processes through a D-Bus message broker.}
2022-01-27 19:13:39 +00:00
%global golicenses LICENSE
2023-03-07 17:49:51 +00:00
%global godocs CONTRIBUTING.md README.md
2022-01-27 19:13:39 +00:00
Name: yggdrasil
2023-03-07 17:49:51 +00:00
Release: %autorelease
Summary: Remote data transmission and processing client
2022-01-27 19:13:39 +00:00
2023-03-07 17:49:51 +00:00
License: GPL-3.0-only
2022-01-27 19:13:39 +00:00
URL: %{gourl}
2023-03-07 17:49:51 +00:00
Source: %{gosource}
2022-01-27 19:13:39 +00:00
BuildRequires: systemd-rpm-macros
2023-03-07 17:49:51 +00:00
BuildRequires: meson
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(bash-completion)
2022-01-27 19:13:39 +00:00
2023-03-07 17:49:51 +00:00
%description %{common_description}
2022-01-27 19:13:39 +00:00
2023-03-07 17:49:51 +00:00
%gopkg
2022-01-27 19:13:39 +00:00
%prep
%goprep
2023-03-07 17:49:51 +00:00
%autopatch -p1
2022-01-27 19:13:39 +00:00
2023-03-07 17:49:51 +00:00
%generate_buildrequires
%go_generate_buildrequires
2022-01-27 19:13:39 +00:00
%build
2023-03-07 17:49:51 +00:00
%undefine _auto_set_build_flags
export %gomodulesmode
%{?gobuilddir:export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"}
%meson "-Dgobuildflags=[%(echo %{expand:%gocompilerflags} | sed -e s/"^"/"'"/ -e s/" "/"', '"/g -e s/"$"/"'"/), '-tags', '"rpm_crashtraceback\ ${BUILDTAGS:-}"', '-a', '-v', '-x']" -Dgoldflags='%{?currentgoldflags} -B 0x%(head -c20 /dev/urandom|od -An -tx1|tr -d " \n") -compressdwarf=false -linkmode=external -extldflags "%{build_ldflags} %{?__golang_extldflags}"'
%meson_build
2022-01-27 19:13:39 +00:00
%install
2023-03-07 17:49:51 +00:00
%meson_install
%gopkginstall
2022-01-27 19:13:39 +00:00
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
2023-03-07 17:49:51 +00:00
%doc CONTRIBUTING.md README.md
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name}
2022-01-27 19:13:39 +00:00
%{_unitdir}/*
2023-03-07 17:49:51 +00:00
%{_userunitdir}/*
2022-01-27 19:13:39 +00:00
%{_datadir}/bash-completion/completions/*
2023-03-07 17:49:51 +00:00
%{_datadir}/dbus-1/{interfaces,system-services,system.d}/*
%{_datadir}/doc/%{name}/*
2022-01-27 19:13:39 +00:00
%{_mandir}/man1/*
2023-03-07 17:49:51 +00:00
%gopkgfiles
2022-01-27 19:13:39 +00:00
%changelog
2023-03-07 17:49:51 +00:00
%autochangelog