2022-06-03 17:54:17 +00:00
|
|
|
# Generated by go2rpm 1.6.0
|
|
|
|
%bcond_without check
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
# https://github.com/slackhq/nebula
|
|
|
|
%global goipath github.com/slackhq/nebula
|
2023-06-18 07:34:49 +00:00
|
|
|
Version: 1.7.2
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2023-06-18 07:56:20 +00:00
|
|
|
%gometa -f
|
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%global goname nebula
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%global common_description %{expand:
|
|
|
|
A scalable overlay networking tool with a focus on performance, simplicity and
|
|
|
|
security.}
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%global golicenses LICENSE
|
|
|
|
%global godocs examples AUTHORS README.md CHANGELOG.md
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
Name: %{goname}
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: A scalable overlay networking tool with a focus on performance, simplicity and security
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
License: MIT
|
|
|
|
URL: %{gourl}
|
|
|
|
Source0: %{gosource}
|
2023-08-04 13:13:15 +00:00
|
|
|
Source1: nebula.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-04 06:57:48 +00:00
|
|
|
# Let's be sure that people do not upgrade from the "old" nebula. We can sensibly drop it by F39
|
|
|
|
Conflicts: nebula < 1.0
|
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%description
|
|
|
|
%{common_description}
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%gopkg
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%prep
|
|
|
|
%goprep
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%go_generate_buildrequires
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%build
|
|
|
|
export LDFLAGS="-X main.Build=%{version}-Fedora $(LDFLAGS)"
|
|
|
|
for cmd in cmd/* ; do
|
|
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
|
|
done
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%install
|
|
|
|
%gopkginstall
|
|
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
|
install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name}
|
|
|
|
install -m 0640 -vp examples/config.yml %{buildroot}%{_sysconfdir}/%{name}
|
2023-08-04 13:13:15 +00:00
|
|
|
install -m 0644 -vDp %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%gocheck
|
|
|
|
%endif
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%post
|
|
|
|
%systemd_post nebula.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%preun
|
|
|
|
%systemd_preun nebula.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart nebula.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/config.yml
|
|
|
|
%doc examples AUTHORS README.md CHANGELOG.md
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_unitdir}/%{name}.service
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%gopkgfiles
|
2022-06-03 06:11:32 +00:00
|
|
|
|
2022-06-03 17:54:17 +00:00
|
|
|
%changelog
|
|
|
|
%autochangelog
|