1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
6 pkgdesc='A modern diagram scripting language that turns text to diagrams'
8 url='https://d2lang.com'
10 depends=('glibc' 'gcc-libs')
11 makedepends=('git' 'go')
13 _commit='65a9e43e96be29422c8481c640711cbce960e106'
14 source=("$pkgname::git+https://github.com/terrastruct/d2#commit=$_commit")
20 git describe --tags | sed 's/^v//'
26 # create directory for build output
29 # download dependencies
30 export GOPATH="${srcdir}"
38 export CGO_CPPFLAGS="${CPPFLAGS}"
39 export CGO_CFLAGS="${CFLAGS}"
40 export CGO_CXXFLAGS="${CXXFLAGS}"
41 export GOPATH="${srcdir}"
47 -ldflags "-compressdwarf=false \
49 -extldflags ${LDFLAGS} \
50 -X oss.terrastruct.com/d2/lib/version.Version=$pkgver" \
59 install -vDm755 -t "$pkgdir/usr/bin" build/d2
62 install -vDm644 -t "$pkgdir/usr/share/man/man1" ci/release/template/man/d2.1
65 install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
66 cp -vr docs "$pkgdir/usr/share/doc/$pkgname"
69 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt