-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add asdf version manager package. For reference see https://asdf-vm.com
- Loading branch information
Tobias Heinlein
committed
Nov 13, 2024
1 parent
ed329c2
commit 309510f
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ ardour-git | |
arduino-cli-bin | ||
arduino-ide-bin | ||
armcord-deb | ||
asdf-vm | ||
aseprite | ||
awesome-git | ||
aws-cli-v2-bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pkgbase = asdf-vm | ||
pkgver = 0.14.1 | ||
pkgrel = 1 | ||
pkgdesc = Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more | ||
url = https://asdf-vm.com | ||
arch = any | ||
depends = curl | ||
depends = git | ||
optdepends = build-essential: Array of tools to build software | ||
optdepends = bash-completion: For completions to work in Bash | ||
optdepends = libncurses5-dev: Text-based UI library for terminal applications | ||
optdepends = libncurses-dev: Text-based UI library for terminal applications | ||
optdepends = unzip: Needed by some plugins, like Elixir | ||
license = MIT | ||
source = asdf-vm-0.14.1.tar.gz::https://github.com/asdf-vm/asdf/archive/v0.14.1.tar.gz | ||
sha256sums = 308a7f2e1eb551e435458974fbe37dcef1c940e961ad40e47ae78cabc154543e | ||
|
||
pkgname = asdf-vm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
pkgname=asdf-vm | ||
pkgver=0.14.1 | ||
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=( | ||
'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=('308a7f2e1eb551e435458974fbe37dcef1c940e961ad40e47ae78cabc154543e') | ||
|
||
package() { | ||
cd "asdf-${pkgver}" | ||
|
||
local dst="${pkgdir}/opt/${pkgname}" | ||
mkdir -p "${dst}" | ||
|
||
cp -r bin "${dst}" | ||
cp -r lib "${dst}" | ||
cp asdf.elv "${dst}" | ||
cp asdf.fish "${dst}" | ||
cp asdf.nu "${dst}" | ||
cp asdf.sh "${dst}" | ||
cp defaults "${dst}" | ||
cp help.txt "${dst}" | ||
cp 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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters