# Contributor: Kevin Daudt # Maintainer: Kevin Daudt pkgname=chezmoi pkgver=1.8.9 pkgrel=0 pkgdesc="Manage your dotfiles across multiple machines, securely." url="https://www.chezmoi.io/" arch="all !mips !mips64" # go missing license="MIT" makedepends="go" options="!check chmod-clean" # no test suite subpackages=" $pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion $pkgname-fish-completion " source="$pkgname-$pkgver.tar.gz::https://github.com/twpayne/chezmoi/archive/v$pkgver.tar.gz" export GOPATH="$srcdir" build() { go build \ -ldflags " -X \"main.version=$pkgver\" \ -X \"main.date=$(date --utc +%Y-%M-%dT%H:%I:%SZ)\" \ -X \"github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/chezmoi/\" " \ -tags noupgrade \ -tags noembeddocs make completions } package() { install -Dm0755 chezmoi "$pkgdir"/usr/bin/chezmoi install -Dm0644 completions/chezmoi-completion.bash \ "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm0644 completions/chezmoi.zsh \ "$pkgdir"/usr/share/zsh/site-functions/_$pkgname install -Dm0644 completions/chezmoi.fish \ "$pkgdir"/usr/share/fish/completions/$pkgname.fish } doc() { default_doc mkdir -p "$subpkgdir/usr/share/doc/chezmoi" cp "$builddir/docs/"* "$subpkgdir/usr/share/doc/chezmoi" } cleanup_srcdir() { go clean -modcache default_cleanup_srcdir } sha512sums="cc80321ecda99d9b66b4c2e5243ae595513e4f26916a44414f9b33dcd3a3a36e23795a2b7e9c12b67c9b89b67643f4b1491f7af0707a2ae139b6479d4cddcf29 chezmoi-1.8.9.tar.gz"