# Maintainer: Natanael Copa pkgname=abuild pkgver=2.24.0 _ver=${pkgver%_git*} pkgrel=6 pkgdesc="Script to build Alpine Packages" url="http://git.alpinelinux.org/cgit/abuild/" arch="all" license="GPL2" depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils attr tar pkgconf" if [ "$CBUILD" = "$CHOST" ]; then depends="$depends curl" fi makedepends_build="pkgconfig" makedepends_host="openssl-dev" makedepends="$makedepends_host $makedepends_build" install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="apkbuild-cpan:cpan apkbuild-gem-resolver:gems" options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-abuild-fix-fetch-lock-file-on-nfs.patch 0001-abuild-try-to-validate-maintainer-address.patch 0001-abuild-fix-issue-in-maintainer-check.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" arch="noarch" 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" arch="noarch" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/ } md5sums="7821eea872e86a768d881fecce95e934 abuild-2.24.0.tar.xz 3acc92254dbab1799f724394e1d49264 0001-abuild-fix-fetch-lock-file-on-nfs.patch 8b647dd06b617d70250bbb3680aa9f82 0001-abuild-try-to-validate-maintainer-address.patch 430baf288b197ef4b5133ac8ba392ccf 0001-abuild-fix-issue-in-maintainer-check.patch" sha256sums="0e0c0c7579c3b8d6668fad9d93a42f3ea18da88679e1a12a178f2676c79e94d6 abuild-2.24.0.tar.xz 3f6d6f315c0531f900d7465abaf5f4bd0bbd59d884b2af363bc0105b0f2b3a95 0001-abuild-fix-fetch-lock-file-on-nfs.patch fcbdae9a224ed4705614e6c5f220e304e405e92d0a33c5dacca0d82fcf386aec 0001-abuild-try-to-validate-maintainer-address.patch ba588472ccc0ab86e42fd2f6a0a923cd8aa400f051e8c7acbd23f4d19a3dd93f 0001-abuild-fix-issue-in-maintainer-check.patch" sha512sums="360d0164afed9c61576618d113d738327151c60f1bc1e6246fcf74f97db087ca2effb11a4ae045f1f288063d5311c6dddbe7721b3cbe65d11472b3d2b0f03ef6 abuild-2.24.0.tar.xz 620fbf17f48f2732b7e7fd10f4c02bedae6d0c5c7988cefc8e1f2f233efd49514d08b72a367203c977b11272397e713e7551029f85b0dfc79c55587551600ced 0001-abuild-fix-fetch-lock-file-on-nfs.patch cf14d49d9ac2d4dadca9687c96ae2fc9ef43c7f86e31706c942cefa508b9c075506194e87b0189970e59261072e8cd523e0ced6d4d932936adb1c2c747b14663 0001-abuild-try-to-validate-maintainer-address.patch d57fdf1c17b7b201b45bfe6f2362e212cea2a6e1ea586acc20cca301db8bc39c7bc204582d0f6827b715b6d299fc3495bc3530cd461639a3d21e93fda47d0ad9 0001-abuild-fix-issue-in-maintainer-check.patch"