aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cockroach/APKBUILD
blob: 43bb422e3e4a6a08e934561ccee51f7aac2ae59a (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
# Contributor: Joe Holden <jwh@zorins.us>
# Maintainer: Joe Holden <jwh@zorins.us>
pkgname=cockroach
pkgver=19.1.3
pkgrel=1
pkgdesc="The open source, cloud-native SQL database."
url="https://cockroachlabs.com"
arch="x86_64 aarch64"
license="Apache-2.0"
makedepends="go bash cmake autoconf linux-headers ncurses-dev coreutils"
install="$pkgname.pre-install"
pkgusers="cockroach"
pkggroups="cockroach"
subpackages="$pkgname-openrc"
options="!check" # tests are broken
source="${pkgname}-v${pkgver}.tar.gz::https://binaries.cockroachdb.com/${pkgname}-v${pkgver}.src.tgz
	cockroach.initd
	cockroach.confd
	01_no_githooks.patch"

builddir=${srcdir}/${pkgname}-v${pkgver}

# Fails with a permission denied error on some builders without this.
export GO111MODULE=off

build() {
	local flags="-D_BSD_SOURCE -Wno-format"
	make CXXFLAGS="$flags -Wno-deprecated-copy -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds" \
		CFLAGS="$flags" \
		TAGS="stdmalloc" BUILDTYPE="release" buildoss
}

package() {
	install -m755 -D ${srcdir}/${pkgname}.initd ${pkgdir}/etc/init.d/${pkgname}
	install -m644 -D ${srcdir}/${pkgname}.confd ${pkgdir}/etc/conf.d/${pkgname}
	install -m755 -o ${pkgusers} -g ${pkggroups} -D src/github.com/cockroachdb/${pkgname}/${pkgname}oss ${pkgdir}/usr/sbin/${pkgname}
}
sha512sums="acb44e9f340b90eda1575318c1099e5ccc5ed8fbfec40399c2d0349b30c91abee732c079c81391a6372985cd671305f9bf5e0ae5a6b470ec24f44683ade35b6c  cockroach-v19.1.3.tar.gz
94264601b5b8516d87072017d40ba293d17320c706ad7a2e3c49f1af2b1030071e33cf3353adce26c634d284d0be4e41f2f9a9749c5071e9f0921ed03429f4cf  cockroach.initd
7039d17eb3c251d941bc73af2264c9618b59f8301165764371bf1539c46366d35496b2c00ea134731fd1ca9a0b362f9ba331b03aa62339f75e14504af9eb44f9  cockroach.confd
fe611479ba32a01a1ee7770170c54570cb4ac558fb756c44c90f9e31d59a5da74af81adf1e100e723d3956aea96748955919e5b000ee91d8f8fcb26cc678556f  01_no_githooks.patch"