# Contributor: Matt Dainty # Contributor: Dermot Bradley # Maintainer: Dermot Bradley pkgname=cloud-init pkgver=20.3 pkgrel=4 pkgdesc="Cloud instance init scripts" url="https://cloud-init.io" # Dependant package "cloud-utils-growpart" is not available for mips, # mips64, or s390x so disable these archs for this package too. arch="noarch !mips !mips64 !s390x" license="Apache-2.0 OR GPL-3.0-only" depends=" blkid cloud-utils-growpart e2fsprogs-extra eudev ifupdown-ng iproute2-minimal lsblk python3 py3-configobj py3-jinja2 py3-jsonpatch py3-jsonschema py3-oauthlib py3-requests py3-yaml shadow sudo util-linux " makedepends="py3-setuptools" subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-openrc" source="cloud-init-$pkgver.tar.gz::https://github.com/canonical/cloud-init/archive/$pkgver.tar.gz 01-remove-debug-line.patch 02-add-wakeonlan-support.patch interfaces setup-cloud-init README.Alpine " install="$pkgname.post-install" prepare() { default_prepare } build() { python3 setup.py build } check() { python3 setup.py check } package() { python3 setup.py install \ --prefix=/usr --root="$pkgdir" --init-system=sysvinit_openrc # Delete __pycache__ directories containing PYC files find "$pkgdir" -name '__pycache__' -type d -print0 | xargs -0 rm -Rf mkdir -p \ "$pkgdir"/etc/network install -m644 \ "$srcdir"/interfaces \ "$pkgdir"/etc/network/ mkdir -p \ "$pkgdir"/sbin install -m755 \ "$srcdir"/setup-cloud-init \ "$pkgdir"/sbin/ install -m644 \ "$srcdir"/README.Alpine \ "$pkgdir"/usr/share/doc/"$pkgname"/ # Delete non-Alpine distribution template files for distro in \ debian fedora freebsd opensuse redhat rhel sles suse ubuntu do for file in \ "$pkgdir"/etc/cloud/templates/*."$distro".tmpl do rm "$file" done done # Delete systemd template file rm "$pkgdir"/etc/cloud/templates/timesyncd.conf.tmpl } sha512sums="10008710f1876538dab445b07e768953adf8ee31c8848bdf4c95201d6bc894b15ed042e7c90b2cf59491c9dc4b163f64d2be275fbd954f52cb6e4bf37b8e227b cloud-init-20.3.tar.gz 6f0e5c93c3136e3b06f6cfe71bb3160a800a681fa7ebb9aaf551b33fcfb5ac25cf24588c147e1d99e9b361482a8e6cedf4ff3a91d5b6b52e160c456a7033a77a 01-remove-debug-line.patch 4323030ff106202b4dafee849ff3affd56c91b44df1a0c2acd9e76b6fa8f01f0546e4b04759047fe0200a75c37fcd5bd1addbe46007f5ddc2d2a77ded66bab5d 02-add-wakeonlan-support.patch 48b25ec4457c2b3772a7d210033551d041749a0d1869818d888030e6df7fd9bbc13a38b95cf465de3d46d96881a722f94a337584ce48f280c4a52b819586563a interfaces f32b90f26d1df0d88fbea7a1a9ab6704a20babdb750b933484bb7c4e91cc19a587d4bfbc95489a354003ecd00795d1592e71b4b93eccd41e392bb7170bfebb0e setup-cloud-init 3cfba05374bc13eb83c8cec03ae91e0bd0093643e5d9b66f12fb1d9dfd7a097534f989d7f6b1d42cf0acca5352f34b31271eeb63c265ea8e5f763c4bb7e85d32 README.Alpine"