summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/reflector/PKGBUILD12
-rw-r--r--libre/reflector/rebranding.patch132
2 files changed, 86 insertions, 58 deletions
diff --git a/libre/reflector/PKGBUILD b/libre/reflector/PKGBUILD
index ba202b072..ab95cbdec 100644
--- a/libre/reflector/PKGBUILD
+++ b/libre/reflector/PKGBUILD
@@ -1,10 +1,11 @@
# 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=2019.10
-pkgrel=2.parabola1
+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)
@@ -18,9 +19,9 @@ source=(
https://xyne.archlinux.ca/projects/reflector/src/reflector-${pkgver}.tar.xz.sig
rebranding.patch
)
-sha512sums=('9f39934456840f1a86036ed71eb942fff92a9b2cb7d0f679e1e9ab371ae21cc4da7035ba4dcc88919ceab41d45f5d07ae3abe336037d1785dc8231df0c97eb6c'
+sha512sums=('cdb1ae3806fca6dd7dd7dccc75ef677e70ceec5d61b140315ef88540513abd7131dc2260f261444d801490368ab73194c7718d974c6191c7c354fcb811ba35e2'
'SKIP'
- 'c38c90c428b9761e84d4cbc1cf6a679772264ae5a8aafc4cc961fa5fd1f63ef0628a9621944f2b51ff54d8092dea5cdfdb4d1d07b6c39c4ca57f0f50a942b923')
+ 'f9b86f7b63398adcd037a332d9f335b35f5a3dee7aeeb3b38e6ae11ed3b038c82bf47f9e94281bb2d1942f10056197209ce48433f1769f26554dbff6c9ad69ec')
validpgpkeys=('EC3CBE7F607D11E663149E811D1F0DC78F173680')
@@ -28,7 +29,9 @@ prepare ()
{
cd "$srcdir/$pkgname-$pkgver"
# Rebranding for Parabola
+ gunzip "man/${pkgname}.1.gz"
patch -Np1 -i "$srcdir/rebranding.patch"
+ gzip "man/${pkgname}.1"
}
package ()
@@ -36,4 +39,5 @@ 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"
}
diff --git a/libre/reflector/rebranding.patch b/libre/reflector/rebranding.patch
index 7cade23f5..1afa8e554 100644
--- a/libre/reflector/rebranding.patch
+++ b/libre/reflector/rebranding.patch
@@ -1,8 +1,17 @@
diff --git a/Reflector.py b/Reflector.py
-index 1f22f18..64d6453 100644
+index 5263316..3498174 100644
--- a/Reflector.py
+++ b/Reflector.py
-@@ -42,7 +42,7 @@ import urllib.request
+@@ -20,7 +20,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
+@@ -48,7 +48,7 @@ import urllib.request
NAME = 'Reflector'
@@ -11,59 +20,74 @@ index 1f22f18..64d6453 100644
DISPLAY_TIME_FORMAT = '%Y-%m-%d %H:%M:%S UTC'
PARSE_TIME_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
-@@ -436,7 +436,7 @@ def format_mirrorlist(mirror_status, mtime, include_country=False, command=None)
+@@ -440,7 +440,7 @@ def format_mirrorlist(mirror_status, mtime, include_country=False, command=None,
- 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 = ''
- mirrorlist = '{}\n{}\n{}\n'.format(border, header, border) + \
-@@ -496,8 +496,18 @@ class MirrorStatus():
- 'extra',
- 'gnome-unstable',
- 'kde-unstable',
-+ 'libre',
-+ 'libre-testing',
-+ 'libre-multilib',
-+ 'libre-multilib-testing',
- 'multilib',
-- 'multilib-testing'
-+ 'multilib-testing',
-+ 'nonprism',
-+ 'nonprism-testing',
-+ 'pcr',
-+ 'kernels',
-+ 'java',
-+ 'cross',
- 'staging',
- 'testing'
- )
-@@ -655,7 +665,7 @@ def add_arguments(parser):
- '''
- Add reflector arguments to the argument parser.
- '''
-- parser = argparse.ArgumentParser(description='retrieve and filter a list of the latest Arch Linux mirrors')
-+ parser = argparse.ArgumentParser(description='retrieve and filter a list of the latest Parabola GNU/Linux-libre mirrors')
+ 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(
+@@ -494,8 +494,18 @@ class MirrorStatus():
+ 'extra',
+ 'gnome-unstable',
+ 'kde-unstable',
++ 'libre',
++ 'libre-testing',
++ 'libre-multilib',
++ 'libre-multilib-testing',
+ 'multilib',
+- 'multilib-testing'
++ 'multilib-testing',
++ 'nonprism',
++ 'nonprism-testing',
++ 'pcr',
++ 'kernels',
++ 'java',
++ 'cross',
+ 'staging',
+ 'testing'
+ )
+@@ -638,7 +648,7 @@ def add_arguments(parser):
+ '''
+ Add reflector arguments to the argument parser.
+ '''
+- parser = argparse.ArgumentParser(description='retrieve and filter a list of the latest Arch Linux mirrors')
++ parser = argparse.ArgumentParser(description='retrieve and filter a list of the latest Parabola GNU/Linux-libre mirrors')
- parser.add_argument(
- '--connection-timeout', type=int, metavar='n', default=DEFAULT_CONNECTION_TIMEOUT,
-@@ -674,7 +684,7 @@ def add_arguments(parser):
+ parser.add_argument(
+ '--connection-timeout', type=int, metavar='n', default=DEFAULT_CONNECTION_TIMEOUT,
+@@ -657,7 +667,7 @@ 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.'
-+ help='The cache timeout in seconds for the data retrieved from the Parabola GNU/Linux-libre Mirror Status API. The default is %(default)s.'
- )
+ 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.'
++ help='The cache timeout in seconds for the data retrieved from the Parabola GNU/Linux-libre Mirror Status API. The default is %(default)s.'
+ )
- parser.add_argument(
-@@ -784,7 +794,7 @@ def parse_args(args=None):
- Parse command-line arguments.
- '''
- parser = argparse.ArgumentParser(
-- 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'
- )
- parser = add_arguments(parser)
- options = parser.parse_args(args)
+ parser.add_argument(
+@@ -769,7 +779,7 @@ def parse_args(args=None):
+ Parse command-line arguments.
+ '''
+ parser = argparse.ArgumentParser(
+- 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'
+ )
+ parser = add_arguments(parser)
+ options = parser.parse_args(args)
+diff --git a/man/reflector.1 b/man/reflector.1
+index 4a9a5d2..139dec6 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].