diff options
Diffstat (limited to 'community/chezmoi/APKBUILD')
-rw-r--r-- | community/chezmoi/APKBUILD | 89 |
1 files changed, 36 insertions, 53 deletions
diff --git a/community/chezmoi/APKBUILD b/community/chezmoi/APKBUILD index 214ca6623c3..9e8a8f8a7ef 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.8.1 +pkgver=2.47.3 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 \"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 + 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="9893c51b75c5aa792595f7edc116670248c3c9c411bb3762577dc5fab1bf67edd9b179119b59fb0dfbd13a8b9c210bd3802facb93b3791f9d17f78d056f91c16 chezmoi-1.8.1.tar.gz" +sha512sums=" +77b5e03ac4677b107ddd4fbcf9bb5eed00e3250b09f760624407304e8ce8edeb8f2fab88d359e7a53f20f0d36c3fdeb8bfd8a7cd8030d9d04524d527196cd6fa chezmoi-2.47.3.tar.gz +6be6a032054e5d33ac74586c31381ab9332e8a22faff8ea2ff4248c4eddc3300243890c0e7d064db2648b336355115d597bf686aa70cea13b2250710ab885c9e makefile-quote-built-by.patch +" |