]> git.pld-linux.org Git - packages/criu.git/blame - criu.spec
Release 4 (by relup.sh)
[packages/criu.git] / criu.spec
CommitLineData
63f40716
JP
1# TODO
2# - package static libs
3# /usr/lib/compel/fds.lib.a
4# /usr/lib/compel/scripts/compel-pack.lds.S
5# /usr/lib/compel/std.lib.a
6# /usr/lib64/libcompel.a
7# /usr/lib64/libcriu.a
a9349246
ER
8#
9# Conditional build:
10%bcond_with tests # build and run tests (requires root)
11
e769518e
JB
12Summary: Checkpoint/restore functionality for Linux in userspace
13Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
6be8c1d2 14Name: criu
9f1a25f7 15Version: 3.16
9bd6ad23 16Release: 4
1d80f334 17License: GPL v2 (tools), LGPL v2.1 (library)
6be8c1d2
AM
18Group: Applications/System
19Source0: http://download.openvz.org/criu/%{name}-%{version}.tar.bz2
9f1a25f7 20# Source0-md5: f355b7eb8f4037d6b87b201815df7d7a
1d80f334 21Patch0: %{name}-python.patch
a9349246 22Patch1: tests.patch
6be8c1d2 23URL: http://criu.org/
6e51e7f7 24BuildRequires: asciidoc
9f1a25f7
JP
25BuildRequires: gnutls-devel
26BuildRequires: libbpf-devel
27BuildRequires: libbsd-devel
6e51e7f7 28BuildRequires: libcap-devel
63f40716 29BuildRequires: libnet-devel
6e51e7f7 30BuildRequires: libnl-devel >= 1:3.2
9f1a25f7
JP
31BuildRequires: libselinux-devel
32BuildRequires: nftables-devel
6e51e7f7 33BuildRequires: pkgconfig
6e51e7f7 34BuildRequires: protobuf
7a48cad9 35BuildRequires: protobuf-c-devel
6e51e7f7 36BuildRequires: protobuf-devel
9f1a25f7
JP
37BuildRequires: python3
38BuildRequires: python3-modules
6e51e7f7 39BuildRequires: rpm-pythonprov
151b49e7 40BuildRequires: rpmbuild(macros) >= 2.007
7a8067bd 41BuildRequires: sed >= 4.0
aa51aa10 42Requires: %{name}-libs = %{version}-%{release}
db5fa3a6
ER
43Requires: iproute2 >= 3.5
44Requires: uname(release) >= 3.11
151b49e7 45ExclusiveArch: %{x8664} %{armv7} %{armv8} aarch64 ppc64
6be8c1d2
AM
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
a27aad5c
ER
48%define _libexecdir %{_prefix}/lib
49
6be8c1d2 50%description
7a8067bd
ER
51Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
52operating system. Using this tool, you can freeze a running
53application (or part of it) and checkpoint it to a hard drive as a
54collection of files. You can then use the files to restore and run the
55application from the point it was frozen at. The distinctive feature
56of the CRIU project is that it is mainly implemented in user space.
57
58%description -l en.UTF-8
6be8c1d2
AM
59Checkpoint/Restore In Userspace, or CRIU (pronounced kree-oo, IPA:
60/krɪʊ/, Russian: криу), is a software tool for Linux operating system.
61Using this tool, you can freeze a running application (or part of it)
62and checkpoint it to a hard drive as a collection of files. You can
63then use the files to restore and run the application from the point
64it was frozen at. The distinctive feature of the CRIU project is that
65it is mainly implemented in user space.
66
e769518e
JB
67%description -l pl.UTF-8
68CRIU (Checkpoint/Restore In Userspace) to narzędzie programowe dla
69systemu operacyjnego Linux. Przy jego użyciu można zamrozić działającą
70aplikację (lub jej część) i zapisać migawkę na twardym dysku jako
71zestaw plików. Następnie można użyć tych plików do odtworzenia i
72uruchomienia aplikacji od miejsca, w którym została zamrożona.
73Wyróżnikiem projektu CRIU jest to, że został zaimplementowany głównie
74w przestrzeni użytkownika.
75
aa51aa10
AM
76%package libs
77Summary: CRIU shared library
78Summary(pl.UTF-8): Biblioteka współdzielona CRIU
1d80f334 79License: LGPL v2.1
aa51aa10
AM
80Group: Libraries
81
82%description libs
83CRIU shared library.
84
85%description libs -l pl.UTF-8
86Biblioteka współdzielona CRIU.
87
88%package devel
1d80f334
JB
89Summary: Header files for CRIU library
90Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU
91License: LGPL v2.1
aa51aa10
AM
92Group: Development/Libraries
93Requires: %{name}-libs = %{version}-%{release}
b7894ca3 94Requires: protobuf-c-devel
aa51aa10
AM
95
96%description devel
1d80f334 97Header files for CRIU library.
aa51aa10
AM
98
99%description devel -l pl.UTF-8
1d80f334
JB
100Pliki nagłówkowe biblioteki CRIU.
101
9f1a25f7 102%package -n python3-pycriu
1d80f334
JB
103Summary: Python interface to CRIU
104Summary(pl.UTF-8): Pythonowy interfejs do CRIU
105Group: Libraries/Python
106Requires: %{name}-libs = %{version}-%{release}
9f1a25f7 107Obsoletes: python-pycriu < 3.16
1d80f334 108
9f1a25f7 109%description -n python3-pycriu
1d80f334
JB
110Python interface to CRIU. This package contains also crit utility.
111
9f1a25f7 112%description -n python3-pycriu -l pl.UTF-8
1d80f334 113Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
aa51aa10 114
6be8c1d2
AM
115%prep
116%setup -q
1d80f334 117%patch0 -p1
a9349246 118%patch1 -p1
1d80f334 119
83bc7f40 120%{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
6be8c1d2 121
9f1a25f7
JP
122%{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns
123
6be8c1d2 124%build
7a48cad9
ER
125%define _make_opts \\\
126 DEB_HOST_MULTIARCH= \\\
127 CC="%{__cc}" \\\
128 OPT="%{rpmcppflags} %{rpmcflags}" \\\
129 PREFIX=%{_prefix} \\\
130 LIBDIR=%{_libdir} \\\
131 LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\
a27aad5c 132 LIBEXECDIR=%{_libexecdir} \\\
9f1a25f7 133 PYSITESCRIPTDIR=%{py3_sitescriptdir} \\\
7a48cad9
ER
134 MANDIR=%{_mandir} \\\
135 WERROR=0 \\\
9cf3d42a 136 SUBARCH=%{_target_cpu} \\\
7a48cad9
ER
137 V=1
138%{__make}
6be8c1d2 139
a9349246
ER
140%if %{with tests}
141%{__make} test
142%endif
143
6be8c1d2
AM
144%install
145rm -rf $RPM_BUILD_ROOT
6be8c1d2 146%{__make} install \
6be8c1d2 147 DESTDIR=$RPM_BUILD_ROOT
7a8067bd 148
59290952
ER
149install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
150
151# optional scripts, do not autogenerate bash dep
152chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh
a27aad5c 153
6be8c1d2
AM
154%clean
155rm -rf $RPM_BUILD_ROOT
156
af06864b 157%post libs -p /sbin/ldconfig
aa51aa10
AM
158%postun libs -p /sbin/ldconfig
159
6be8c1d2
AM
160%files
161%defattr(644,root,root,755)
59290952 162%doc CREDITS README.md
63f40716 163%attr(755,root,root) %{_bindir}/compel
aa51aa10 164%attr(755,root,root) %{_sbindir}/criu
9f1a25f7 165%attr(755,root,root) %{_sbindir}/criu-ns
63f40716
JP
166%{_mandir}/man1/compel.1*
167%{_mandir}/man1/crit.1*
9f1a25f7 168%{_mandir}/man1/criu-ns.1*
6be8c1d2 169%{_mandir}/man8/criu.8*
a27aad5c
ER
170%dir %{_libexecdir}/%{name}
171%dir %{_libexecdir}/%{name}/scripts
59290952
ER
172%attr(755,root,root) %{_libexecdir}/%{name}/scripts/systemd-autofs-restart.sh
173%attr(755,root,root) %{_libexecdir}/%{name}/scripts/docker_cr.sh
aa51aa10
AM
174
175%files libs
176%defattr(644,root,root,755)
63f40716
JP
177%attr(755,root,root) %{_libdir}/libcompel.so.*.*
178%attr(755,root,root) %ghost %{_libdir}/libcompel.so.1
aa51aa10 179%attr(755,root,root) %{_libdir}/libcriu.so.*.*
63f40716 180%attr(755,root,root) %ghost %{_libdir}/libcriu.so.2
aa51aa10
AM
181
182%files devel
183%defattr(644,root,root,755)
63f40716 184%attr(755,root,root) %{_libdir}/libcompel.so
aa51aa10 185%attr(755,root,root) %{_libdir}/libcriu.so
63f40716 186%{_includedir}/compel
aa51aa10
AM
187%{_includedir}/criu
188%{_pkgconfigdir}/criu.pc
1d80f334 189
9f1a25f7 190%files -n python3-pycriu
1d80f334
JB
191%defattr(644,root,root,755)
192%attr(755,root,root) %{_bindir}/crit
9f1a25f7
JP
193%{py3_sitescriptdir}/pycriu
194%{py3_sitescriptdir}/crit-0.0.1-py*.egg-info
This page took 0.075519 seconds and 4 git commands to generate.