aboutsummaryrefslogtreecommitdiffstats
path: root/testing/criu/APKBUILD
blob: 8126e815ef27e2921a33f70e45a935ec669743f4 (plain)
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
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=criu
pkgver=3.12
pkgrel=1
pkgdesc="Process tree checkpoint/restore utility"
url="https://criu.org"
arch="x86_64"
license="GPL-2.0-or-later LGPL-2.1-only"
makedepends="xmlto asciidoc python3 protobuf-c-dev libnet-dev libnl3-dev
	protobuf-dev libcap-dev"
checkdepends="py3-yaml"
options="!check" # https://github.com/checkpoint-restore/criu/issues/434
subpackages="$pkgname-dev $pkgname-doc py3-$pkgname:_py:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/xemul/criu/archive/v$pkgver.tar.gz"

build() {
	# https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed
	export LDFLAGS=$(echo $LDFLAGS |sed 's|-Wl,--as-needed||') PYTHON=python3
	make
}

check() {
	make test
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" LIBDIR=/usr/lib install
	rm "$pkgdir"/usr/libexec/criu/scripts/systemd-autofs-restart.sh
	rm -f "$pkgdir"/usr/lib/*.a
}

_py() {
	replaces="py-$pkgname" # Backwards compatibility
	provides="py-${pkgname}=$pkgver-r$pkgrel" # Backwarwds compatibility

	pkgdesc="Python3 bindings for Criu"
	depends="python3 py3-protobuf"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="a938f739c09470e24950b94a6b1afe2b1e20c132e101836cb5efe15d1787ae655aadb3e7511167758c1e09eae031a098e71818fbfa567b79ae2e66de2c035512  criu-3.12.tar.gz"