aboutsummaryrefslogtreecommitdiffstats
path: root/community/salt/APKBUILD
blob: c232d0bd0747102a77cf4ff0c2b72f24e4b3c298 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Olivier Mauras <olivier@mauras.ch>
# Maintainer: Olivier Mauras <olivier@mauras.ch>
pkgname=salt
pkgver=2016.11.4
pkgrel=0
pkgdesc="A parallel remote execution system"
url="https://github.com/saltstack/salt"
arch="noarch"
license="ASL-2.0"
depends="py2-tornado py2-yaml py2-jinja2 py2-markupsafe py2-msgpack py2-crypto py2-zmq
	py2-six py2-requests py2-futures py2-pygit2 py2-dateutil procps"
makedepends="python2-dev py2-libcloud"
subpackages="$pkgname-doc $pkgname-master $pkgname-minion $pkgname-syndic $pkgname-api
	$pkgname-cloud $pkgname-ssh"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/saltstack/$pkgname/tar.gz/v$pkgver
	salt-api.confd
	salt-api.initd
	salt-master.confd
	salt-master.initd
	salt-minion.confd
	salt-minion.initd
	salt-syndic.confd
	salt-syndic.initd
	0001-alpine-support.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	python2 setup.py build || return 1
}

package() {
	cd "$builddir"

	python2 setup.py install --root="$pkgdir"/ --optimize=1 || return 1
	mkdir -p "$pkgdir"/var/log/$pkgname
}

master() {
	pkgdesc="Management component for salt, a parallel remote execution system"
	depends="$pkgname"

	_init_copy master || return 1
	_conf_copy master || return 1

	local i; for i in cp key master run unity; do
		_submv usr/bin/salt-$i || return 1
	done
	_submv usr/bin/salt
}

minion() {
	pkgdesc="Client component for Salt, a parallel remote execution system"
	depends="$pkgname"

	_init_copy minion || return 1
	_conf_copy minion || return 1
	_conf_copy proxy || return 1

	local i; for i in call minion proxy; do
		_submv usr/bin/salt-$i || return 1
	done
}

syndic() {
	pkgdesc="Master-of-master component for Salt, a parallel remote execution system"
	depends="$pkgname-master"

	_submv usr/bin/salt-syndic
}

api() {
	pkgdesc="REST API for Salt, a parallel remote execution system"
	depends="$pkgname-master"

	_init_copy api && _submv usr/bin/salt-api
}

cloud() {
	pkgdesc="Cloud provisioner for Salt, a parallel remote execution system"
	depends="$pkgname-master py2-libcloud"

	_conf_copy cloud && _submv usr/bin/salt-cloud
}

ssh() {
	pkgdesc="Agentless SSH-based version of Salt, a parallel remote execution system"
	depends="$pkgname"

	_conf_copy roster && _submv usr/bin/salt-ssh
}

