diff options
Diffstat (limited to 'community/chezmoi/APKBUILD')
-rw-r--r-- | community/chezmoi/APKBUILD | 91 |
1 files changed, 37 insertions, 54 deletions
diff --git a/community/chezmoi/APKBUILD b/community/chezmoi/APKBUILD index 8aa9a68095a..51fc5d06309 100644 --- a/community/chezmoi/APKBUILD +++ b/community/chezmoi/APKBUILD @@ -1,79 +1,62 @@ # Contributor: Kevin Daudt <kdaudt@alpinelinux.org> # Maintainer: Kevin Daudt <kdaudt@alpinelinux.org> -pkgname="chezmoi" -pkgver=1.7.13 +pkgname=chezmoi +pkgver=2.47.2 pkgrel=0 pkgdesc="Manage your dotfiles across multiple machines, securely." url="https://www.chezmoi.io/" arch="all" license="MIT" makedepends="go" -options="!check chmod-clean" # no test suite +checkdepends="unzip" subpackages=" - $pkgname-doc - $pkgname-bash-completion:bashcomp:noarch - $pkgname-zsh-completion:zshcomp:noarch - $pkgname-fish-completion:fishcomp:noarch + $pkgname-bash-completion + $pkgname-zsh-completion + $pkgname-fish-completion + " +source="$pkgname-$pkgver.tar.gz::https://github.com/twpayne/chezmoi/archive/v$pkgver.tar.gz + makefile-quote-built-by.patch " -source="$pkgname-$pkgver.tar.gz::https://github.com/twpayne/chezmoi/archive/v$pkgver.tar.gz" -export GOPATH="$srcdir" +export GOFLAGS="$GOFLAGS -modcacherw" +export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" +export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" +export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { - go build \ - -ldflags " - -X \"github.com/twpayne/chezmoi/cmd.VersionStr=$pkgver\" \ - -X \"github.com/twpayne/chezmoi/cmd.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 + make \ + VERSION="$pkgver" \ + DATE="$(date --utc +%Y-%m-%dT%H:%M:%SZ)" \ + BUILT_BY="Alpine Linux" } -package() { - install -Dm0755 chezmoi "$pkgdir"/usr/bin/chezmoi -} - -doc() { - default_doc - mkdir -p "$subpkgdir/usr/share/doc/chezmoi" - cp "$builddir/docs/"* "$subpkgdir/usr/share/doc/chezmoi" +check() { + make test } -bashcomp() { - pkgdesc="additional scripts for bash like shell completion" - depends="" - install_if="$pkgname=$pkgver-r$pkgrel bash-completion" +package() { + make install \ + VERSION="$pkgver" \ + DATE="$(date --utc +%Y-%m-%dT%H:%M:%SZ)" \ + BUILT_BY="Alpine Linux" \ + DESTDIR="$pkgdir" \ + PREFIX="/usr" - cd "$builddir" install -Dm0644 completions/chezmoi-completion.bash \ - "$subpkgdir"/usr/share/bash-completion/completions/$pkgname -} - -zshcomp() { - pkgdesc="additional scripts for zsh like shell completion" - depends="" - install_if="$pkgname=$pkgver-r$pkgrel zsh" - - cd "$builddir" + "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm0644 completions/chezmoi.zsh \ - "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname -} - -fishcomp() { - pkgdesc="additional scripts for fish like shell completion" - depends="" - install_if="$pkgname=$pkgver-r$pkgrel fish" - - cd "$builddir" + "$pkgdir"/usr/share/zsh/site-functions/_$pkgname install -Dm0644 completions/chezmoi.fish \ - "$subpkgdir"/usr/share/fish/site-functions/_$pkgname + "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish } -cleanup_srcdir() { - go clean -modcache - default_cleanup_srcdir +doc() { + default_doc + mkdir -p "$subpkgdir/usr/share/doc/chezmoi" + cp "$builddir/docs/"* "$subpkgdir/usr/share/doc/chezmoi" } -sha512sums="15a7f47706d7d442cfb0f726e910f32f1ee988fa3677397b7da5ab366f5825b75308af70657062f2fad75330ba727db9da60956f9c4e0567a67d153cbb57b9fd chezmoi-1.7.13.tar.gz" +sha512sums=" +46b43260b424a9aef4cb8f2b26d2067c0cd4656089d8e3a8ebf53cd9d318dca3322dffb2779d6f872811ec9d34b7a07f7c0d0e5f69729476725e5885116a1fba chezmoi-2.47.2.tar.gz +6be6a032054e5d33ac74586c31381ab9332e8a22faff8ea2ff4248c4eddc3300243890c0e7d064db2648b336355115d597bf686aa70cea13b2250710ab885c9e makefile-quote-built-by.patch +" |