aboutsummaryrefslogtreecommitdiffstats
path: root/community/direnv/APKBUILD
blob: 819bd122b07bd2109c65d4aa108a402ffe49736e (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=direnv
pkgver=2.32.1
pkgrel=9
pkgdesc="Environment variable switcher for the shell"
url="https://direnv.net"
license="MIT"
arch="all"
depends="bash"
makedepends="go"
subpackages="$pkgname-doc $pkgname-fish::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/direnv/direnv/archive/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make
}

check() {
	# Also has tests for tcsh and elvish, this manual call is done instead of
	# tests to avoid unwanted tests like 'shellcheck' and 'go-fmt'
	make test-go test-bash
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

fish() {
	pkgdesc="configuration hooks for fish"
	install_if="$pkgname=$pkgver-r$pkgrel fish"

	amove usr/share/fish/vendor_conf.d
}

sha512sums="
1d4f7f4ef8ff4c84e6a5f0cb2cbd510064b7d0c9de41f57b075024af06407fe0cc40ddcd9f6f52ca260550833e38ae9690b39abc85e17a3c500899ec46f761e4  direnv-2.32.1.tar.gz
"