summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78f4291293053f24389f2560cee917f2404f50a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Sebastien Rousseau <sebastian.rousseau@gmail.com>
#
# AUR PKGBUILD scaffold for the `dot` CLI from
# https://github.com/sebastienrousseau/dotfiles
#
# STATUS: scaffold only. The framework does not yet ship a single-
# tarball release artefact (chezmoi-managed root layout). The
# v0.3.0 reorganisation (docs/operations/ROADMAP_V0_2_503.md)
# produces a tarball this PKGBUILD can point at. Until then, the
# `sha256sums` is SKIP and source uses the main branch as a
# placeholder.
#
# Publication target: aur.archlinux.org/packages/dot-cli-git
# Validate via:  paru -S dot-cli-git

pkgname=dot-cli-git
pkgver=0.2.511
pkgrel=1
pkgdesc='Declarative dotfiles CLI for macOS, Linux, WSL, and PowerShell (git head)'
arch=('any')
url='https://github.com/sebastienrousseau/dotfiles'
license=('MIT')
depends=('bash' 'chezmoi' 'git' 'curl')
optdepends=(
  'gum: gorgeous tables and prompts in dot commands'
  'jq: JSON-mode output for every dot command'
  'starship: themed shell prompt integration'
  'fzf: fuzzy interactive selection'
)
makedepends=('git')
provides=('dot' 'dotfiles')
conflicts=('dot' 'dotfiles')
source=("git+${url}.git")
sha256sums=('6b9f435ebeaca6ff5ec9e6c7458972cb1b8d43b80959a75ff990b629ff5af2cf')

pkgver() {
  cd "${srcdir}/dotfiles" || return 1
  printf '%s.r%s' "$(grep '^dotfiles_version' .chezmoidata.toml | cut -d'"' -f2)" \
    "$(git rev-list --count HEAD)"
}

package() {
  cd "${srcdir}/dotfiles" || return 1
  install -Dm755 dot_local/bin/executable_dot "${pkgdir}/usr/bin/dot"
  install -Dm644 dot_local/share/man/man1/dot.1 "${pkgdir}/usr/share/man/man1/dot.1"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"

  # Install scripts/dot library — the dispatcher sources lib/* + commands/*
  install -dm755 "${pkgdir}/usr/share/dotfiles/scripts"
  cp -r scripts/dot "${pkgdir}/usr/share/dotfiles/scripts/"

  # zsh completion
  install -Dm644 dot_local/share/zsh/completions/_dot \
    "${pkgdir}/usr/share/zsh/site-functions/_dot"
}