# Private integration package. Retain upstream assets/dependencies and replace
# only the binary with the recorded Arch-built digest-name probe.
pkgname=toolbox
pkgver=0.3
pkgrel=2.1
pkgdesc='Unprivileged development environment (Archipelago private digest-name probe)'
arch=('x86_64')
url='https://github.com/containers/toolbox'
license=('Apache-2.0')
depends=('flatpak' 'glibc' 'podman' 'shadow')
options=('!strip' '!debug')
source=('toolbox-stock.pkg.tar.zst' 'toolbox-patched')
noextract=('toolbox-stock.pkg.tar.zst')
sha256sums=('c81cffcff319ea2df936fa41323e83a0c697fce14c0d883ce88387bb235254f4'
            '1c3e56b03da2ac497975965c62a8a40b9ddccdad0441bdf2a589a40c0b368de8')

package() {
    bsdtar -xf "$srcdir/toolbox-stock.pkg.tar.zst" -C "$pkgdir" \
        --exclude=.PKGINFO --exclude=.BUILDINFO --exclude=.MTREE
    install -m0755 "$srcdir/toolbox-patched" "$pkgdir/usr/bin/toolbox"
}
