aboutsummaryrefslogtreecommitdiffstats
path: root/testing/direnv/APKBUILD
blob: 1a0ca328be6df3d3be23af8e7fe82a93ddb3bf6e (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.21.2
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/direnv/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="a63b0bfa24041c8fb3bead52bce1917b02d61e09e48a3698c1358dbd3b40d7e6c66bdc26597b69805476a7deeb2a81672ee0b25732b25982d0dd0426c102e83e  direnv-2.21.2.tar.gz"