. ../../APKBUILD.template : ${pkgname:?"No package prefix provided"} : ${_rx_openrc_svcname:="redxen.$_rx_pkgname"} pkgname="$pkgname-openrc-$_rx_pkgname" pkgdesc="RedXen openrc configuration: $_rx_pkgname" depends="openrc $_rx_pkgname redxen-config-$_rx_pkgname" source="runfile conffile" rx_openrc_runfile_link() { mkdir -p "$(rx_cpkgdir)"/etc/init.d ln -s "${1:-$_rx_pkgname}" "$(rx_cpkgdir)"/etc/init.d/"${2:-$_rx_openrc_svcname}" } rx_openrc_runfile_install() { _rx_fperm="755" _rx_installdir="/etc/init.d" rx_install "${1:-runfile}" "${2:-$_rx_openrc_svcname}" } rx_openrc_conffile_install() { _rx_fperm="644" _rx_installdir="/etc/conf.d" rx_install "${1:-conffile}" "${2:-$_rx_openrc_svcname}" } rx_openrc_runlevel_add() { mkdir -p "$(rx_cpkgdir)"/etc/runlevels/"${2:-$_rx_openrc_grpname}" ln -s /etc/init.d/"${1:-$_rx_openrc_svcname}" "$(rx_cpkgdir)"/etc/runlevels/"${2:-$_rx_openrc_grpname}" } # Override default to install runfile and conffile package() { rx_openrc_runlevel_add rx_openrc_runfile_install rx_openrc_conffile_install }