nebula/nebula.spec

84 lines
2.0 KiB
RPMSpec
Raw Normal View History

2022-06-03 17:54:17 +00:00
# Generated by go2rpm 1.6.0
%bcond_without check
2022-06-03 17:54:17 +00:00
# https://github.com/slackhq/nebula
%global goipath github.com/slackhq/nebula
2022-10-10 12:58:02 +00:00
Version: 1.6.1
2022-06-03 17:54:17 +00:00
%gometa
%global goname nebula
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 17:54:17 +00:00
%global golicenses LICENSE
%global godocs examples AUTHORS README.md CHANGELOG.md
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 17:54:17 +00:00
License: MIT
URL: %{gourl}
Source0: %{gosource}
2022-06-03 17:54:17 +00:00
BuildRequires: systemd-rpm-macros
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 17:54:17 +00:00
%gopkg
2022-06-03 17:54:17 +00:00
%prep
%goprep
# https://github.com/slackhq/nebula/pull/791
sed -i 's/\(Wants=.*\)$/\1 nss-lookup.target/' dist/fedora/nebula.service
2022-06-03 17:54:17 +00:00
%generate_buildrequires
%go_generate_buildrequires
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 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}
install -m 0644 -vDp dist/fedora/nebula.service %{buildroot}%{_unitdir}/%{name}.service
2022-06-03 17:54:17 +00:00
%if %{with check}
%check
%gocheck
%endif
2022-06-03 17:54:17 +00:00
%post
%systemd_post nebula.service
2022-06-03 17:54:17 +00:00
%preun
%systemd_preun nebula.service
2022-06-03 17:54:17 +00:00
%postun
%systemd_postun_with_restart nebula.service
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 17:54:17 +00:00
%gopkgfiles
2022-06-03 17:54:17 +00:00
%changelog
%autochangelog