summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asdf-vm/PKGBUILD61
-rw-r--r--asdf-vm/asdf-vm.install11
2 files changed, 72 insertions, 0 deletions
diff --git a/asdf-vm/PKGBUILD b/asdf-vm/PKGBUILD
new file mode 100644
index 000000000..85d23a6b7
--- /dev/null
+++ b/asdf-vm/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Alec Mev <alec@mev.earth>
+
+pkgname=asdf-vm
+pkgver=0.8.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=(
+ '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")
+sha256sums=('6ca280287dcb687ec12f0c37e4e193de390cdab68f2b2a0e271e3a4f1e20bd2e')
+
+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}"
+ cp VERSION "${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"
+}
diff --git a/asdf-vm/asdf-vm.install b/asdf-vm/asdf-vm.install
new file mode 100644
index 000000000..facc34dd7
--- /dev/null
+++ b/asdf-vm/asdf-vm.install
@@ -0,0 +1,11 @@
+post_install() {
+ cat <<EOF
+
+Follow the official instructions [1] to make asdf-vm work, replacing
+"\$HOME/.asdf" with "/opt/asdf-vm". The completions are already installed, just
+make sure your shell is configured to use them.
+
+[1] https://asdf-vm.com/#/core-manage-asdf?id=add-to-your-shell
+
+EOF
+}