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

pkgname=boot-66serv
pkgdesc="Complete and portable set of services to properly boot a machine with 66 tools"
pkgver=2.4.1
_pkgver=v2.4.1
pkgrel=06
groups=('s6-suite')
backup=('etc/66/rc.local')
url="https://git.obarun.org/obmods/${pkgname}"
source=("${pkgname}::git+${url}#tag=${_pkgver}"
	boot.install)
install=boot.install

makedepends=('git')

build() {
	cd "${pkgname}"
	./configure \
		--bindir=/usr/bin \
		--with-system-service=/usr/lib/66/service \
		--with-system-module=/usr/lib/66/module \
		--with-system-script=/usr/lib/66/script
}

package() {
	cd "${pkgname}"
	depends=('66>=0.6.1.3' '66-tools>=0.0.7.3' 's6-linux-utils' 's6-portable-utils' 'util-linux' 'iproute2' 'kmod' 'opentmpfiles' 'obsysusers' 'modules' 'iptables')  # Obarun has this as optional but it is part of base and boot crashes without it
	optdepends=('nftables: nftables support' 'ebtables: ebtables support' 'arptables: arptables support' 'dmraid: dmraid support' 'lvm2: lvm support' 'btrfs-progs: btrfs support' 'cryptsetup: encryption support')
	make DESTDIR="${pkgdir}" install
}

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

arch=('x86_64')

license=('0BSD')

sha256sums=(SKIP
	f7e81047005998f6db00c187835c9aa3248d73c2f50b97617e48851825f65ad6) #  boot.install

##  1a265b56499e3f63d7d511c497e3f60a51dd98b938503c6e8c24656eafe57ab6  boot-66serv-2.4.1-06-x86_64.pkg.tar.lz
