# Maintainer: Natanael Copa pkgname=abuild pkgver=2.19.0 _ver=${pkgver%_git*} pkgrel=0 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" 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" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz" _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/ } md5sums="9f8bb4b065382317124e26c483c21282 abuild-2.19.0.tar.xz" sha256sums="659d5ca457e6a0a552115018dc903039d54731f6cf291a9b00e1a700a8e3ce83 abuild-2.19.0.tar.xz" sha512sums="f46c38efb1645759c0bd3908a03bc1d27e588801dd138ea6e18390bdcf617eb56f2b49301737558d2509fcdf9cbc2ac4cd5152888d1c41e300ca68f719194d64 abuild-2.19.0.tar.xz"