summaryrefslogtreecommitdiff
path: root/libre/reflector
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
commit65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch)
treefbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /libre/reflector
parentd53c44f055929b18d7d1b25f8367ee5836c435fc (diff)
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'libre/reflector')
-rw-r--r--libre/reflector/PKGBUILD42
-rw-r--r--libre/reflector/rebranding.patch63
2 files changed, 105 insertions, 0 deletions
diff --git a/libre/reflector/PKGBUILD b/libre/reflector/PKGBUILD
new file mode 100644
index 000000000..d3b64fd8e
--- /dev/null
+++ b/libre/reflector/PKGBUILD
@@ -0,0 +1,42 @@
+#Maintainer: Xyne <ac xunilhcra enyx, backwards>
+#Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
+pkgname=reflector
+pkgver=2013.12.15.1
+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="http://xyne.archlinux.ca/projects/reflector"
+depends=(python3)
+source=(
+ http://xyne.archlinux.ca/projects/reflector/src/reflector-2013.12.15.1.tar.xz
+ http://xyne.archlinux.ca/projects/reflector/src/reflector-2013.12.15.1.tar.xz.sig
+ rebranding.patch
+)
+sha512sums=(
+ ac8a23fb6746d85ee4e4d707659da07f5a7b6c18cadba03c8b03430cae70f444e6b35404342da2f9c0ea490e8c4c0f408657880de00a57d9f94d4ab335aa7c55
+ SKIP
+ 83609177f88c0412f1a543f0431ecfb8be229bfef76d7087c35e9273988faedaf24a98ca45d98248eb5dfaa9a27e321dea99a256c68c5bc86a8a0ba53ed56d02
+)
+md5sums=(
+ ccb315013442b7c8aa42c1d017835d38
+ 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)