aboutsummaryrefslogtreecommitdiffstats
path: root/community/fossil/APKBUILD
blob: ceac0fc41352598a510474fa8091591bd0418e75 (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
55
56
57
58
# Contributor: Paul Onyschuk <blink@bojary.koba.pl>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: tcely <fossil+aports@tcely.33mail.com>
_pkgname="fossil" # upstream name
pkgname="${_pkgname}"
pkgver="2.9"
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
depends=""
checkdepends="coreutils ed tcllib"
makedepends="openssl-dev sqlite-dev tcl-dev zlib-dev"
source="https://www.fossil-scm.org/index.html/uv/${_pkgname}-src-${pkgver}.tar.gz"
builddir="${srcdir}/${_pkgname}-${pkgver}"

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}"
		return 1
	fi

	PATH="${oldPATH}"
}

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

sha512sums="c3786d4ae5517c88917819448863e9e1e37704a7073a1c87c042660313b77ce3a63f32e35e6a56af1c681e7b8a5acc652b4447d0387b8a8a5b3b5aa04dd9a9b5  fossil-src-2.9.tar.gz"