# Maintainer: Natanael Copa pkgname=abuild pkgver=3.3.0_pre1 _ver=${pkgver%_git*} pkgrel=3 pkgdesc="Script to build Alpine Packages" url="https://git.alpinelinux.org/cgit/abuild/" arch="all" license="GPL-2.0" depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils attr tar pkgconf patch lzip" if [ "$CBUILD" = "$CHOST" ]; then depends="$depends curl" fi makedepends_build="pkgconfig" makedepends_host="openssl-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 abuild-rootbld:_rootbld:noarch $pkgname-doc" options="suid !check" pkggroups="abuild" source="https://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch add-multithreaded-compression.patch 0001-abuild-sign-fall-back-to-libressl-if-openssl-is-miss.patch " builddir="$srcdir/$pkgname-$_ver" prepare() { default_prepare cd "$builddir" sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf } build() { cd "$builddir" make VERSION="$pkgver-r$pkgrel" } package() { cd "$builddir" make install VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir" install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles } cpan() { pkgdesc="Script to generate perl APKBUILD from CPAN" depends="perl perl-libwww perl-json perl-module-build-tiny" 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/ } _rootbld() { pkgdesc="Build packages in chroot" depends="abuild bubblewrap gettext git" mkdir -p "$subpkgdir" } sha512sums="5d3c2c04a7d6ede2c08b524423f9594ced42d4d67f10327996a38e0782fc2de1f8086187aa9a9072df5c1aced540bdcf1b8002b832df4cf2c6a56f6f89657aa7 abuild-3.3.0_pre1.tar.xz e2cefff3b9d460132a7ef90c5f8ddb309b748e2ef40157c31d3dc047b0516838d8c5a0fe51952e004252ad15a76c5758d61f8deb35a970a0841fec188f8d521d 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch 933430cfa7f1e37eb3a1867fbf99581e6ae67be4d0a31c84d1a392ccf3ce95862a9b5a0a8cafd8b65edad46ef900bb6ca6a10666993c972b65fdd92b7c07f2d3 add-multithreaded-compression.patch 9b4a13667897ca953f46367f01253781fba1134b2c28f82d0e85ed89bb907c61db1eb9dce875d9c164ac9bd540ebe1d8e9120bc3f75d55a47612e50b24a89d5c 0001-abuild-sign-fall-back-to-libressl-if-openssl-is-miss.patch"