# Maintainer: Natanael Copa pkgname=abuild pkgver=3.0.2 _ver=${pkgver%_git*} pkgrel=1 pkgdesc="Script to build Alpine Packages" url="http://git.alpinelinux.org/cgit/abuild/" arch="all" license="GPL2" depends="fakeroot sudo pax-utils libressl 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="libressl-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" options="suid !check" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-abuild-log-command-providers.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" 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="74b379e13be79987511ad3a610c40ac7767d26c61b3c235b3c9c2f3bf4ea2cb289b47ef35d8475cc1e3602f371a92fe23833a0f1a60f2e3d231a747a917e9987 abuild-3.0.2.tar.xz 3e1687da867fd17ba7ded08d947add1a0617744fffbfc978c2c4896e2b67c3309ed052c3313c85b3de4ca3857415f3416fa6b358e099d34f85f16ed0f2617d97 0001-abuild-log-command-providers.patch"