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