archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / dub / trunk / PKGBUILD
blob24a9db175f633ee8a3c0b35a09527fe36c3ad199
1 # Maintainer: Dan Printzell <wild@archlinux.org>
2 # Maintainer: Filipe LaĆ­ns (FFY00) <lains@archlinux.org>
3 # Contributor: Mihails Strasuns <public@dicebot.lv>
4 # Contributor: Moritz Maxeiner <moritz@ucworks.org>
6 pkgname=dub
7 pkgver=1.32.1
8 pkgrel=1
9 pkgdesc="Developer package manager for D programming language"
10 arch=('x86_64')
11 url="https://github.com/dlang/dub"
12 license=('MIT')
13 groups=('dlang')
14 makedepends=('ldc')
15 depends=('curl')
16 source=("$pkgname-$pkgver.tar.gz::https://github.com/dlang/dub/archive/v$pkgver.tar.gz")
17 sha512sums=('6ed022c3b3ee8fbf77da6ee82c6074fb4cca02db187598185cf4340e1fc161cc1f29ac20d73481a69a5b7ab85875cfd6be66fc6582749816a4a531a84cc945cc')
19 build() {
20         cd "$pkgname-$pkgver"
22         GITVER=$pkgver DMD=ldmd2 ldmd2 -run build.d -release -O3 -linker=gold --flto=thin -link-defaultlib-shared=false -L--build-id
24         # Build man pages
25         bin/dub --single scripts/man/gen_man.d
28 package() {
29         # binaries
30         install -Dm755 "$pkgname-$pkgver/bin/dub" "$pkgdir/usr/bin/dub"
32         # license
33         install -Dm644 "$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
35         # bash, fish and zsh completion
36         install -Dm644 "$pkgname-$pkgver/scripts/bash-completion/dub.bash" "$pkgdir/usr/share/bash-completion/completions/dub"
37         install -Dm644 "$pkgname-$pkgver/scripts/fish-completion/dub.fish" "$pkgdir/usr/share/fish/vendor_completions.d/dub.fish"
38         install -Dm644 "$pkgname-$pkgver/scripts/zsh-completion/_dub" "$pkgdir/usr/share/zsh/site-functions/_dub"
40         # man pages
41         mkdir -p "$pkgdir"/usr/share/man/man1
42         cp "$pkgname-$pkgver"/scripts/man/*.1 "$pkgdir"/usr/share/man/man1/