aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cloud-init/APKBUILD
blob: 4c6d4f6a622fea1acc60bdc08a583155cad10943 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com>
# Maintainer: 
pkgname=cloud-init
pkgver=18.5
pkgrel=2
pkgdesc="Cloud instance init scripts"
url="https://cloud-init.io"
arch="noarch"
license="Apache-2.0 GPL-3.0-only"
depends="e2fsprogs-extra python3 py3-configobj py3-jinja2 py3-jsonpatch py3-jsonschema
	py3-oauthlib py3-requests py3-serial py3-six py3-yaml"
makedepends="py3-setuptools"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-openrc"
source="https://launchpad.net/cloud-init/trunk/18.5/+download/$pkgname-$pkgver.tar.gz
	add_distro-alpine.patch
	cloud.cfg
	hosts.alpine.tmpl
	alpine.py
	"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$builddir"
	default_prepare

	install -m644 "$srcdir"/alpine.py \
		"$builddir"/cloudinit/distros/
}

build() {
	cd "$builddir"
	python3 setup.py build
}

check() {
	cd "$builddir"
	python3 setup.py check
}

package() {
	cd "$builddir"
	python3 setup.py install --prefix=/usr --root="$pkgdir" --init-system=sysvinit_openrc

	install -m644 "$srcdir"/cloud.cfg \
		"$pkgdir"/etc/cloud/

	install -m644 "$srcdir"/hosts.alpine.tmpl \
		"$pkgdir"/etc/cloud/templates/
}

bashcomp() {
	depends="bash"
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	cd "$builddir"
	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
	cp bash_completion/$pkgname "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

sha512sums="f89ee636922e33b5b2dcb5230763404fbeee148e28b8f61bf5b2f1f07000f960f9d38545dfb7bcbe9afb8253f77d66c94b39e9a159715b44a440a7cbe1fe1aeb  cloud-init-18.5.tar.gz
4ab37323e7662445af90ce2654199fe3080e256571e8e12b121ebde791b98e68d368b10c5f22b7e8840c0ba9593dd0a6e37ec60724cd0ae4c806944a826741e3  add_distro-alpine.patch
7dd8c3a2050af5536154e77cc3913d34b7d85d02130ea9b9f5b54710f96cd22cb4c255af34f3c710a1319f9bd0f667441482695e9bad927026f952d0cf39de41  cloud.cfg
813a67d446ee65f5ef5a45fe60bef4d0e404c5d1f9cb732bc0ec0b706a0274f4bc1e7f87e676da1ca9366c2f933163f620ee296ed783372869438dd8a928117b  hosts.alpine.tmpl
301e99d25cbe3607f6187ef477e15c8ffc356456117fcd662528194d880a989ba79622208eb84c27decf19060c3810c9ff11441d041c2061feced823e453acaf  alpine.py"