summaryrefslogtreecommitdiff
path: root/asdf-vm/PKGBUILD
blob: 5b9e2c4643fa5f5f527a292825bc22d6bdadbe4a (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
57
58
59
60
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Alec Mev <alec@mev.earth>

pkgname=asdf-vm
pkgver=0.14.0
pkgrel=1
pkgdesc='Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more'
arch=('any')
url='https://asdf-vm.com'
license=('MIT')
depends=(
  'autoconf'
  'automake'
  'libffi'
  'libtool'
  'libxslt'
  'libyaml'
  'ncurses'
  'openssl'
  'readline'
  'unixodbc'
)
optdepends=(
  'bash-completion: For completions to work in Bash'
  'unzip: Needed by some plugins, like Elixir'
)
install=asdf-vm.install
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asdf-vm/asdf/archive/v${pkgver}.tar.gz")
sha512sums=('ca0055de6617c2cda3dee9272f07848fd4f5eaef27f84e63fc8c97cb45ab5acedff5e98d2178483ecc3b0bae3a6b036cd548d43417ff09e0cd4368bbe2124d49')

package() {
  cd "asdf-${pkgver}"

  local dst="${pkgdir}/opt/${pkgname}"
  mkdir -p "${dst}"

  cp -r bin       "${dst}"
  cp -r lib       "${dst}"
  cp    asdf.fish "${dst}"
  cp    asdf.sh   "${dst}"
  cp    defaults  "${dst}"
  cp    help.txt  "${dst}"
  cp    LICENSE   "${dst}"

  local usrshare="${pkgdir}/usr/share"
  local docdir="${usrshare}/doc/${pkgname}"
  mkdir -p "${docdir}"

  cp docs/[^_]*.md "${docdir}"
  cp help.txt      "${docdir}"
  cp README.md     "${docdir}"

  install -Dm644 -t "${usrshare}/licenses/${pkgname}/" LICENSE

  cd completions

  install -Dm644 asdf.bash "${usrshare}/bash-completion/completions/asdf"
  install -Dm644 asdf.fish "${usrshare}/fish/vendor_completions.d/asdf.fish"
  install -Dm644 _asdf     "${usrshare}/zsh/site-functions/_asdf"
}