# Maintainer: Natanael Copa pkgname=abuild pkgver=3.4.0 _ver=${pkgver%_git*} pkgrel=1 pkgdesc="Script to build Alpine Packages" url="https://git.alpinelinux.org/cgit/abuild/" arch="all" license="GPL-2.0" depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils attr tar 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" install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="apkbuild-cpan:cpan:noarch apkbuild-gem-resolver:gems:noarch abuild-rootbld:_rootbld:noarch $pkgname-doc" options="suid !check" pkggroups="abuild" source="https://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-make-default_static-depend-on-depends_static.patch " builddir="$srcdir/$pkgname-$_ver" prepare() { default_prepare cd "$builddir" sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf } build() { cd "$builddir" make VERSION="$pkgver-r$pkgrel" } package() { cd "$builddir" 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 } cpan() { pkgdesc="Script to generate perl APKBUILD from CPAN" depends="perl perl-libwww perl-json perl-module-build-tiny perl-lwp-protocol-https" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/ } gems() { pkgdesc="APKBUILD dependency resolver for RubyGems" depends="ruby ruby-augeas" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/ } _rootbld() { pkgdesc="Build packages in chroot" depends="abuild bubblewrap gettext git" mkdir -p "$subpkgdir" } sha512sums="0ddf1cef2e79628a4de06015ba217432711ee76751ccc487fd3b1af9cae37ed1b8c5afdc0b916322472314ccee8a6d1c17ccb5b55f6eebfb54444199d2281d3e abuild-3.4.0.tar.xz bb0a550fe2742d93e49138a2909dc6ba0bf3ad598f87659cc1e10a4e78b8e8b32e8621365ba093210a1a00e6e0db45b27e756ba718c6bbcf27ce4abaa3898a08 0001-make-default_static-depend-on-depends_static.patch"