_submv() {
	local path="$1"
	mkdir -p "$subpkgdir"/${path%/*}
	mv "$pkgdir"/$path "$subpkgdir"/$path
}

_init_copy() {
	local type="$1"
	install -m 755 -D "$srcdir"/salt-$type.initd "$subpkgdir"/etc/init.d/salt-$type || return 1
	install -m 644 -D "$srcdir"/salt-$type.confd "$subpkgdir"/etc/conf.d/salt-$type || return 1
}

_conf_copy() {
	local type="$1"
	mkdir -p "$subpkgdir"/etc/salt/
	cp -r "$builddir"/conf/$type* "$subpkgdir"/etc/salt/
}

md5sums="3f750a9883a82ba875d2fb76e2e2cb23  salt-2016.11.4.tar.gz
322f17cc48aabdc8cbf5f0bccf3e2059  salt-api.confd
014e02c0aafafcd74179e32f5a3b55a8  salt-api.initd
7bb58f256213aaaa23d86d5127c9ffe3  salt-master.confd
0b40fd1b49ff4c2f34382fd69c341c34  salt-master.initd
75badf5042aa93a6da74659ca12bef70  salt-minion.confd
c8326b9cff0df6065a1320eefea09b2c  salt-minion.initd
a24d13b018a35b31b34167bcaa749db5  salt-syndic.confd
dffce15d3a16a2dc40dd02d0c24fb4c6  salt-syndic.initd
7736c86a3f2bfadab8c70a8e9ca6a45f  0001-alpine-support.patch"
sha256sums="de2aa28fff70119e4aedbe9a6f83f2df49e2c3c4c9aa8374e56596c267bd09e1  salt-2016.11.4.tar.gz
b25cfdb769305f2245b27f6753adee590bac10faeb8c43ba605dbf7e931fe258  salt-api.confd
f8918f2819b81e69af1b8564b90ec370942ed733aefd4b97e5d2446a892880eb  salt-api.initd
383475b21261ac22c5930e99060d53630dfb35aac67aa03a18ec738e0f4dff50  salt-master.confd
40c9864ab001c00de60b52baff5c9cf7c2c0f248a1e02fb15260ae70287bce70  salt-master.initd
286148f5391d42c04a62a13cc125fa2130b5821e50da913c5a20d3a913e5f2d1  salt-minion.confd
ae9236919c3fee3eef0ef8ad54334d6f833a51bbd4d42c40214614498acbe573  salt-minion.initd
66a663c426e2fa157ea78f7f9b2f33f17b72dbc48e119f8dd2609aab8f8370e7  salt-syndic.confd
6a453f63e51f2cc1ecb024ee8e7fa1beab7fbcea010f3eb10ea23bdb2383e7f5  salt-syndic.initd
cd07c61dec347678049bd436d99b2278e8e5c5c0c71899c37533cbe05975b6cc  0001-alpine-support.patch"
sha512sums="32830666dc2559b7894e0ffff3a6feb602275068be26e24216a473e45a6ff5c9048ff2bb97fef2cf25294a6a91c12c84015f1f7870d91853ca0d9a616efcc533  salt-2016.11.4.tar.gz
975ba2f5e681fbd62045da61cc3dc065b148683a07b5df7eca9f131e47314eb6bfa8660ca1c06a3bd93683c7097d0ff9f8e514273dd24d82fb2de6a255e6b275  salt-api.confd
435d399bfecf431d0c713031e2ae57ce25b5c6edc98b62f33bd7a4ff1c587e3cdeb988445ae0c3e9ffc1911555c3694654d98815f9562b8a14bf0688ec1ebea6  salt-api.initd
cfbbeb8023a383e7c42d84e3346edfd068c9ec7650c4ddc3caa38534da325a67497e1f06ca02cc1f0941b7348a3af6d1dca7cd6f2bcb3612ca10e1ec98997e5a  salt-master.confd
324e687e8b0eaccb799b4a719448341a4e09cda3add102890beddaf371ac42957bbc1622f145b2b86420061655bb27f27879302b5b34c6eee1987d2dcae6b8ef  salt-master.initd
0051e13351cef8db81dc075a194bb384723f07d5591b5b4d3f3adf4180afaf7beced470ab79ceca9d1ec0dae62dbd72084eb76af009fc78411a011050a94a2ed  salt-minion.confd
c6634a592c6f3e65dd2b704cb500486bf8004c5b287d4a4d42b09af36ef129c59d6a89f005af058cf7911e8587d927b3db931186569084f13ebaca56f6ef93a0  salt-minion.initd
bafc6ea10cdafd0aef868feb35aecbe4ae6a7dff0ae42862bded85715ad763eb89e1ed27437866a7e5f2b9f7064e3c2a3fb59814487744ba4227238d95cf3818  salt-syndic.confd
d71133e834685304e0167554035ebbc861252f972bbe981cc71e45b70f15d94a28a02a369463c9a641372919689f96b62a0408b14f824ad986d536e52b1e5ec0  salt-syndic.initd
9af1b09d97d7eabae38b8313240b36e6e959c6dc8f24630f20f0788802740cad5bd6dc8960e0ae98f8b61bb732b4ee7e5a5a20d5f31a072f6323062fe97ddc2a  0001-alpine-support.patch"