* Make compilation work on gcc-go only systems (ppc and s390).
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/runc?expand=0&rev=2
This commit is contained in:
parent
3ecd3b8405
commit
45aa94d4dc
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 21 12:04:59 UTC 2016 - asarai@suse.de
|
||||||
|
|
||||||
|
* Make compilation work on gcc-go only systems (ppc and s390).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 21 08:24:02 UTC 2016 - asarai@suse.de
|
Mon Mar 21 08:24:02 UTC 2016 - asarai@suse.de
|
||||||
|
|
||||||
|
27
runc.spec
27
runc.spec
@ -15,6 +15,15 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%define go_arches %ix86 x86_64
|
||||||
|
%ifarch %go_arches
|
||||||
|
%define go_tool go
|
||||||
|
%define GO_BUILD_FLAGS ""
|
||||||
|
%else
|
||||||
|
%define go_tool go-5
|
||||||
|
%define GO_BUILD_FLAGS "-gccgoflags=-Wl,--add-needed -Wl,--no-as-needed -static-libgo -ldl -lseccomp -lselinux -lapparmor"
|
||||||
|
%endif
|
||||||
|
|
||||||
%define version_unconverted 0.0.9
|
%define version_unconverted 0.0.9
|
||||||
|
|
||||||
Name: runc
|
Name: runc
|
||||||
@ -26,7 +35,11 @@ Group: System/Management
|
|||||||
Url: https://github.com/opencontainers/runc
|
Url: https://github.com/opencontainers/runc
|
||||||
Source: %{name}-%{version}.tar.xz
|
Source: %{name}-%{version}.tar.xz
|
||||||
Patch0: seccomp-use-pkg-config.patch
|
Patch0: seccomp-use-pkg-config.patch
|
||||||
|
%ifarch %go_arches
|
||||||
BuildRequires: go >= 1.5
|
BuildRequires: go >= 1.5
|
||||||
|
%else
|
||||||
|
BuildRequires: gcc5-go >= 5.0
|
||||||
|
%endif
|
||||||
BuildRequires: libapparmor-devel
|
BuildRequires: libapparmor-devel
|
||||||
BuildRequires: libseccomp-devel
|
BuildRequires: libseccomp-devel
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
@ -44,12 +57,20 @@ and has grown to become a separate project entirely.
|
|||||||
%patch0 -p1 -d Godeps/_workspace/src/github.com/seccomp/libseccomp-golang
|
%patch0 -p1 -d Godeps/_workspace/src/github.com/seccomp/libseccomp-golang
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# TODO: Add support for gcc-go.
|
# Create buildir,
|
||||||
|
export GOPATH=$PWD/go
|
||||||
|
mkdir -pv $GOPATH/src/github.com/opencontainers/
|
||||||
|
|
||||||
|
# Copy the vendor directory into the GOPATH.
|
||||||
|
cp -rv $PWD/Godeps/_workspace/src/* $GOPATH/src/
|
||||||
|
ln -svfn $PWD $GOPATH/src/github.com/opencontainers/runc
|
||||||
|
|
||||||
|
# Build all features.
|
||||||
export BUILDTAGS="seccomp apparmor selinux"
|
export BUILDTAGS="seccomp apparmor selinux"
|
||||||
make BUILDTAGS="$BUILDTAGS" all
|
%go_tool build -tags "$BUILDTAGS" -x -o %{name}-%{version} %GO_BUILD_FLAGS
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__install} -D -m755 %{name} %{buildroot}/%{_bindir}/%{name}
|
%{__install} -D -m755 %{name}-%{version} %{buildroot}/%{_bindir}/%{name}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user