# Maintainer: Natanael Copa pkgname=abuild pkgver=2.21.0 _ver=${pkgver%_git*} pkgrel=2 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" options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz 0001-abuild-fix-move-of-.a-file-to-dev-subpackage.patch 0001-abuild-fix-CXXFLAGS-for-debug.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 # buildrepo is provided by lua-aports now rm "$pkgdir"/usr/bin/buildrepo || 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="126cbde6e4fdf537571a03a97d01d348 abuild-2.21.0.tar.xz eea48116812c648c3b16acfe2f027b15 0001-abuild-fix-move-of-.a-file-to-dev-subpackage.patch fa5de956ef50716388fed26dd8fc6c82 0001-abuild-fix-CXXFLAGS-for-debug.patch" sha256sums="08689cbf8818c81d9e52e3397529adcb0e279a21d33dfe4f0678d0ef778767f3 abuild-2.21.0.tar.xz 6c0fbe9c4e3b8d85723d4ff8e1338ae5fc789af2607fe089ae979df462b40e31 0001-abuild-fix-move-of-.a-file-to-dev-subpackage.patch e878f17f98c7e6ad43e20d069fc4a23a91086ff09fb6bb05f0b31c68b8ecf852 0001-abuild-fix-CXXFLAGS-for-debug.patch" sha512sums="b304dbb82563ec8ae23376c17ee27b3d49e9c1b74bd14b7a912ca88239ed3c7b2fabeb6209a6d4485c6dbab8491abb8b42f801f5fd9310691da60e630061646b abuild-2.21.0.tar.xz 3693b28a030c4d97fa0927ab5ac517176b9f9ad34b6c018bd77be8355f1127e09751edf5c3b30299427bb8e6afa0f8149da2cdd6d3c191fabc8f94886fa5b172 0001-abuild-fix-move-of-.a-file-to-dev-subpackage.patch 19f77dd76909edceaf41b14a66ce46ee81e31654e07ccc935d3db0bf711ca4caae083d3fc5e3ccf44d58cce602923bcc3259364d4b811f6c288200531ebfd40c 0001-abuild-fix-CXXFLAGS-for-debug.patch"