40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
pkgname=redxen-openrc-$_svcname
|
|
url="https://git.redxen.eu/RedXen/aports"
|
|
arch="noarch"
|
|
license="none"
|
|
depends="openrc $_svcname redxen-config-$_svcname"
|
|
pkgdesc="RedXen service config for $_svcname"
|
|
source="runfile conffile"
|
|
options="!check"
|
|
builddir="$srcdir"
|
|
|
|
openrc_rx_add_to_runlevel() {
|
|
mkdir -p "${1:-$pkgdir}"/etc/runlevels/"${3:-$_grpname}"
|
|
ln -s /etc/init.d/"${2:-${_svcname}.redxen}" "${1:-$pkgdir}"/etc/runlevels/${3:-$_grpname}
|
|
}
|
|
|
|
openrc_rx_install_runfile() {
|
|
install -Dm755 "${2:-runfile}" "${1:-$pkgdir}"/etc/init.d/"${3:-${_svcname}.redxen}"
|
|
}
|
|
|
|
openrc_rx_install_conffile() {
|
|
install -Dm644 "${2:-conffile}" "${1:-$pkgdir}"/etc/conf.d/"${3:-${_svcname}.redxen}"
|
|
}
|
|
|
|
openrc_rx_link_original() {
|
|
mkdir -p "${1:-$pkgdir}"/etc/init.d
|
|
ln -s "${2:-$_svcname}" "${1:-$pkgdir}"/etc/init.d/"${3:-${_svcname}.redxen}"
|
|
}
|
|
|
|
openrc_rx_link_instance() {
|
|
mkdir -p "${1:-$pkgdir}"/etc/init.d
|
|
ln -s "${2:-$_svcname}".redxen "${1:-$pkgdir}"/etc/init.d/"$3"
|
|
}
|
|
|
|
package() {
|
|
openrc_rx_add_to_runlevel
|
|
openrc_rx_install_runfile
|
|
openrc_rx_install_conffile
|
|
}
|
|
|