#!/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=jobbot
pkgdesc='Minimal set of packages to maintain the building chroot for JOBORun Linux'
pkgver=0.3
pkgrel=02
groups=( jobbot )
arch=(x86_64)
source=( README-jobbot.txt Qsq ckchroot)
depends=( acl archlinux-keyring obarun-keyring joborun-keyring attr audit bash
	binutils brotli bzip2 ca-certificates ca-certificates-mozilla ca-certificates-utils
	coreutils cower curl db dbus diffutils e2fsprogs elfutils expat fakeroot file
	filesystem findutils flex gawk gc gcc gcc-libs gdbm glib2 glibc gmp gnupg gnutls gpgme
	grep groff guile gzip hwdata iana-etc icu iproute2 iptables iputils jansson keyutils
	kmod krb5 less libarchive libassuan libcap libcap-ng libelf libeudev libffi libgcrypt
	libgpg-error libidn2 libisl libksba libldap libmnl libmpc libnetfilter_conntrack
	libnfnetlink libnftnl libnghttp2 libnl libp11-kit libpcap libpsl libsasl libseccomp
	libsecret libssh2 libtasn1 libtirpc libtool libunistring libverto libxcrypt licenses linux-api-headers
	lz4 m4 make mpfr nano ncurses nettle npth numactl openssl openssl-1.1 opensysusers p11-kit package-query pacman
	pacman-contrib pacman-mirrorlist pam pambase patch pciutils pcre pcre2 perl pinentry
	pkgconf procps-ng psmisc readline sed shadow sqlite sudo tar texinfo tzdata util-linux
	util-linux-libs wget which xz yajl zlib zsh zstd )

package() {
  cd "$pkgdir"
   install -d -m777 "$pkgdir"/src
   install -Dm644 "$srcdir"/README-jobbot.txt "$pkgdir"/src/README-jobbot.txt
   install -Dm644 "$srcdir"/Qsq "$pkgdir"/src/Qsq  # When jobbot is installed this can be produced
# ... by running 'pacman -Qsq >/src/Qsq' 
   install -Dm755 "$srcdir"/ckchroot "$pkgdir"/usr/local/bin/ckchroot
# This ckchroot script runs 'pacman -Qsq >/tmp/Qsq' and then compares it to /src/Qsq
}

#---- license gpg-key sha256sums ----

license=('ISC')

sha256sums=(7f0b1d6bff4b8ce726c9acf68e86f6cc88dc9c7e60b6567048427c9f26dd3bfd  # README-jobbot.txt
	8a9a5542d4d462aa5ba9dc16363f9fbbe8483ffd72e96fe434bab1a32de34700  #  Qsq
	50febbb21bb779f43b93c7f8e65ba4cbff0c6b32cddd45ecb9118fc801581d99) # ckchroot

