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