-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcriu
More file actions
57 lines (39 loc) · 1.54 KB
/
criu
File metadata and controls
57 lines (39 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
export CFLAGS="-O2 "
export CXXFLAGS="-O2 "
PKG_VER=4.2
URL=http://github.com/checkpoint-restore/criu/archive/v$PKG_VER/criu-$PKG_VER.tar.gz
TAR=$(echo $URL | sed -r 's|(.*)/||')
DIR=criu-$PKG_VER
PACKAGE=$(echo $DIR | sed 's|-[^-]*$||g')
# Get Package
cd /blfs/builds
wget $URL
tar -xvf $TAR
cd $DIR
# Build
# shellcheck disable=SC2001 -- archlinux
export CFLAGS=$(echo "$CFLAGS" | sed 's/-Wp,-D_FORTIFY_SOURCE=[0-9]//g')
make V=1 criu crit lib amdgpu_plugin docs
python3 -m build --wheel --no-isolation --skip-dependency-check crit
python3 -m build --wheel --no-isolation --skip-dependency-check lib
# Install
sed -e "s,--upgrade --ignore-installed,--no-index --no-deps -v --no-build-isolation,g" -i lib/Makefile -i crit/Makefile
make V=1 \
DESTDIR=/pkgs/$PACKAGE \
PREFIX=/usr \
SBINDIR=/usr/bin \
LIBDIR=/usr/lib \
LIBEXECDIR=/usr/lib \
PIPFLAGS="--no-build-isolation --no-index --no-deps --progress-bar off --upgrade --ignore-installed" \
install-criu install-lib install-amdgpu_plugin install-cuda_plugin install-crit install-man
# suppress warning
rm -rf "/pkgs/$PACKAGE/usr/include/compel/common/asm"
cd /pkgs
sudo echo "python-protobuf libbsd libgcc gnutls libbpf libdrm libnet libnl nftables protobuf-c python util-linux" > /pkgs/$PACKAGE/depends
sudo echo "protobuf-c asciidoc git python-build python-installer setuptools wheel xmlto" > /pkgs/$PACKAGE/make-depends
sudo echo "$PKG_VER" > /pkgs/$PACKAGE/version
sudo tar -cvapf $PACKAGE.tar.xz $PACKAGE
sudo cp $PACKAGE.tar.xz /finished
cd /blfs/builds
sudo rm -r $DIR