aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rebar3/APKBUILD
blob: 882b42ebb13292abfe24b94b3fd3b7eec772f3f7 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=rebar3
pkgver=3.5.0
pkgrel=0
pkgdesc="erlang build tool that makes it easy to compile and test erlang applications and releases"
url="http://www.rebar3.org/"
arch="noarch"
license="Apache-2.0"
depends="erlang erlang-compiler"
makedepends="erlang-dev erlang-ssl erlang-eunit erlang-sasl erlang-dialyzer"
install=""
subpackages=""
_bbmustache_ver="1.3.0"
_certifi_ver="2.0.0"
_cf_ver="0.2.2"
_cth_readable_ver="1.3.2"
_erlware_commons_ver="1.0.4"
_eunit_formatters_ver="0.5.0"
_getopt_ver="1.0.1"
_providers_ver="1.7.0"
_relx_ver="3.24.3"
_ssl_verify_fun_ver="1.1.3"
source="rebar3-$pkgver.tar.gz::https://github.com/erlang/rebar3/archive/$pkgver.tar.gz
	https://repo.hex.pm/tarballs/bbmustache-$_bbmustache_ver.tar
	https://repo.hex.pm/tarballs/certifi-$_certifi_ver.tar
	https://repo.hex.pm/tarballs/cf-$_cf_ver.tar
	https://repo.hex.pm/tarballs/cth_readable-$_cth_readable_ver.tar
	https://repo.hex.pm/tarballs/erlware_commons-$_erlware_commons_ver.tar
	https://repo.hex.pm/tarballs/eunit_formatters-$_eunit_formatters_ver.tar
	https://repo.hex.pm/tarballs/getopt-$_getopt_ver.tar
	https://repo.hex.pm/tarballs/providers-$_providers_ver.tar
	https://repo.hex.pm/tarballs/relx-$_relx_ver.tar
	https://repo.hex.pm/tarballs/ssl_verify_fun-$_ssl_verify_fun_ver.tar
	"
builddir="$srcdir/rebar3-$pkgver"

# XXX: rebar3 eunit reports no tests, so I guess there is none.  but I'm not sure.
# XXX: rebar3 bootstrap tries to download a package index (but all of the dependencies are predownloaded),
#      which means we need networking enabled

options="net !check"

_prepare_subpkg() {
	msg "unpacking $1 $2 to _build/default/lib"

	mkdir -p "$builddir/_build/default/lib/$1"

	cd "$builddir/_build/default/lib/$1"
	tar xf "$srcdir"/"$1"-"$2".tar
	tar zxf contents.tar.gz
	rm contents.tar.gz
	cd "$builddir"
}

prepare() {
	default_prepare

	cd "$builddir"

	_prepare_subpkg bbmustache		$_bbmustache_ver
	_prepare_subpkg certifi			$_certifi_ver
	_prepare_subpkg cf			$_cf_ver
	_prepare_subpkg cth_readable		$_cth_readable_ver
	_prepare_subpkg erlware_commons		$_erlware_commons_ver
	_prepare_subpkg eunit_formatters	$_eunit_formatters_ver
	_prepare_subpkg getopt			$_getopt_ver
	_prepare_subpkg providers		$_providers_ver
	_prepare_subpkg relx			$_relx_ver
	_prepare_subpkg ssl_verify_fun		$_ssl_verify_fun_ver

	ln -sf default "$builddir"/_build/bootstrap
}

build() {
	cd "$builddir"

	# DEBUG=1 gives us verbose build output
	# we use /tmp/rebar-build as home dir because rebar3 bootstrap downloads a package index and it cannot be disabled

	mkdir -p /tmp/rebar-build
	HOME=/tmp/rebar-build ./bootstrap

	# clean up
	rm -rf /tmp/rebar-build
}

package() {
	cd "$builddir"
	install -D -m0755 rebar3 "$pkgdir"/usr/bin/rebar3
}

sha512sums="c29471e241e144abf466382e18b022e6d06d10ee965de984d69f0fd7ba9f64745806e28c87c980ea3a8e01ff61562c434c6ced4aeaee2a2aedf4d24bde66801f  rebar3-3.5.0.tar.gz
de5ac693a1a1655838a657020e35a7e77c80fc39a0478f14381a830a1421b64af6d755ca12577cb4ff9ed70685631a471b7a16f9302eae81266ac7197c76bbc3  bbmustache-$_bbmustache_ver.tar
7e8fa461054c784d50d028e130641cfed1897206eca46f4b3067482607611aeeb90652f0075a1551a8672e635976088be6a2836f744ec1303775a0170fb1a2af  certifi-2.0.0.tar
0afbe335c6170f1f4efa6fb22111d8698abc288b1cc125fb69653958df1dbdb1a936f927309b460dc6cfa1fc2b15c82838b8935d5fa8e28dab1c050295608698  cf-0.2.2.tar
f18eabca5ed9739116c9195d38515ba1362d2f1ff0f93342b1bee6526044e059232118ad50118a68bfd3ffd6c020153cd6bec626036d0082e973737d552a9ab7  cth_readable-1.3.2.tar
350e09d1dc1e7e22be5f331f95c3e4375c03739edb3126c3994cdbd2aeee4bbab12c856197a10e5a97a21e633e86a8774087e215f60ec87412e745aced7093cc  erlware_commons-1.0.4.tar
e8692ff35f979dfaf99ccac58014429d300a71ff76f2ce945814a0d4d9431821f04f988dc0271271858a37e6903a73b4dd9ae3abf215333f3135fa883ec07022  eunit_formatters-0.5.0.tar
859642dc26c42414474fa8af8a32fed827b0773ac6d6eb51ec19c291672408e71619ad2bb0c7f08d84ff591b33a655a7e0b6241b94372e9cc816a648ee6cdaf6  getopt-1.0.1.tar
c942b6468df7a5562205d8c65415bbecdc8bc87416deb081ed524541db3e3706110ef49dc55c91e9914e2baaeb1323ac8e2f44d0013856501fd4eeb774d3722b  providers-1.7.0.tar
c05d2c143e66ef17e5ccd6d69216551616b0a25c11140235b7e6e8905c27cd2a1808f454533499710a1ecd3048280cc77e35a2ce4e547e4e127a3dfce7b96934  relx-3.24.3.tar
8d907b8746cb61806892965af3e12e95a4f2e552212993fe62f121ded5c8502907d8daf1228ae747ea81c3fa4bbd364747316a75790f4644146f3e77c2896c95  ssl_verify_fun-1.1.3.tar"