jobcore/pacman-mirrorlist/PKGBUILD

47 lines
1.6 KiB
Bash

#!/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=20230226
pkgrel=02
pkgdesc="Arch Linux mirror list for use by pacman HTTPS ONLY"
url="https://www.archlinux.org/mirrorlist/"
backup=(etc/pacman.d/mirrorlist)
source=(https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/pacman-mirrorlist/trunk/mirrorlist
select)
# We have added a few of the mirrors from around the globe so pacman would work if none were selected
# NOTE on building this package:
# * Go to the trunk/ directory
# * Run bash -c ". PKGBUILD; updatelist"
# * Update the checksums, update pkgver
# * Build the package
## Jobo: Or replace the local source with the latest in trunk :P
updatelist() {
rm -f mirrorlist
curl -o mirrorlist https://archlinux.org/mirrorlist/all/
}
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"
}
#---- arch license gpg-key & sha256sums ----
arch=('any')
license=('GPL')
sha256sums=(aaa43f97adf0e0a5bbf8f2668237aa1d7aa35fd6e99d639602aabde09756c392 # mirrorlist
SKIP) # select
## f2d27b89bdf9e987f678b77bce57acb808898eac047204b0ffd9bbcc08384279 pacman-mirrorlist-20230226-02-any.pkg.tar.lz