forked from pacstall/pacstall-programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasdf-vm.pacscript
More file actions
65 lines (51 loc) · 1.77 KB
/
asdf-vm.pacscript
File metadata and controls
65 lines (51 loc) · 1.77 KB
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
61
62
63
64
65
pkgname=asdf-vm
pkgver=0.15.0
pkgdesc='Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more'
repology=("project: ${pkgname}")
arch=('any')
url='https://asdf-vm.com'
license=('MIT')
depends=(
'curl'
'git'
)
optdepends=(
'build-essential: Array of tools to build software'
'bash-completion: For completions to work in Bash'
'libncurses5-dev: Text-based UI library for terminal applications'
'libncurses-dev: Text-based UI library for terminal applications'
'unzip: Needed by some plugins, like Elixir'
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asdf-vm/asdf/archive/v${pkgver}.tar.gz")
sha256sums=('d0cafe61d27b5e3fcb53658821bfbf744fd040a8ea28b0e22277e032b8e8f7fe')
package() {
cd "asdf-${pkgver}"
local dst="${pkgdir}/opt/${pkgname}"
mkdir -p "${dst}"
cp -r bin lib asdf.elv asdf.fish asdf.nu asdf.sh defaults help.txt version.txt "${dst}"
local usrshare="${pkgdir}/usr/share"
local docdir="${usrshare}/doc/${pkgname}"
mkdir -p "${docdir}"
cp help.txt "${docdir}"
# https://aur.archlinux.org/packages/asdf-vm#comment-886293
find . \
-path ./.github \
-prune \
-o \
-name '*.md' \
-exec cp --parents '{}' "${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"
}
post_install() {
cat << EOF
Add the following line to your .bashrc or .profile:
. /opt/asdf-vm/asdf.sh
For more information see the official instructions [0].
Especially the section titled "YOUR_SHELL & Pacman".
[0] https://asdf-vm.com/guide/getting-started.html#_3-install-asdf
EOF
}