# Maintainer: Natanael Copa pkgname=abuild pkgver=2.29.0 _ver=${pkgver%_git*} pkgrel=8 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" 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-properly-detect-failure-of-dependency-install.patch 0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch 0001-abuild-properly-detect-package-size-on-filesystems.patch 0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch 0001-abuild-use-only-sha512sum.patch 0001-abuild-preserve-xattrs-when-creating-dbg.patch 0001-functions-fix-cross-compile-triplet-for-armhf-archit.patch 0001-abuild-unset-md5-and-sha256-sums-when-updating-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" 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="349c0d5efaff05dc6f680a93e59a997857991520ae892426252d198aa4ef0b2854f1675ce3b1bc1bea810d5f97fae0985474ea13df3905d590b320373723990c abuild-2.29.0.tar.xz 1bc4bb62ee881051f41f5f68d25f8794208407f552a30bd7aad235c0bd57ebadc2a12dc21a4c1826eff3e320a5f9e7c40f89fd964144ff2f0d49f747708a61b4 0001-abuild-properly-detect-failure-of-dependency-install.patch 655476f5d263701d59f85ff8c28c342d8d0710bb6c869ca7e0cb8df9f70ca2cd5af44c460b578f6ebcf320774575ce193be15830b942a956a04c0345bf27bd4e 0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch fb7d65b1c65368dfddf7e3b55774a699169eb1de63e1aa619d5a210773e912e66c6a573d7fb98d579e30f416968592592d7a912fb6efce8805ac0f149c500776 0001-abuild-properly-detect-package-size-on-filesystems.patch 6f4212c796829578f318b257adcfdf493a1520cd45c623c110a3181fd076bbcb94f84b04f9292bd081a923e5819448673e5adc1a3e8450e086784c00c3515459 0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch 99a260d2c1ebc625fece8fc0a6d31357c1695825da6357b67c138cf2d738507640a3b1873cf3a4ba1ed502a7d6f29fe7a9898ebc3005faf27353c989b3c340c1 0001-abuild-use-only-sha512sum.patch 37f9de0e6f160f3ccbee56a973e08fcf9b4c27318023eacb47bf5ff1ee0d7f3710bef368d998a65bff0420fb73e6e05963b05af95e4beacf6a39cfe1bee95ec1 0001-abuild-preserve-xattrs-when-creating-dbg.patch 4a626c1213fa09a8000200c093b6209a57eb31be90c5cc7b4cb18eeb27c9e65fa60a92969f05dd80aa99cd91cab7c7ac16760b9aae72c5aa20883375c5c726df 0001-functions-fix-cross-compile-triplet-for-armhf-archit.patch 8390c080d6e4f90ca7d3aeb5244cc920d277f52bca9db2a42b3758a147baf045b1a95314955ba11182d635a7d90de01d5bc96f42e318ed32d6b5315b691a6ad5 0001-abuild-unset-md5-and-sha256-sums-when-updating-check.patch"