diff options
author | saruman9 | 2019-10-12 19:43:28 +0300 |
---|---|---|
committer | saruman9 | 2019-10-12 19:43:28 +0300 |
commit | b477c6d219b64bf5d69f54345300e3c1ed01beea (patch) | |
tree | 9116e06a6e03e560801c2ec9f354a38ce2384dfc | |
download | aur-b477c6d219b64bf5d69f54345300e3c1ed01beea.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 56 |
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7a737ef9f68d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = chezmoi-git + pkgdesc = Manage your dotfiles across multiple machines + pkgver = 1.7.0.r2.g688bc14 + pkgrel = 1 + url = https://github.com/twpayne/chezmoi + arch = x86_64 + license = MIT + makedepends = go-pie + makedepends = git + depends = glibc + provides = chezmoi + conflicts = chezmoi + source = chezmoi-git::git+https://github.com/twpayne/chezmoi + sha256sums = SKIP + +pkgname = chezmoi-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b129ba9d2f37 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Alex Sarum <rum.274.4 at gmail dot com> +# Contributor: Daurnimator <daurnimator@archlinux.org> +# Contributor: Tom Payne <twpayne@gmail.com> +# Contributor: <godeater@gmail.com> + +pkgname=chezmoi-git +pkgver=1.7.0.r2.g688bc14 +pkgrel=1 +pkgdesc="Manage your dotfiles across multiple machines" +arch=('x86_64') +url='https://github.com/twpayne/chezmoi' +license=('MIT') +makedepends=('go-pie' 'git') +provides=('chezmoi') +conflicts=('chezmoi') +depends=('glibc') +source=("${pkgname}::git+${url}") +sha256sums=('SKIP') + +pkgver() { + cd "${pkgname}" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$pkgname" + version_str="$(git describe --tags)" + commit="$(git rev-parse HEAD)" + date="$(date "+%H:%M:%S_%d/%m/%Y")" + + go build \ + -tags noupgrade,noembeddocs \ + -gcflags "all=-trimpath=${PWD}" \ + -asmflags "all=-trimpath=${PWD}" \ + -ldflags "-X github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/$pkgname \ + -X github.com/twpayne/chezmoi/cmd.VersionStr=$version_str \ + -X github.com/twpayne/chezmoi/cmd.Commit=$commit \ + -X github.com/twpayne/chezmoi/cmd.Date=$date \ + -extldflags ${LDFLAGS}" \ + . +} + +package() { + cd "$pkgname" + + install -D "${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}" + + mkdir -p "$pkgdir/usr/share/doc/$pkgname" + install -Dm644 docs/* "$pkgdir/usr/share/doc/$pkgname/" + + install -Dm644 completions/chezmoi-completion.bash "$pkgdir/usr/share/bash-completion/completions/chezmoi" + install -Dm644 completions/chezmoi.fish "$pkgdir/usr/share/fish/vendor_completions.d/chezmoi.fish" + install -Dm644 completions/chezmoi.zsh "$pkgdir/usr/share/zsh/site-functions/_chezmoi" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |