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

pkgname=pm2ml
pkgver=2021.11.20.1
pkgrel=02
pkgdesc='Generate metalinks for downloading Pacman packages and databases.'
arch=(any)
url="https://xyne.dev/projects/pm2ml"
depends=(pyalpm python3 python3-xcgf python3-xcpf)
optdepends=('aria2: ppl script support.' 'python3-aur: AUR support' 'reflector: Reflector support')
backup=(etc/ppl.conf)
source=(
  https://xyne.dev/projects/pm2ml/src/pm2ml-2021.11.20.1.tar.xz
  https://xyne.dev/projects/pm2ml/src/pm2ml-2021.11.20.1.tar.xz.sig
)

package ()
{
  cd "$srcdir/$pkgname-$pkgver"
  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
  for foo_ in ppl pplsyu ppls; do
    install -Dm755 "$foo_" "$pkgdir/usr/bin/$foo_"
  done
  install -Dm644 "ppl.conf" "$pkgdir/etc/ppl.conf"
}

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

license=(GPL)

validpgpkeys=('EC3CBE7F607D11E663149E811D1F0DC78F173680')

sha256sums=(5a8e16af5a6c3f634275ee2721f984917d2f25806b2d51517d3ecd855e97278c #  pm2ml-2021.11.20.1.tar.xz
	a08f69f614a9915dd469e7a5f92a5b18d3da4de2b099b34b04f55fb5a6d11be6) #  pm2ml-2021.11.20.1.tar.xz.sig
