ayaports/user/abuild/APKBUILD
2022-07-29 15:47:03 +00:00

88 lines
2.3 KiB
Text

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=3.9.1
_ver=${pkgver%_git*}
_gittag=c7b5f6f61eddfc00f22587d93ff44cb202a1ffde
pkgrel=0
pkgdesc="Script to build Alpine Packages"
url="https://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL-2.0-only"
depends="fakeroot scanelf 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 scdoc"
makedepends_host="openssl1.1-compat-dev zlib-dev"
makedepends="$makedepends_host $makedepends_build"
checkdepends="bats"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="
apkbuild-cpan:cpan:noarch
apkbuild-gem-resolver:gems:noarch
apkbuild-pypi:pypi:noarch
abuild-rootbld:_rootbld:noarch
$pkgname-doc
"
options="suid"
pkggroups="abuild"
source="https://gitlab.alpinelinux.org/alpine/abuild/-/archive/$_gittag/abuild-$_gittag.tar.gz"
builddir="$srcdir"/abuild-$_gittag
prepare() {
default_prepare
sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf
}
build() {
make VERSION="$pkgver-r$pkgrel"
}
check() {
make check
}
package() {
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 perl-module-build-tiny
perl-lwp-protocol-https"
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/
}
pypi() {
pkgdesc="Script to generate python3 APKBUILD from PYPI"
depends="perl perl-libwww perl-json perl-module-build-tiny perl-lwp-protocol-https
perl-ipc-system-simple"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-pypi "$subpkgdir"/usr/bin/
}
_rootbld() {
pkgdesc="Build packages in chroot"
depends="abuild bubblewrap gettext git"
mkdir -p "$subpkgdir"
}
sha512sums="
df121c466bfb4e1b628ecdb1fe522a9f74279e7db7899e01a522592b7083097c485912d52a8ba4b8b20ba879d97bf14f5c2f5d5b5ff997de78af3edf46a41bf0 abuild-c7b5f6f61eddfc00f22587d93ff44cb202a1ffde.tar.gz
"