mirror of
https://abf.rosa.ru/djam/docker-containerd.git
synced 2025-02-23 22:32:50 +00:00
65 lines
1.6 KiB
RPMSpec
65 lines
1.6 KiB
RPMSpec
%define debug_package %{nil}
|
|
|
|
%define oname containerd
|
|
|
|
Summary: A daemon to control runC
|
|
Name: docker-containerd
|
|
Version: 1.2.8
|
|
Release: 2
|
|
License: ASL 2.0
|
|
Group: System/Kernel and hardware
|
|
Url: http://www.docker.com
|
|
Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
|
|
Patch0: fix-run-docker-containerd-path.patch
|
|
BuildRequires: glibc-static-devel
|
|
BuildRequires: golang
|
|
BuildRequires: btrfs-devel
|
|
BuildRequires: pkgconfig(libseccomp)
|
|
Requires: opencontainers-runc
|
|
|
|
%description
|
|
Containerd is a daemon with an API and a command line client, to manage
|
|
containers on one machine.
|
|
|
|
It uses runC to run containers according to the OCI specification.
|
|
Containerd has advanced features such as seccomp and user namespace
|
|
support as well as checkpoint and restore for cloning and live migration
|
|
of containers.
|
|
|
|
%files
|
|
%doc *.md LICENSE NOTICE
|
|
%{_bindir}/*
|
|
%{_presetdir}/86-%{oname}.preset
|
|
%{_unitdir}/%{oname}.service
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{oname}-%{version}
|
|
%patch0 -p1
|
|
|
|
%build
|
|
mv vendor src
|
|
ln -s $(pwd) src/github.com/%{oname}/%{oname}
|
|
export GOPATH=$(pwd)
|
|
%make
|
|
|
|
%install
|
|
# install binary
|
|
install -d %{buildroot}%{_bindir}
|
|
install -p -m 755 bin/* %{buildroot}%{_bindir}
|
|
|
|
# install systemd/init scripts
|
|
install -d %{buildroot}%{_unitdir}
|
|
sed -e 's,/usr/local,%{_prefix},g' %{oname}.service > %{buildroot}%{_unitdir}/%{oname}.service
|
|
|
|
install -d %{buildroot}%{_presetdir}
|
|
cat > %{buildroot}%{_presetdir}/86-%{oname}.preset << EOF
|
|
enable %{oname}.service
|
|
EOF
|
|
|
|
# Docker expects stuff to be named its way...
|
|
cd %{buildroot}%{_bindir}
|
|
for i in *; do
|
|
ln -sf $i docker-$i
|
|
done
|