#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=runit-service-scripts
pkgver=20240102 
pkgrel=01 
pkgdesc="A collection of services for runit"
groups=(base)
backup=("etc/runit/sv/" "etc/runit/runsvdir/default/") 
makedepends=(bash) 
url="https://git.disroot.org/joborun-pkg/repos/raw/branch/main" 
# this url_src is where the entire content of the runit-sv*.tar.xz is kept
# so collaborators can easily submit changes to be passed to packaging 
url_src="https://git.disroot.org/joborun/runit-service-scripts"
source=($url/runit-sv6.tar.xz
	rss.install)
install=rss.install

package() {
	depends=('runit' 'runit-rc')
	mkdir -p $pkgdir/usr/lib/runit/sv
	mkdir -p $pkgdir/etc/runit/runsvdir/default
	msg 'Copying services library to /usr/lib/runit/sv/ ...'
	cp -r $srcdir/usr/lib/runit/sv/* $pkgdir/usr/lib/runit/sv
	msg 'Copying links to default network services /etc/runit/runsvdir/default ...'
	cp -r $srcdir/etc/runit/runsvdir/default/* $pkgdir/etc/runit/runsvdir/default/
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=(GPL)

sha256sums=(04b51eed34d81e984d1cab3aad89a545eaf71a49a9340a73fca1c303373aa830  # runit-sv6.tar.xz
	3050f0484721a25d723cd0c50c4f4579d2d77b94965e28d734c19d3c4b9ec9ba) # rss.install

##  143b0607f5a47e0e39d2b065dc942be151e9dcbd8c34779e985026c9fb0ec445  runit-service-scripts-20240102-01-x86_64.pkg.tar.lz

