1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
6 pkgdesc='A tool for recording terminal GIFs'
8 url='https://github.com/charmbracelet/vhs'
10 depends=('glibc' 'ffmpeg' 'ttyd')
11 makedepends=('git' 'go')
13 _commit='5409c97e7ad707b5038b42b5f9d4a1d0acb2418f'
14 source=("$pkgname::git+$url#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 main.Version=v$pkgver \
51 -X main.CommitSHA=$_commit \
52 -X main.CommitDate=$(git show --no-patch --format=%cd --date=format:%Y-%m-%d)" \
57 ./build/vhs man > build/vhs.1
60 for shell in bash fish zsh; do
61 ./build/vhs completion "$shell" > "build/$shell-completion"
75 install -vDm755 -t "$pkgdir/usr/bin" build/vhs
78 install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
81 install -vDm644 -t "$pkgdir/usr/share/man/man1" build/vhs.1
84 install -vDm644 build/bash-completion "$pkgdir/usr/share/bash-completion/completions/vhs"
85 install -vDm644 build/fish-completion "$pkgdir/usr/share/fish/vendor_completions.d/vhs.fish"
86 install -vDm644 build/zsh-completion "$pkgdir/usr/share/zsh/site-functions/_vhs"
89 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE