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