blob: f1812201f16fa36b57988e4b057e90e6ae156971 (
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
61
62
63
64
65
66
67
68
69
|
# Maintainer: Alec Mev <alec@mev.earth>
# Maintainer: Raphael Nestler <raphael.nestler@gmail.com>
_pkgname=asdf
pkgname=asdf-vm
pkgver=0.16.7
pkgrel=1
pkgdesc='Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more'
arch=('x86_64' 'aarch64')
url='https://asdf-vm.com'
license=('MIT')
makedepends=('go')
depends=(
'curl'
'git'
)
optdepends=(
'autoconf'
'automake'
'bash-completion: For completions to work in Bash'
'libffi'
'libtool'
'libxslt'
'libyaml'
'ncurses'
'openssl'
'readline'
'unixodbc'
'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=('095b95ec198b53a5240b41475e7dc423a055e57ee3490e325b8af11f22f03bd8')
build() {
cd "${_pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -ldflags="-s -X main.version=${pkgver}-arch" -o build/ ./cmd/asdf
}
package() {
cd "${_pkgname}-${pkgver}"
install -Dm755 build/asdf "$pkgdir"/usr/bin/$_pkgname
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
install -Dm644 internal/completions/asdf.bash "${usrshare}/bash-completion/completions/asdf"
install -Dm644 internal/completions/asdf.fish "${usrshare}/fish/vendor_completions.d/asdf.fish"
install -Dm644 internal/completions/asdf.zsh "${usrshare}/zsh/site-functions/_asdf"
}
|