summaryrefslogtreecommitdiff
path: root/libre/reflector
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
commit8185891e28635bdb83fdf4ba4391030912dae596 (patch)
tree66a946535bdd228514750233b2cc99dd1866ff64 /libre/reflector
parent60a11f87366fdfbd114cdc91ff813518858e5f8d (diff)
Tue Feb 18 01:56:27 UTC 2014
Diffstat (limited to 'libre/reflector')
-rw-r--r--libre/reflector/PKGBUILD43
-rw-r--r--libre/reflector/rebranding.patch63
2 files changed, 106 insertions, 0 deletions
diff --git a/libre/reflector/PKGBUILD b/libre/reflector/PKGBUILD
new file mode 100644
index 000000000..c8bc6bd5e
--- /dev/null
+++ b/libre/reflector/PKGBUILD
@@ -0,0 +1,43 @@
+#Maintainer: Xyne <ac xunilhcra enyx, backwards>
+#Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
+pkgname=reflector
+pkgver=2014
+pkgrel=2.1
+pkgdesc='A Python 3 module and script to retrieve and filter the latest Pacman mirror list (Parabola rebranded)'
+arch=(any)
+license=(GPL)
+url="http://xyne.archlinux.ca/projects/reflector"
+depends=(python3)
+optdepends=('rsync: rate rsync mirrors')
+source=(
+ http://xyne.archlinux.ca/projects/reflector/src/reflector-2014.tar.xz
+ http://xyne.archlinux.ca/projects/reflector/src/reflector-2014.tar.xz.sig
+ rebranding.patch
+)
+sha512sums=(
+ ac9e0026019048c96be5dd4d156bf79b7d7616f764b5d8fb169cb09cbf629a3e2b1efb1ee7cb53b4e0cd109b985f598d9f80941714e47ed0f21c6417df9b073b
+ SKIP
+ 83609177f88c0412f1a543f0431ecfb8be229bfef76d7087c35e9273988faedaf24a98ca45d98248eb5dfaa9a27e321dea99a256c68c5bc86a8a0ba53ed56d02
+)
+md5sums=(
+ 69ab92b948ffe842189229d09bfbf1c0
+ SKIP
+ 24c2a21bc1ac0d3758d8043f36d95add
+)
+
+prepare ()
+{
+ cd "$srcdir/$pkgname-$pkgver"
+ # Rebranding for Parabola
+ patch -Np1 -i "$srcdir/rebranding.patch"
+}
+
+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"
+}
+
+
+# vim: set ts=2 sw=2 et:
diff --git a/libre/reflector/rebranding.patch b/libre/reflector/rebranding.patch
new file mode 100644
index 000000000..d78462b06
--- /dev/null
+++ b/libre/reflector/rebranding.patch
@@ -0,0 +1,63 @@
+diff --git a/Reflector.py b/Reflector.py
+index c046d23..ddf3ac8 100644
+--- a/Reflector.py
++++ b/Reflector.py
+@@ -63,7 +63,7 @@ def get_cache_file():
+
+ class MirrorStatus():
+ # JSON URI
+- URL = 'https://www.archlinux.org/mirrors/status/json/'
++ URL = 'https://parabolagnulinux.org/mirrors/status/json/'
+ # Mirror URL format. Accepts server base URL, repository, and architecture.
+ MIRROR_URL_FORMAT = '{0}{1}/os/{2}'
+ MIRRORLIST_ENTRY_FORMAT = "Server = " + MIRROR_URL_FORMAT + "\n"
+@@ -92,8 +92,12 @@ class MirrorStatus():
+ 'extra',
+ 'gnome-unstable',
+ 'kde-unstable',
++ 'libre',
++ 'libre-testing',
+ 'multilib',
+- 'multilib-testing'
++ 'multilib-testing',
++ 'nonprism',
++ 'pcr',
+ 'staging',
+ 'testing'
+ )
+@@ -449,7 +453,7 @@ class MirrorStatus():
+
+ 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 = '{}\n{}\n{}\n'.format(border, header, border) + \
+ '\n' + \
+@@ -516,7 +520,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', dest='connection_timeout', type=int, metavar='n', default=5,
+@@ -535,7 +539,7 @@ def add_arguments(parser):
+
+ parser.add_argument(
+ '--cache-timeout', dest='cache_timeout', type=int, metavar='n', default=300,
+- help='The cache timeout in seconds for the data retrieved from the Arch Linux Mirror Status API. The default is 300 (5 minutes).'
++ help='The cache timeout in seconds for the data retrieved from the Parabola GNU/Linux-libre Mirror Status API. The default is 300 (5 minutes).'
+ )
+
+ parser.add_argument(
+@@ -615,7 +619,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)