summaryrefslogtreecommitdiff
path: root/libre/reflector/PKGBUILD
blob: ab95cbdec584c0f1786a2c1dd8895eeba82c2ae9 (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
40
41
42
43
# Maintainer (Arch): Xyne <ac xunilhcra enyx, backwards>
# Maintainer (Hyperbola): André Silva <emulatorman@parabola.nu>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: grizzlyuser <grizzlyuser@protonmail.com>

pkgname=reflector
pkgver=2020.3.21.2
pkgrel=1
pkgdesc='A Python 3 module and script to retrieve and filter the latest Pacman mirror list (Parabola rebranded)'
arch=(any)
license=(GPL)
url="https://xyne.archlinux.ca/projects/reflector"
replaces=(${pkgname}-parabola)
conflicts=(${pkgname}-parabola)
depends=(python3)
optdepends=('rsync: rate rsync mirrors')
source=(
  https://xyne.archlinux.ca/projects/reflector/src/reflector-${pkgver}.tar.xz
  https://xyne.archlinux.ca/projects/reflector/src/reflector-${pkgver}.tar.xz.sig
  rebranding.patch
)
sha512sums=('cdb1ae3806fca6dd7dd7dccc75ef677e70ceec5d61b140315ef88540513abd7131dc2260f261444d801490368ab73194c7718d974c6191c7c354fcb811ba35e2'
            'SKIP'
            'f9b86f7b63398adcd037a332d9f335b35f5a3dee7aeeb3b38e6ae11ed3b038c82bf47f9e94281bb2d1942f10056197209ce48433f1769f26554dbff6c9ad69ec')

validpgpkeys=('EC3CBE7F607D11E663149E811D1F0DC78F173680')

prepare ()
{
  cd "$srcdir/$pkgname-$pkgver"
  # Rebranding for Parabola
  gunzip "man/${pkgname}.1.gz"
  patch -Np1 -i "$srcdir/rebranding.patch"
  gzip "man/${pkgname}.1"
}

package ()
{
  cd "$srcdir/$pkgname-$pkgver"
  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
  install -Dm755 "$srcdir/$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 "man/${pkgname}.1.gz" "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"
}