#!/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=pacman-mirrorlist
pkgver=20230628
pkgrel=01
pkgdesc="Arch Linux mirror list for use by pacman HTTPS ONLY"
url="https://www.archlinux.org/mirrorlist/"
backup=(etc/pacman.d/mirrorlist)
source=(mirrorlist::https://gitlab.archlinux.org/archlinux/packaging/packages/pacman-mirrorlist/-/raw/main/mirrorlist
	select)

package() {
  mkdir -p "$pkgdir/etc/pacman.d"
# this removes all the non-https mirrorsites out of the list leaving only the ones with https
  cat select >> mirrorlist-https
  grep -v "http:" mirrorlist >> mirrorlist-https
  install -m644 "$srcdir/mirrorlist-https" "$pkgdir/etc/pacman.d/mirrorlist"
  install -m644 "$srcdir/mirrorlist" "$pkgdir/etc/pacman.d/mirrorlist-arch"
}

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

arch=('any')

license=('GPL')

sha256sums=(02810464e245b5a01196a855f3fa250f087158cc71653660e03ed0f0daed66f9  # mirrorlist
	SKIP) # select

##  099606d88a6da31c2b2875f6c9b201f8c2ac7edfe68fc3354fa549b956c20bbb  pacman-mirrorlist-20230628-01-any.pkg.tar.lz
