# Maintainer: A. Wilcox pkgname=abuild pkgver=3.5 pkgrel=0 pkgdesc="Script to build APK packages" url="https://git.adelielinux.org/adelie/abuild" arch="all" options="suid !check" license="GPL-2.0-only" pkggroups="abuild" depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils attr libarchive-tools pkgconf patch lzip" if [ "$CBUILD" = "$CHOST" ]; then depends="$depends curl" fi makedepends_build="pkgconfig" makedepends_host="openssl-dev zlib-dev" makedepends="$makedepends_host $makedepends_build" subpackages="abuild-rootbld:_rootbld:noarch $pkgname-doc" install="$pkgname.pre-install $pkgname.pre-upgrade" source="https://distfiles.adelielinux.org/source/abuild-$pkgver.tar.xz keyhole.patch noarch.patch " # secfixes: # 3.3.1-r1: # - CVE-2019-12875 prepare() { default_prepare sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf } build() { make VERSION="$pkgver-r$pkgrel" } package() { make install VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir" install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles # hardcoded to use Alpine repositories and URLs. # maybe rewrite some day, pending user demand. rm "$pkgdir"/usr/bin/apkbuild-gem-resolver # very broken rm "$pkgdir"/usr/bin/apkbuild-cpan } _rootbld() { pkgdesc="Build packages in chroot" depends="abuild bubblewrap gettext-tiny git" mkdir -p "$subpkgdir" } sha512sums="50e6ad1dfb033688a4a06bbb313db6bb90c0a2e7c47dbab30c1cd7f30520b782fdfd113babed8796104c415f096071a49feb8ab9e71286889d0ac79bb4acc039 abuild-3.5.tar.xz 757d750d4b5c88bf00774b64f2b93a9461e03f284d9423dc58c581e1309f276628de3114fcb510afd7c3cd55ceb721c1278e42756977c97ebe2597207805318d keyhole.patch 06542b3baca0a52d0a74c32683738ebe4bfc5c7c3fef867b3cbed5767cd4c5e1517a2174934320bd4184894f3462538a77ae2f4641dff8530c29a6fa0e8184a0 noarch.patch"