summaryrefslogtreecommitdiff
path: root/libre/pacman-mirrorlist/PKGBUILD
blob: cb507896fd196b17f4472920d48b6915cc203e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer (arch): Florian Pritz <bluewind@xinu.at>
# Contributor (arch): Dan McGee <dan@archlinux.org>
# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Esteban Carnevale <alfplayer@mailoo.org>


# Note: building and publishing this package is a bit peculiar
#   1: modify 'mirrorlist.txt' on the tier-0 repo server root
#   4: set 'pkgver' to YYYYMMDD
#   2: update 'sha256sums' (`makepkg -g`, `sha256sums`, `upgpkg`, etc)


pkgname=pacman-mirrorlist
pkgver=20211211
pkgrel=1.parabola1
pkgdesc="Parabola GNU/Linux-libre mirror list for use by pacman"
arch=(any)
url=https://wiki.parabola.nu/Repositories
license=(GPL)

backup=(etc/pacman.d/mirrorlist)
source=(mirrorlist-${pkgver}.txt::https://repo.parabola.nu/mirrorlist.txt)

sha256sums=('75f7424d1d84c239b913b282078f03e51087fb5b0a5cb5d8cfd2bac269c2bde5')


prepare()
{
  local dt=$( LC_ALL=C date -u +%Y-%m-%d )

  sed -i "s|\(Last Updated: \).*|\1${dt}|" "${srcdir}"/mirrorlist-${pkgver}.txt
}

package()
{
  mkdir -p "${pkgdir}"/etc/pacman.d
  install -m644 "${srcdir}"/mirrorlist-${pkgver}.txt "${pkgdir}"/etc/pacman.d/mirrorlist
}