aboutsummaryrefslogtreecommitdiffstats
path: root/testing/direnv/APKBUILD
blob: 79486fb429d31568e917d518f82430bfd41c73ca (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=direnv
pkgver=2.27.0
pkgrel=0
pkgdesc="Environment variable switcher for the shell"
options="chmod-clean"
url="https://direnv.net"
arch="all !mips64" # blocked by go
license="MIT"
checkdepends="bash"
makedepends="go"
subpackages="$pkgname-doc $pkgname-fish::noarch"
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" PREFIX=/usr install
}

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

	amove usr/share/fish/vendor_conf.d
}

sha512sums="5e87fbdbad0b16bada0e51b499c65e21d2ad834bf2dc06dbfed01150bcd588a57bcc95bdf44d56fe4840315ffec62fc8bc11ec87ab2bdd7463d57adb8cca1ed3  direnv-2.27.0.tar.gz"