summaryrefslogtreecommitdiff
path: root/community/dub/PKGBUILD
blob: 94580a0c27e08fd1fc69f6c20a402d98856853b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Maintainer:  Mihails Strasuns <public@dicebot.lv>
# Contributor: Moritz Maxeiner <moritz@ucworks.org>
pkgname=dub
pkgver=0.9.19
pkgrel=1
pkgdesc="Developer package manager for D programming language"
arch=('i686' 'x86_64')
url="https://github.com/rejectedsoftware/dub"
license=('MIT')
makedepends=('dmd' 'libphobos-devel' 'git')
depends=('d-compiler' 'd-runtime' 'curl')
conflicts=('dub-git')
source=("git+http://github.com/rejectedsoftware/dub.git#tag=v$pkgver")
sha256sums=('SKIP')

build()
{
  cd "${srcdir}/${pkgname}"
  GITVER=$(git describe) || GITVER=unknown
  echo "module dub.version_; enum dubVersion = \"$GITVER\";" > source/dub/version_.d
  dmd  -ofbin/dub -g -debug -w -Isource -L-lcurl @build-files.txt
}

package()
{
  cd "${srcdir}/${pkgname}"
  install -D -m755 bin/dub "${pkgdir}/usr/bin/dub"
  install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}