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