# we override almost everything

pkgver=20200629
pkgrel=1
pkgdesc='Tools for Arch Linux 32 package maintainers and build slave operators'
license=('GPL')
url='https://git.archlinux32.org/archlinux32/devtools32/'
source=(
  "https://sources.archlinux32.org/sources/${pkgname}32-v${pkgver}.tar.gz"{,.sig}
)
sha512sums=('f6ac45b5b86e6e80435eb3c64ecea1f36292a1146a8317c63e77f7952609f9924a4a4e5a6908e0ed8f0d3a227fc851eddfd078a9b1220ba8af5fe5668c9d274f'
            'SKIP')
validpgpkeys=('DE9F7688CACF04FEB81A6C590AEEC90755DA7B5A')
unset sha256sums
unset md5sums
unset b2sums

makedepends+=('asciidoc')

eval "$(
  {
    declare -f prepare || \
    printf 'prepare() {\n}\n'
  } \
  | sed '
    $i cd "${srcdir}/${pkgname}32-v${pkgver}" \
       sed -i '"'"' \
         s,\\\$working_dir/etc/pacman\\\.d/mirrorlist32,/dev/null, \
         s/mirrorlist32/mirrorlist/g \
       '"'"' '"'"'arch-nspawn.in'"'"' \
       sed -i '"'"'\\@s,/mirrorlist\\\\\\\$\\\$,\\\\032,;\\?@d'"'"' '"'"'Makefile'"'"'
  '
)"

eval "$(
  declare -f prepare build check package | \
    sed '
      s/\(\${pkgname}\)-/\132-v/g
    '
)"