use vendor library
This commit is contained in:
parent
2690f0f2ef
commit
1336484181
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/nebula-1.5.2.tar.gz
|
/nebula-1.5.2.tar.gz
|
||||||
/nebula-1.6.0.tar.gz
|
/nebula-1.6.0.tar.gz
|
||||||
/nebula-1.6.1.tar.gz
|
/nebula-1.6.1.tar.gz
|
||||||
|
/nebula-vendor-1.6.1.tar.gz
|
||||||
|
25
nebula.spec
25
nebula.spec
@ -22,8 +22,11 @@ Summary: A scalable overlay networking tool with a focus on performance,
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: %{gourl}
|
URL: %{gourl}
|
||||||
Source0: %{gosource}
|
Source0: %{gosource}
|
||||||
|
Source1: %{name}-vendor-%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: go-rpm-macros
|
||||||
|
BuildRequires: compiler(go-compiler)
|
||||||
|
|
||||||
# Let's be sure that people do not upgrade from the "old" nebula. We can sensibly drop it by F39
|
# Let's be sure that people do not upgrade from the "old" nebula. We can sensibly drop it by F39
|
||||||
Conflicts: nebula < 1.0
|
Conflicts: nebula < 1.0
|
||||||
@ -34,23 +37,41 @@ Conflicts: nebula < 1.0
|
|||||||
%gopkg
|
%gopkg
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%if 0%{?fedora}
|
||||||
%goprep
|
%goprep
|
||||||
# https://github.com/slackhq/nebula/pull/791
|
# https://github.com/slackhq/nebula/pull/791
|
||||||
sed -i 's/\(Wants=.*\)$/\1 nss-lookup.target time-sync.target/' dist/fedora/nebula.service
|
sed -i 's/\(Wants=.*\)$/\1 nss-lookup.target time-sync.target/' dist/fedora/nebula.service
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%go_generate_buildrequires
|
%go_generate_buildrequires
|
||||||
|
|
||||||
|
%else
|
||||||
|
%autosetup -a 1
|
||||||
|
mkdir -p %{_builddir}/src/github.com/slackhq/
|
||||||
|
cp -r %{_builddir}/%{name}-%{version} %{_builddir}/src/github.com/slackhq/%{name}
|
||||||
|
mkdir -p %{_builddir}/%{name}-%{version}/_build/src/github.com/slackhq/nebula
|
||||||
|
mv %{_builddir}/src %{_builddir}/%{name}-%{version}/_build/src
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export LDFLAGS="-X main.Build=%{version}-Fedora $(LDFLAGS)"
|
export LDFLAGS="-X main.Build=%{version}-Fedora $(LDFLAGS)"
|
||||||
|
%if 0%{?fedora}
|
||||||
for cmd in cmd/* ; do
|
for cmd in cmd/* ; do
|
||||||
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
||||||
done
|
done
|
||||||
|
%else
|
||||||
|
export GOPATH="%{_builddir}/%{name}-%{version}/_build"
|
||||||
|
pushd $GOPATH/src/github.com/slackhq/nebula
|
||||||
|
go generate
|
||||||
|
popd
|
||||||
|
for cmd in cmd/* ; do
|
||||||
|
%gobuild -o bin/$(basename $cmd) %{goipath}/$cmd
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%gopkginstall
|
%gopkginstall
|
||||||
install -m 0755 -vd %{buildroot}%{_bindir}
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
||||||
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
install -m 0755 -vp bin/* %{buildroot}%{_bindir}/
|
||||||
install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name}
|
install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name}
|
||||||
install -m 0640 -vp examples/config.yml %{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
|
install -m 0644 -vDp dist/fedora/nebula.service %{buildroot}%{_unitdir}/%{name}.service
|
||||||
|
1
sources
1
sources
@ -1 +1,2 @@
|
|||||||
SHA512 (nebula-1.6.1.tar.gz) = 751777c9955bae2f2a2f6f81e1956c131766d7dead3d51fd125e2804d20073a80ed4739ff336f1c2da04e060eaa20d1aa7c2bd9268661eae0fcd26e13cb43cfb
|
SHA512 (nebula-1.6.1.tar.gz) = 751777c9955bae2f2a2f6f81e1956c131766d7dead3d51fd125e2804d20073a80ed4739ff336f1c2da04e060eaa20d1aa7c2bd9268661eae0fcd26e13cb43cfb
|
||||||
|
SHA512 (nebula-vendor-1.6.1.tar.gz) = 63fb94b5478fc5cf5d155bec04e5bf6e8d9187719166a8a4f7c7ff2cae772fdf531a2168781339e5b19decce202ec9fcf623ab7543a7e4831bce57ff21c7c9a2
|
||||||
|
Loading…
Reference in New Issue
Block a user