Browse Source

reflector with parabola's rebrand

main
sseneca 5 months ago
parent
commit
b31bcc7f87
  1. 52
      reflector/PKGBUILD
  2. 88
      reflector/rebranding.patch

52
reflector/PKGBUILD

@ -0,0 +1,52 @@
#Maintainer: Xyne <gro xunilhcra enyx, backwards>
#Contributor: sseneca <ac eness em, backwards>
pkgname=reflector
pkgver=2021.11
pkgrel=2
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.dev/projects/reflector"
replaces=(${pkgname}-parabola)
conflicts=(${pkgname}-parabola)
depends=(python3)
optdepends=('rsync: rate rsync mirrors')
backup=(etc/xdg/reflector/reflector.conf)
source=(
https://xyne.dev/projects/reflector/src/reflector-2021.11.tar.xz
https://xyne.dev/projects/reflector/src/reflector-2021.11.tar.xz.sig
rebranding.patch
)
sha512sums=(
8b7f3cebce9d1f18ecda55d3fe3440eaca51733826c764b2f6ee52edc1e8a31a4b4ae3aa415688c975425888eb30ff8791c8525a629928b064502ddbde93da3e
fa4e1371fdc91639350200d0e0ac7ca5159d544a53949f93caf2a9636b25c04930f5058b12d42fae9d1776148cb02081f83e6fc19a594eb6e2b8167e29865763
4f084c81dc2ee6dabb4a0401f556c6f876000eaabaf516e7d38ec3922f13b88346d3ef6fb6a548c08fedba63c12e7128a68d269dfb448d27510ef052b741e93a
)
md5sums=(
b3c5051d6aa5d80de77d9e3905953e39
4e715de9dc7f7f935621cf10a3d63a24
1ae7065c9ad1a07dbd3a14a8d36706bf
)
validpgpkeys=('EC3CBE7F607D11E663149E811D1F0DC78F173680')
prepare ()
{
cd "$pkgname-$pkgver"
# Rebranding for Parabola
gunzip "man/${pkgname}.1.gz"
patch -Np1 -i ../rebranding.patch
gzip "man/${pkgname}.1"
}
package ()
{
cd "$srcdir/$pkgname-$pkgver"
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
install -Dm644 "man/${pkgname}.1.gz" "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"
install -Dm644 'reflector.service' "$pkgdir/usr/lib/systemd/system/reflector.service"
install -Dm644 'reflector.timer' "$pkgdir/usr/lib/systemd/system/reflector.timer"
install -Dm644 'reflector.conf' "$pkgdir/etc/xdg/reflector/reflector.conf"
}
# vim: set ts=2 sw=2 et:

88
reflector/rebranding.patch

@ -0,0 +1,88 @@
diff --git a/Reflector.py b/Reflector.py
index f74b2ff..bf7cf4b 100644
--- a/Reflector.py
+++ b/Reflector.py
@@ -21,7 +21,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
-Retrieve Arch Linux mirrors.
+Retrieve Parabola GNU/Linux-libre mirrors.
'''
import argparse
@@ -50,7 +50,7 @@ import urllib.request
NAME = 'Reflector'
-URL = 'https://archlinux.org/mirrors/status/json/'
+URL = 'https://www.parabola.nu/mirrors/status/json/'
DISPLAY_TIME_FORMAT = '%Y-%m-%d %H:%M:%S UTC'
PARSE_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
@@ -606,7 +606,7 @@ def format_mirrorlist(
width = 80
colw = 11
- header = '# Arch Linux mirrorlist generated by Reflector #'.center(width, '#')
+ header = '# Parabola GNU/Linux-libre mirrorlist generated by Reflector #'.center(width, '#')
border = '#' * len(header)
mirrorlist = f'{border}\n{header}\n{border}\n\n' + \
'\n'.join(
@@ -661,8 +661,18 @@ class MirrorStatus():
'extra',
'gnome-unstable',
'kde-unstable',
+ 'libre',
+ 'libre-testing',
+ 'libre-multilib',
+ 'libre-multilib-testing',
'multilib',
'multilib-testing'
+ 'nonprism'
+ 'nonprism-testing'
+ 'pcr'
+ 'kernels'
+ 'java'
+ 'cross'
'staging',
'testing'
)
@@ -836,8 +846,8 @@ def add_arguments(parser):
parser.add_argument(
'--cache-timeout', type=int, metavar='n', default=DEFAULT_CACHE_TIMEOUT,
help=(
- '''The cache timeout in seconds for the data retrieved from the Arch
- Linux Mirror Status API. The default is %(default)s. '''
+ '''The cache timeout in seconds for the data retrieved from the Parabola
+ GNU/Linux-libre Mirror Status API. The default is %(default)s. '''
)
)
@@ -1030,7 +1040,7 @@ def parse_args(args=None):
Parse command-line arguments.
'''
parser = MyArgumentParser(
- description='retrieve and filter a list of the latest Arch Linux mirrors',
+ description='retrieve and filter a list of the latest Parabola GNU/Linux-libre mirrors',
fromfile_prefix_chars='@'
)
parser = add_arguments(parser)
diff --git a/man/reflector.1 b/man/reflector.1
index bc26306..35a0b07 100644
--- a/man/reflector.1
+++ b/man/reflector.1
@@ -11,8 +11,8 @@ reflector - retrieve and filter the latest Pacman mirrorlist
.SH DESCRIPTION
.PP
reflector is a Python script and associated Python module that can
-retrieve up-to-date Arch Linux mirror data from the Mirror
-Status (https://www.archlinux.org/mirrors/status/) web interface.
+retrieve up-to-date Parabola GNU/Linux-libre mirror data from the
+Mirror Status (https://www.parabola.nu/mirrors/status/) web interface.
.SH ARGUMENTS
.PP
See \f[C]reflector --help\f[R].
--
2.35.0
Loading…
Cancel
Save