Skip to content

Commit

Permalink
add: asdf-vm
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ardour-git
arduino-cli-bin
arduino-ide-bin
armcord-deb
asdf-vm
aseprite
awesome-git
aws-cli-v2-bin
Expand Down
18 changes: 18 additions & 0 deletions packages/asdf-vm/.SRCINFO
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
73 changes: 73 additions & 0 deletions packages/asdf-vm/asdf-vm.pacscript
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
}
19 changes: 19 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,25 @@ pkgbase = armcord-deb

pkgname = armcord-deb
---
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
---
pkgbase = aseprite
pkgver = 1.3.9
pkgdesc = Animated sprite editor & pixel art tool
Expand Down

0 comments on commit 309510f

Please sign in to comment.