# Contributor: Vladimir Avinkin # Contributor: Dermot Bradley # Maintainer: Dermot Bradley pkgname=cloud-utils pkgver=0.32 pkgrel=4 pkgdesc="Utilities for interacting with cloud VM images" url="https://launchpad.net/cloud-utils/" arch="noarch !mips !mips64 !s390x" # tests are broken on big-endian license="GPL-3.0-or-later" depends=" bash cdrkit coreutils e2fsprogs e2fsprogs-extra eudev mtools python3 qemu-img tar util-linux " subpackages="$pkgname-doc $pkgname-ec2metadata $pkgname-growpart" source="cloud-utils-$pkgver.tar.gz::https://github.com/canonical/cloud-utils/archive/$pkgver.tar.gz 01-minor-corrections.patch 02-make-udev-optional.patch 03-growpart-flock.patch 04-set-sfdisk-lang.patch " build() { make } check() { # the other tests require root permissions PATH=$PATH:$builddir/bin TMPDIR="$srcdir" ./test/test-growpart-fsimage } package() { # Delete a "broken" script and 3 irrelevant manpages. # These changes are addressed by upstream PR 20 which didn't make # the 0.32 release. This can hopefully be remove upon the next # upstream release. rm bin/cloud-publish-ubuntu \ man/cloud-publish-image.1 \ man/cloud-publish-tarball.1 \ man/cloud-run-instances.1 # Delete an unnecessary script rm bin/vcs-run make DESTDIR="$pkgdir" install cp README.md $pkgdir/usr/share/doc/$pkgname/ } ec2metadata() { pkgdesc="Retrieve metadata on AWS EC2 (and compatible) VMs" depends=" python3 " amove usr/bin/ec2metadata } growpart() { pkgdesc="Grow the size of disk partitions" depends=" blkid partx sfdisk " amove usr/bin/growpart } sha512sums="62bc07759c9c74397cd16a6a0781efb50803efc9f59969e16943fcab0d73ef96966c6abfe21edd17c15ac96dbffaaffa594b3abc0d3fab23102d2d6e7f380a7d cloud-utils-0.32.tar.gz 0efa8170b41cb5b6799fda9de3d3054aab1f765dfc46d1bada11edb103797ddd8153582dbfa1b4c22fd088d4cbf3a1f0729ff708f128d899645f988a8bc4c35e 01-minor-corrections.patch 83275289265f9a754bc49262133c3cbb42683f42e58de05fc446e9411be457f012edad7058325bbaae2ba8aa7fb7e42698df94f28682b0869d7f15956bde8f2a 02-make-udev-optional.patch 2a3802364f46c3144d06736dc5719378e6e7bd8635e2a625387d4b5ad0f9e8d1e76c3e9bccd3b87a224e3b8a6563cb4c61f41be6d4c3fc23780f538d56b733b4 03-growpart-flock.patch 5ed0c747a9383021cb393187045c52bce5e5470d542a3d69e05ab4d51c06926c6f983ebed308eed8f0a110916cf03af11d391e596b911ce84bf13f933d7baab2 04-set-sfdisk-lang.patch"