APKBUILD 2.78 KB
Newer Older
1 2
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
kohnish's avatar
kohnish committed
3
pkgname=podman
4 5
pkgver=3.0.0
pkgrel=0
6 7
pkgdesc="Simple management tool for pods, containers, and images"
url="https://podman.io/"
8
options="!check" # tests require root privileges
9
arch="all !mips !mips64" # limited by go
kohnish's avatar
kohnish committed
10
license="Apache-2.0"
11 12 13
depends="
	conmon
	cni-plugins
14
	crun
15 16 17 18 19
	iptables
	ip6tables
	slirp4netns
	shadow-uidmap
	fuse-overlayfs
20
	containers-common
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
	"
makedepends="
	go
	gpgme-dev
	libseccomp-dev
	libassuan-dev
	go-md2man
	btrfs-progs-dev
	bash
	"
subpackages="
	$pkgname-doc
	$pkgname-openrc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
TBK's avatar
TBK committed
37 38
	$pkgname-docker:docker:noarch
	$pkgname-docker-doc:docker_doc:noarch
39
	"
40
source="$pkgname-$pkgver.tar.gz::https://github.com/containers/podman/archive/v$pkgver.tar.gz
41 42 43
	podman.initd
	podman.confd
	"
kohnish's avatar
kohnish committed
44

45
# secfixes:
46 47
#   3.0.0-r0:
#     - CVE-2021-20199
48 49
#   2.0.5-r0:
#     - CVE-2020-14370
50 51 52
#   1.8.1-r0:
#     - CVE-2020-1726

kohnish's avatar
kohnish committed
53
build() {
54
	export BUILDTAGS="exclude_graphdriver_devicemapper seccomp apparmor"
55
	make podman docs
kohnish's avatar
kohnish committed
56 57 58
}

package() {
59
	make install.bin install.man-nobuild install.completions install.cni \
60
		PREFIX=/usr DESTDIR="$pkgdir"
61 62 63

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
64 65

	mv "$pkgdir"/usr/share/fish/vendor_completions.d "$pkgdir"/usr/share/fish/completions
TBK's avatar
TBK committed
66

67 68 69 70 71
	# remove files provided by containers-common-doc
	rm -r "$pkgdir"/usr/share/man/man5

	# remove systemd files
	rm -r "$pkgdir"/usr/lib/tmpfiles.d
TBK's avatar
TBK committed
72 73 74 75 76 77 78 79 80 81
}

docker() {
	pkgdesc="Emulate Docker CLI using Podman"
	depends="podman"
	provides="docker"

	cd "$builddir"
	make PREFIX=/usr DESTDIR="$subpkgdir" install.docker

82 83 84
	install -d "$subpkgdir"/run
	ln -s /run/podman/podman.sock "$subpkgdir"/run/docker.sock

TBK's avatar
TBK committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
	# Remove man pages
	rm -rf "$subpkgdir"/usr/share

	# Remove systemd files
	rm -rf "$subpkgdir"/usr/lib
}

docker_doc() {
	pkgdesc="Emulate Docker CLI using Podman (documentation)"
	depends="$pkgname-doc"
	install_if="docs $pkgname-docker=$pkgver-r$pkgrel"

	# make target install.docker nor docker-docs are of any use,
	# so lets create the symlinks manually:
	cd "$builddir"/docs/build/man

	mkdir -p "$subpkgdir"/usr/share/man/man1
	for i in podman*.1; do
		ln -s $i.gz "$subpkgdir"/usr/share/man/man1/${i/podman/docker}.gz
	done
105 106
}

107
sha512sums="32279a6a49ca27d3f96f4bc55094d579197b2a3e302bf8ba8de86ccd224eab228003b5cfaf537cee3aee39d39228a188617df09102eb3db8cc5fee6d87ee265c  podman-3.0.0.tar.gz
TBK's avatar
TBK committed
108
279e3587bf264607402c60130662d192924d2f90f2ebc7b1dc673fd119722ad07eac29658da137afa68af2c1f338680c33709866a8c677a79f87763c4dfca756  podman.initd
109
77c71f3d07fa87da5b947287ef9a281eb1764b2682886a214333d910f95b1601d15c3dd0351bbb23ec38f96fc56c8d4196f44b73c01be05088829a02b925c4ca  podman.confd"