Unify the build with RHEL
There's no need to do a build just for this.
This commit is contained in:
parent
a8b4975b5c
commit
2f6e2b7cfe
18
toolbox.spec
18
toolbox.spec
@ -17,6 +17,9 @@ Summary: Tool for containerized command line environments on Linux
|
||||
License: ASL 2.0
|
||||
URL: https://containertoolbx.org/
|
||||
Source0: https://github.com/containers/%{name}/releases/download/%{version}/%{name}-%{version}-vendored.tar.xz
|
||||
%if 0%{?rhel}
|
||||
Source1: %{name}.conf
|
||||
%endif
|
||||
|
||||
# Upstream
|
||||
Patch0: toolbox-Don-t-use-podman-1-when-generating-the-comp.patch
|
||||
@ -25,6 +28,9 @@ Patch1: toolbox-Sprinkle-a-debug-log.patch
|
||||
# Fedora specific
|
||||
Patch100: toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch
|
||||
Patch101: toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch
|
||||
%if 0%{?rhel}
|
||||
Patch102: toolbox-Add-migration-paths-for-coreos-toolbox-users.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: go-md2man
|
||||
@ -169,6 +175,10 @@ The %{name}-tests package contains system tests for %{name}.
|
||||
%patch101 -p1
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%patch102 -p1
|
||||
%endif
|
||||
|
||||
%gomkdir -s %{_builddir}/%{extractdir}/src %{?rhel:-k}
|
||||
|
||||
|
||||
@ -178,9 +188,13 @@ export GOPATH=%{gobuilddir}:%{gopath}
|
||||
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
%meson \
|
||||
%if 0%{?rhel}
|
||||
-Dmigration_path_for_coreos_toolbox=true \
|
||||
%endif
|
||||
-Dprofile_dir=%{_sysconfdir}/profile.d \
|
||||
-Dtmpfiles_dir=%{_tmpfilesdir} \
|
||||
-Dzsh_completions_dir=%{_datadir}/zsh/site-functions
|
||||
|
||||
%meson_build
|
||||
|
||||
|
||||
@ -191,6 +205,10 @@ export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_
|
||||
%install
|
||||
%meson_install
|
||||
|
||||
%if 0%{?rhel}
|
||||
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
|
||||
|
Loading…
Reference in New Issue
Block a user