/
crun.spec
66 lines (57 loc) · 1.79 KB
/
crun.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Name: crun
Summary: OCI Container Runtime fully written in C
Version: 0.16
Release: 1
Source0: https://github.com/containers/crun/archive/%{version}/%{name}-%{version}.tar.gz
# Those are pulled in with "git submodule" in upstream git
# (tpg) sounds like these are not needed anymore
%if 0
Source1: https://github.com/giuseppe/libocispec/archive/5dfe2f406dc2d0f244aec621292e4e0a52149240.tar.gz
Source2: https://github.com/opencontainers/image-spec/archive/79b036d80240ae530a8de15e1d21c7ab9292c693.tar.gz
Source3: https://github.com/opencontainers/runtime-spec/archive/f9c09b4ea1dfa7379d70df3c30d6efa346c225d4.tar.gz
%endif
Group: Servers
License: GPLv3+/LGPLv3+
BuildRequires: pkgconfig(yajl)
BuildRequires: pkgconfig(libseccomp)
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: gperf
# Only for man page, might be worth excluding from bootstrap builds
BuildRequires: go-md2man
# Let's turn crun into a drop-in replacement for runc
Obsoletes: runc < 2:1.0.0-240
Provides: runc = 2:1.0.0-240
%description
A fast and low-memory footprint OCI Container Runtime fully written in C.
crun conforms to the OCI Container Runtime specifications
(https://github.com/opencontainers/runtime-spec).
%prep
%autosetup -p1
%if 0
rmdir libocispec
cd libocispec
rmdir image-spec runtime-spec
tar xf %{S:2}
tar xf %{S:3}
mv image-spec-* image-spec
mv runtime-spec-* runtime-spec
cd ..
%endif
autoreconf -fis
%configure
sed -i '/git-version.h/d' src/crun.c
sed -i -e 's,GIT_VERSION,"%{version}-%{release}",g' src/crun.c
%build
%make_build
%install
%make_install
# No point in shipping a static library if the headers
# aren't installed...
rm %{buildroot}%{_libdir}/*.a
ln -s crun %{buildroot}%{_bindir}/runc
%files
%{_bindir}/crun
%{_bindir}/runc
%{_mandir}/man1/crun.1*