aboutsummaryrefslogtreecommitdiffstats
path: root/testing/direnv/APKBUILD
blob: d7485a90c6979a436b50af1e6145c98659c8472e (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
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=direnv
pkgver=2.20.1
pkgrel=0
pkgdesc="Environment variable switcher for the shell"
url="https://direnv.net"
arch="all"
license="MIT"
checkdepends="bash"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/direnv/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/direnv/$pkgname"

prepare() {
	mkdir -p "${builddir%/*}"
	ln -s "$srcdir"/$pkgname-$pkgver "$builddir"

	default_prepare
}

build() {
	make GOPATH="$srcdir"
}

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'
	GOPATH="$srcdir" make test-go test-bash
}

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

sha512sums="f438e0b41c3f1ef41841c08eff4fefb8684f40b23a1d54c03b8d4ab2c81143bd3314fda83dc334dcd6233cdecf50764f6d61afae0ae6c450a6b8f4f181c5a931  direnv-2.20.1.tar.gz"