2013-11-29 17:54:31 +01:00
|
|
|
#
|
2014-01-08 16:51:34 +01:00
|
|
|
# spec file for package criu
|
2013-11-29 17:54:31 +01:00
|
|
|
#
|
2015-03-13 18:27:50 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-11-29 17:54:31 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2014-01-08 16:51:34 +01:00
|
|
|
|
2015-04-28 17:26:48 +02:00
|
|
|
%define package_version 1.5.2
|
2013-11-29 17:51:21 +01:00
|
|
|
Name: criu
|
2015-04-28 17:26:48 +02:00
|
|
|
Version: 1.5.2
|
2014-01-08 16:51:34 +01:00
|
|
|
Release: 0
|
2013-11-29 17:51:21 +01:00
|
|
|
Summary: Checkpoint/Restore In Userspace Tools
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: System/Console
|
|
|
|
Url: http://criu.org/
|
2014-09-02 07:48:08 +02:00
|
|
|
Source0: http://download.openvz.org/criu/criu-%{package_version}.tar.bz2
|
2015-03-13 18:27:50 +01:00
|
|
|
Patch1: crit-install-prefix.diff
|
2013-11-29 17:51:21 +01:00
|
|
|
BuildRequires: asciidoc
|
2014-09-02 07:48:08 +02:00
|
|
|
BuildRequires: pkg-config
|
2013-11-29 17:51:21 +01:00
|
|
|
BuildRequires: protobuf-c
|
2015-03-13 18:27:50 +01:00
|
|
|
BuildRequires: protobuf-devel
|
2013-11-29 17:51:21 +01:00
|
|
|
BuildRequires: xmlto
|
2014-01-08 16:51:34 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2014-03-01 09:46:14 +01:00
|
|
|
Requires: logrotate
|
2013-11-29 17:51:21 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-09-02 07:48:08 +02:00
|
|
|
ExclusiveArch: x86_64 aarch64
|
2013-11-29 17:51:21 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
|
|
|
|
operating system. Using this tool, you can freeze a running application
|
|
|
|
(or part of it) and checkpoint it to a hard drive as a collection of
|
|
|
|
files. You can then use the files to restore and run the application from
|
|
|
|
the point it was frozen at.
|
|
|
|
|
2014-02-26 17:28:21 +01:00
|
|
|
%package -n libcriu1
|
|
|
|
Summary: Library for CRIU
|
|
|
|
License: LGPL-2.1
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libcriu1
|
|
|
|
This package contains the library for CRIU, Checkpoint/Restore In
|
|
|
|
Userspace Tools.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
|
|
License: LGPL-2.1+
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libcriu1 = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains all necessary include files and libraries needed
|
|
|
|
to develop applications with CRIU library.
|
|
|
|
|
2013-11-29 17:51:21 +01:00
|
|
|
%prep
|
2014-09-02 07:48:08 +02:00
|
|
|
%setup -q -n %{name}-%{package_version}
|
2015-03-13 18:27:50 +01:00
|
|
|
%patch1 -p1
|
2015-04-07 16:04:40 +02:00
|
|
|
# fix up the broken protobuf descriptor.proto (comment-in-comment)
|
|
|
|
rm -f protobuf/google/protobuf/descriptor.proto
|
|
|
|
sed -e's@/\*@@g' -e's@\*/@@g' /usr/include/google/protobuf/descriptor.proto > protobuf/google/protobuf/descriptor.proto
|
2013-11-29 17:51:21 +01:00
|
|
|
|
|
|
|
%build
|
2014-03-01 09:46:14 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
make V=1 %{?_smp_mflags} PREFIX=%{_prefix} LOGROTATEDIR=%{_sysconfdir}/logrotate.d/
|
2013-11-29 17:51:21 +01:00
|
|
|
|
|
|
|
%install
|
2014-03-01 09:46:14 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
|
make V=1 %{?_smp_mflags} PREFIX=%{_prefix} LOGROTATEDIR=%{_sysconfdir}/logrotate.d/ \
|
|
|
|
DESTDIR=%{buildroot} install
|
2014-02-26 17:28:21 +01:00
|
|
|
# make rpmlint happy
|
2014-03-01 09:46:14 +01:00
|
|
|
mv %{buildroot}%{_sysconfdir}/logrotate.d/criu-service \
|
|
|
|
%{buildroot}%{_sysconfdir}/logrotate.d/criu
|
2013-11-29 17:51:21 +01:00
|
|
|
# for compatiblity
|
2014-03-01 09:46:14 +01:00
|
|
|
ln -s criu %{buildroot}%{_sbindir}/crtools
|
|
|
|
ln -s criu.8 %{buildroot}%{_mandir}/man8/crtools.8
|
2013-11-29 17:51:21 +01:00
|
|
|
|
2014-01-08 16:51:34 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre criu.service criu.socket
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun criu.service criu.socket
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post criu.service criu.socket
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun criu.service criu.socket
|
|
|
|
exit 0
|
|
|
|
|
2014-02-26 17:28:21 +01:00
|
|
|
%post -n libcriu1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libcriu1 -p /sbin/ldconfig
|
|
|
|
|
2013-11-29 17:51:21 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README COPYING
|
|
|
|
%{_sbindir}/*
|
2015-03-13 18:27:50 +01:00
|
|
|
%{_bindir}/*
|
2013-11-29 17:51:21 +01:00
|
|
|
%{_mandir}/man*/*
|
2014-01-08 16:51:34 +01:00
|
|
|
%{_unitdir}/criu.*
|
2014-09-02 07:48:08 +02:00
|
|
|
%config %{_sysconfdir}/logrotate.d/*
|
2015-03-13 18:27:50 +01:00
|
|
|
/usr/lib/python*/site-packages/crit-*.egg-info
|
|
|
|
/usr/lib/python*/site-packages/pycriu
|
2014-02-26 17:28:21 +01:00
|
|
|
|
|
|
|
%files -n libcriu1
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libcriu.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/criu
|
|
|
|
%{_libdir}/libcriu.so
|
2014-09-02 07:48:08 +02:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2013-11-29 17:51:21 +01:00
|
|
|
|
|
|
|
%changelog
|