mirror of
https://abf.rosa.ru/djam/netavark.git
synced 2025-02-23 14:02:56 +00:00
1.10.3
This commit is contained in:
parent
60ee75ea7c
commit
322e13b9d5
1 changed files with 26 additions and 23 deletions
|
@ -1,19 +1,20 @@
|
|||
%define debug %nil
|
||||
%define debug_package %{nil}
|
||||
%define _libexecdir %{_prefix}/libexec
|
||||
%define rustver 1.70.0
|
||||
%define rustver 1.77.2
|
||||
|
||||
#define __cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' %{_bindir}/cargo
|
||||
|
||||
Name: netavark
|
||||
Version: 1.10.3
|
||||
Release: 1
|
||||
License: ASL-2.0 AND BSD-3-Clause AND MIT
|
||||
License: ASL 2.0 & BSD-3-Clause & MIT
|
||||
Summary: OCI network stack
|
||||
URL: https://github.com/containers/%{name}
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
|
||||
Group: Development/Other
|
||||
BuildRequires: go-md2man
|
||||
#Requires: aardvark-dns >= %{epoch}:%{major_minor}
|
||||
#Provides: container-network-stack = 2
|
||||
BuildRequires: make
|
||||
BuildRequires: curl
|
||||
|
@ -22,10 +23,10 @@ BuildRequires: protobuf-compiler
|
|||
BuildRequires: git-core
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%if %{mdvver} > 201610
|
||||
BuildRequires: rust
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust >= 1.77.0
|
||||
BuildRequires: cargo
|
||||
%endif
|
||||
|
||||
Recommends: aardvark-dns
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
|
@ -58,46 +59,48 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\
|
|||
%endif
|
||||
|
||||
|
||||
%if !%{defined copr_username}
|
||||
tar fx %{SOURCE1}
|
||||
mkdir -p .cargo
|
||||
tar -xf %{SOURCE1}
|
||||
mkdir -p $HOME/.cargo
|
||||
|
||||
cat >.cargo/config << EOF
|
||||
cat >$HOME/.cargo/config << EOF
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
directory = "$PWD/vendor"
|
||||
EOF
|
||||
%endif
|
||||
|
||||
%build
|
||||
export CARGO_HOME=$HOME/.cargo
|
||||
export RUSTC_BOOTSTRAP=1
|
||||
export RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn'
|
||||
|
||||
|
||||
%if %{mdvver} <= 201610
|
||||
source "$HOME/.cargo/env"
|
||||
%endif
|
||||
|
||||
#{__make} CARGO="%{__cargo}" build
|
||||
%make build
|
||||
|
||||
cd docs
|
||||
#{__make}
|
||||
%make
|
||||
%make PREFIX=%{_prefix} docs
|
||||
|
||||
%install
|
||||
#{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
|
||||
%makeinstall
|
||||
%makeinstall DESTDIR=%{buildroot} PREFIX=%{_prefix} SYSTEMDDIR=%{_unitdir}
|
||||
|
||||
%post
|
||||
%systemd_post %{name}-dhcp-proxy.service
|
||||
%systemd_post %{name}-firewalld-reload.service
|
||||
|
||||
%preun
|
||||
%systemd_preun %{name}-dhcp-proxy.service
|
||||
%systemd_preun %{name}-firewalld-reload.service
|
||||
|
||||
%postun
|
||||
%systemd_postun %{name}-dhcp-proxy.service
|
||||
%systemd_postun %{name}-firewalld-reload.service
|
||||
%systemd_postun_with_restart %{name}-dhcp-proxy.service
|
||||
%systemd_postun_with_restart %{name}-firewalld-reload.service
|
||||
|
||||
|
||||
%files
|
||||
%doc LICENSE
|
||||
#dir %{_libexecdir}/podman
|
||||
%doc README.md LICENSE
|
||||
%{_libexecdir}/podman/%{name}*
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%{_unitdir}/%{name}-dhcp-proxy.service
|
||||
|
|
Loading…
Add table
Reference in a new issue