# Maintainer: Natanael Copa pkgname=abuild pkgver=3.0.0_rc2 _ver=${pkgver%_git*} pkgrel=3 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" 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" options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-abuild-use-new-PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH-env.patch 0001-abuild-wrap-check-with-fakeroot.patch 0001-abuild-set-e-fix-for-update_config_-sub-guess.patch " builddir="$srcdir/$pkgname-$_ver" prepare() { cd "$builddir" for i in $source; do case $i in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf } build() { cd "$builddir" make || return 1 } package() { cd "$builddir" make install DESTDIR="$pkgdir" || return 1 install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf || return 1 install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles || return 1 } cpan() { pkgdesc="Script to generate perl APKBUILD from CPAN" depends="perl perl-libwww perl-json" 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/ } sha512sums="bb6fa7af3144db99839c24db63e17179d73f659a76c86d530923158b37fad3fcd73ea992f9d5f4ac3c48c13ccebb62ffbe461b3871dcb4b7b1ca6efd934e4be2 abuild-3.0.0_rc2.tar.xz 65e0605a23a5f8df6024533b054ce6e098bfc1431220d8487e9d5f521aede7c0c8fc47f5f119d868da48d8f69e6fbc3fe101f71e3415a66797829623bb5a7a48 0001-abuild-use-new-PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH-env.patch 0e5b64ad175efc4a06197a5e131878e5532539c78ffd8d5aa28a99c9684aa6eec8bc95fdca1c99b916a58c61ddf8d0b7602b1bc9aee276f7a40d82f970c0ad7c 0001-abuild-wrap-check-with-fakeroot.patch dda641f0ce2bddc8f3d7cf4a3538afe699bda56a5172bd56104de7252796da20025ed36f9401220d8e2fd072297efad94da4be4ed8831e9f9d14ad75c9c8859d 0001-abuild-set-e-fix-for-update_config_-sub-guess.patch"