aboutsummaryrefslogtreecommitdiffstats
path: root/community/fossil/APKBUILD
blob: d3430bcefe559e09169a1a21feeaa1c5a3f6467a (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
# Contributor: Paul Onyschuk <blink@bojary.koba.pl>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname="fossil"
pkgver="2.10"
pkgrel=0
pkgdesc="Simple, high-reliability, distributed software configuration management"
url="https://www.fossil-scm.org"
arch="all"
license="BSD-2-Clause"
options="!check" # bogus tests
# Final results: 50 errors out of 36205 tests
checkdepends="coreutils ed tcllib"
makedepends="openssl-dev sqlite-dev tcl-dev zlib-dev"
source="https://www.fossil-scm.org/index.html/uv/fossil-src-$pkgver.tar.gz"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--json \
		--disable-internal-sqlite
	make TCC="${CC:-gcc} $CFLAGS"
}

check() {
	local oldpath="$PATH"
	PATH="$PATH:$builddir"
	if [ -z "$USER" ]; then
		USER="$(id -u -n)"
		export USER
	fi
	if [ -z "$HOME" ]; then
		HOME="$(getent passwd "$USER" | awk -F : '{print $6; quit;}')"
		export HOME
	fi

	# ROrepo is somehow not an error anymore?!
	sed -i.orig -e '/^test json-ROrepo-2-1 /s/$/ knownBug/' ./test/json.test

	if ! make TESTFLAGS="-quiet -halt" test; then
		make test
		PATH="$oldpath"
	fi

	PATH="$oldpath"
}

package() {
	install -Dm 755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
}

sha512sums="aad54e3eaa2d647257c5c723fca4e55981aac0432d3d0b4deaa9651c7db7d27cb9f26f7ff40c31c452cb8dd54b0f0663c632183dc11982bc9cc24adf78b952e5  fossil-src-2.10.tar.gz"