mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-03 15:51:33 +01:00
47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
# Contributor: Mathias LANG <pro.mathias.lang@gmail.com>
|
|
# Maintainer: Mathias LANG <pro.mathias.lang@gmail.com>
|
|
pkgname=dub
|
|
pkgver=1.34.0
|
|
pkgrel=0
|
|
pkgdesc="Package and build management system for D"
|
|
url="https://code.dlang.org/"
|
|
arch="x86_64 aarch64"
|
|
license="MIT"
|
|
depends="libcurl"
|
|
makedepends="chrpath ldc bash curl-dev"
|
|
subpackages="$pkgname-zsh-completion $pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/dlang/dub/archive/v$pkgver.tar.gz"
|
|
|
|
# pass on edge but fail on 3.16(edge) ..
|
|
[ "$CARCH" = "aarch64" ] && options="$options !check"
|
|
|
|
build() {
|
|
# Default abuild.conf has '-Os' which gdmd doesn't support
|
|
# Since we later build the man pages using dub, make it persistent
|
|
export DFLAGS=""
|
|
|
|
# The build script needs a DMD-like interface to pass its arguments, so use ldmd2
|
|
DMD=ldmd2 GITVER="v$pkgver" ldc2 -run "$builddir/build.d"
|
|
|
|
# Build man pages
|
|
"$builddir/bin/dub" --compiler=ldc2 --single scripts/man/gen_man.d
|
|
|
|
# Remove redundant rpath
|
|
chrpath -d "$builddir/bin/dub"
|
|
}
|
|
|
|
check() {
|
|
bin/dub test
|
|
}
|
|
|
|
package() {
|
|
install -s -D "$builddir/bin/dub" "$pkgdir/usr/bin/dub"
|
|
install -Dm644 "$builddir/scripts/zsh-completion/_dub" "$pkgdir/usr/share/zsh/site-functions/_dub"
|
|
mkdir -p "$pkgdir/usr/share/man/man1/"
|
|
cp "$builddir"/scripts/man/*.1 "$pkgdir/usr/share/man/man1/"
|
|
}
|
|
|
|
sha512sums="
|
|
24ed9f328debf8d921061a8d898bfc80c023864d8c525b61353c9de9cf33de2e2189cfa845e85553fc902c889dd3538b64320f3003eda0113d2c3c9a2be881f0 dub-1.34.0.tar.gz
|
|
"
|