diff options
author | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-03-11 19:23:22 +0000 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-03-11 19:26:41 +0000 |
commit | 709508c840bf5333f2ee5115afdcbf0cf331a263 (patch) | |
tree | 40137749d11a37238eeb55de9fb5bd0b8211043c /community/salt/APKBUILD | |
parent | 0b7c193a2f49aa4605403e307421eb663b777364 (diff) | |
download | aports-709508c840bf5333f2ee5115afdcbf0cf331a263.tar.bz2 aports-709508c840bf5333f2ee5115afdcbf0cf331a263.tar.xz |
community/salt: modernize
- Take maintainershiip
- Add openrc subpackages
Diffstat (limited to 'community/salt/APKBUILD')
-rw-r--r-- | community/salt/APKBUILD | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/community/salt/APKBUILD b/community/salt/APKBUILD index 293ac56c2c..7401dde63b 100644 --- a/community/salt/APKBUILD +++ b/community/salt/APKBUILD @@ -1,6 +1,6 @@ # Contributor: Francesco Colista <fcolista@alpinelinux.org> # Contributor: Olivier Mauras <olivier@mauras.ch> -# Maintainer: +# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org> pkgname=salt pkgver=2019.2.0 pkgrel=0 @@ -11,7 +11,11 @@ license="Apache-2.0" depends="py3-tornado py3-yaml py3-jinja2 py3-markupsafe py3-msgpack py3-crypto py3-zmq py3-six py3-requests py3-pygit2 py3-dateutil procps" makedepends="python3-dev py3-libcloud" -subpackages="$pkgname-doc $pkgname-master $pkgname-minion $pkgname-syndic $pkgname-api +subpackages="$pkgname-doc + $pkgname-master $pkgname-master-openrc:master_openrc + $pkgname-minion $pkgname-minion-openrc:minion_openrc + $pkgname-syndic $pkgname-syndic-openrc:syndic_openrc + $pkgname-api $pkgname-api-openrc:api_openrc $pkgname-cloud $pkgname-ssh" source="https://pypi.io/packages/source/s/salt/salt-$pkgver.tar.gz salt-api.confd @@ -39,7 +43,7 @@ check() { package() { cd "$builddir" - python3 setup.py install --root="$pkgdir"/ --optimize=1 || return 1 + python3 setup.py install --root="$pkgdir"/ --optimize=1 mkdir -p "$pkgdir"/var/log/$pkgname } @@ -47,40 +51,70 @@ master() { pkgdesc="Management component for salt, a parallel remote execution system" depends="$pkgname" - _init_copy master || return 1 - _conf_copy master || return 1 + _conf_copy master local i; for i in cp key master run unity; do - _submv usr/bin/salt-$i || return 1 + _submv usr/bin/salt-$i done _submv usr/bin/salt } +master_openrc() { + pkgdesc="Management component for salt, a parallel remote execution system (OpenRC init scripts)" + depends="openrc" + install_if="openrc $pkgname-master=$pkgver-$pkgrel" + + _init_copy master +} + 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 + _conf_copy minion + _conf_copy proxy local i; for i in call minion proxy; do - _submv usr/bin/salt-$i || return 1 + _submv usr/bin/salt-$i done } +minion_openrc() { + pkgdesc="Client component for Salt, a parallel remote execution system (OpenRC init scripts)" + depends="openrc" + install_if="openrc $pkgname-minion=$pkgver-$pkgrel" + + _init_copy minion +} + syndic() { pkgdesc="Master-of-master component for Salt, a parallel remote execution system" depends="$pkgname-master" - _init_copy syndic && _submv usr/bin/salt-syndic + _submv usr/bin/salt-syndic +} + +syndic_openrc() { + pkgdesc="Master-of-master component for Salt, a parallel remote execution system (OpenRC init scripts)" + depends="openrc" + install_if="openrc $pkgname-syndic=$pkgver-$pkgrel" + + _init_copy syndic } api() { pkgdesc="REST API for Salt, a parallel remote execution system" depends="$pkgname-master" - _init_copy api && _submv usr/bin/salt-api + _submv usr/bin/salt-api +} + +api_openrc() { + pkgdesc="REST API for Salt, a parallel remote execution system (OpenRC init scripts)" + depends="openrc" + install_if="openrc $pkgname-api=$pkgver-$pkgrel" + + _init_copy api } cloud() { @@ -105,8 +139,8 @@ _submv() { _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 + install -m 755 -D "$srcdir"/salt-$type.initd "$subpkgdir"/etc/init.d/salt-$type + install -m 644 -D "$srcdir"/salt-$type.confd "$subpkgdir"/etc/conf.d/salt-$type } _conf_copy() { |