%define debug_package %{nil} %define import_path github.com/opencontainers/runc %define pre rc10 Summary: CLI for running Open Containers Name: runc Version: 1.0.0 Release: 0.%{pre}.1 Epoch: 1 License: ASL 2.0 Group: System/Kernel and hardware Url: https://github.com/opencontainers/runc Source0: https://github.com/opencontainers/runc/archive/%{name}-%{version}-%{pre}.tar.gz Patch0: 1807.patch BuildRequires: go-md2man BuildRequires: golang BuildRequires: git BuildRequires: glibc-static-devel BuildRequires: pkgconfig(libseccomp) # need xz to work with ubuntu images # https://bugzilla.redhat.com/show_bug.cgi?id=1045220 Requires: xz # https://bugzilla.redhat.com/show_bug.cgi?id=1034919 # No longer needed in Fedora because of libcontainer Requires: libcgroup Requires: e2fsprogs Requires: iptables %rename opencontainers-runc %description The runc command can be used to start containers which are packaged in accordance with the Open Container Initiative's specifications, and to manage containers running under runc. %files %{_bindir}/%{name} %{_bindir}/docker-%{name} %{_mandir}/man8/%{name}* %{_datadir}/bash-completion/completions/%{name} #---------------------------------------------------------------- %prep %setup -qn %{name}-%{version}-%{pre} %patch0 -p1 %build mkdir -p GOPATH pushd GOPATH mkdir -p src/github.com/opencontainers ln -s $(dirs +1 -l) src/%{import_path} popd pushd GOPATH/src/%{import_path} export GOPATH=%{_builddir}:$(pwd)/GOPATH make BUILDTAGS="seccomp selinux" all sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name} popd %install install -d -p %{buildroot}%{_bindir} install -p -m 755 %{name} %{buildroot}%{_bindir} # generate man pages man/md2man-all.sh # install man pages install -d -p %{buildroot}%{_mandir}/man8 install -p -m 0644 man/man8/*.8 %{buildroot}%{_mandir}/man8/. # install bash completion install -d -p %{buildroot}%{_datadir}/bash-completion/completions install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions ln -s %{name} %{buildroot}%{_bindir}/docker-%{name}