license = GPL
; A URL can have parametric language and version
-url = http://example.com/program-%(version)s-%(language)s.zip
+url_i386 = http://example.com/program-%(version)s-%(language)s.exe
+url_x64 = http://example.com/program-%(version)s-%(language)s.msi
+
+; If no Architecture-specific URL is available, use just 'url'
+;url = http://example.com/program-%(version)s-%(language)s.exe
version = 1.0
-md5 = 564ad4bb65013635017a04d5e7098b9e
+
+; TODO, checksums or signatures are not supported for now
+;md5 = 564ad4bb65013635017a04d5e7098b9e
#
# winfreed - download a selection of Free Software for MS Windows.
#
-# Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it>
+# Copyright (C) 2011-2014 Antonio Ospite <ao2@ao2.it>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
OUTPUT_DIR = 'downloads'
LANGCODE = 'en-US'
+# One of i386 or x64
+ARCHITECTURE = 'x64'
+
PKG_DIR = 'pkgs'
CHUNK_SIZE = 8192
def download(pkg):
- pkg_url = pkg['url']
+ try:
+ pkg_url = pkg['url_' + ARCHITECTURE]
+ except KeyError:
+ pkg_url = pkg['url']
download_file(pkg_url, OUTPUT_DIR)