summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/dub/PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/libre/dub/PKGBUILD b/libre/dub/PKGBUILD
new file mode 100644
index 000000000..32a386338
--- /dev/null
+++ b/libre/dub/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer:(Arch) Mihails Strasuns <public@dicebot.lv>
+# Contributor (Arch): Moritz Maxeiner <moritz@ucworks.org>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+pkgname=dub
+pkgver=0.9.23
+pkgrel=2.parabola1
+pkgdesc="Developer package manager for D programming language (built with gdc and libgphobos-devel)"
+arch=('i686' 'x86_64')
+url="https://github.com/D-Programming-Language/dub"
+license=('MIT')
+makedepends=('gdc' 'libgphobos-devel' 'git')
+depends=('curl')
+source=(
+ "git+https://github.com/D-Programming-Language/dub.git#tag=v$pkgver"
+)
+sha256sums=(
+ 'SKIP'
+)
+
+build()
+{
+ DC=gdmd
+ cd "${srcdir}/${pkgname}"
+
+ echo Generating version file...
+ GITVER=$(git describe) || GITVER=unknown
+ echo "module dub.version_;" > source/dub/version_.d
+ echo "enum dubVersion = \"$GITVER\";" >> source/dub/version_.d
+ echo "enum initialCompilerBinary = \"$DC\";" >> source/dub/version_.d
+
+ $DC -ofbin/dub -w -g -version=DubUseCurl -Isource -L-lcurl @build-files.txt
+}
+
+package()
+{
+ cd "${srcdir}/${pkgname}"
+ install -D -m755 bin/dub "${pkgdir}/usr/bin/dub"
+ install -D -m644 scripts/bash-completion/dub.bash $pkgdir/usr/share/bash-completion/completions/dub
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+}