SHA256
1
0
forked from pool/runc

* Small updates to method of compilation to better match Makefile.

OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/runc?expand=0&rev=3
This commit is contained in:
Aleksa Sarai 2016-03-27 10:15:05 +00:00 committed by Git OBS Bridge
parent 45aa94d4dc
commit b67aa431ac
2 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Mar 27 10:14:32 UTC 2016 - asarai@suse.de
* Small updates to method of compilation to better match Makefile.
-------------------------------------------------------------------
Mon Mar 21 12:04:59 UTC 2016 - asarai@suse.de

View File

@ -18,7 +18,7 @@
%define go_arches %ix86 x86_64
%ifarch %go_arches
%define go_tool go
%define GO_BUILD_FLAGS ""
%define GO_BUILD_FLAGS %{nil}
%else
%define go_tool go-5
%define GO_BUILD_FLAGS "-gccgoflags=-Wl,--add-needed -Wl,--no-as-needed -static-libgo -ldl -lseccomp -lselinux -lapparmor"
@ -58,16 +58,20 @@ and has grown to become a separate project entirely.
%build
# Create buildir,
export GOPATH=$PWD/go
export GOPATH=$PWD/Godeps/_workspace
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"
%go_tool build -tags "$BUILDTAGS" -x -o %{name}-%{version} %GO_BUILD_FLAGS
export BUILDTAGS="apparmor selinux"
# Seccomp isn't supported on aarch64.
%ifnarch aarch64
export BUILDTAGS="$BUILDTAGS seccomp"
%endif
# Build runc.
%go_tool build %GO_BUILD_FLAGS -tags "$BUILDTAGS" -x -o %{name}-%{version} github.com/opencontainers/%{name}
%install
%{__install} -D -m755 %{name}-%{version} %{buildroot}/%{_bindir}/%{name}