Commit cfaf102f authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

cerbero: Add a new version URL identifier %(maj_ver)s

For use in URLs that use the first two version components in the URL.

https://bugzilla.gnome.org/show_bug.cgi?id=797330
parent 3e7446d5
...@@ -68,7 +68,8 @@ class Source (object): ...@@ -68,7 +68,8 @@ class Source (object):
if name.startswith('gst') and name.endswith('-1.0'): if name.startswith('gst') and name.endswith('-1.0'):
# gst-libav-1.0, etc is useless for substitution, convert to 'gst-libav' # gst-libav-1.0, etc is useless for substitution, convert to 'gst-libav'
name = name[:-4] name = name[:-4]
return string % {'name': name, 'version': self.version} maj_ver = '.'.join(self.version.split('.')[0:2])
return string % {'name': name, 'version': self.version, 'maj_ver': maj_ver}
class CustomSource (Source): class CustomSource (Source):
......
...@@ -6,8 +6,7 @@ from cerbero.utils import needs_xcode8_sdk_workaround ...@@ -6,8 +6,7 @@ from cerbero.utils import needs_xcode8_sdk_workaround
class Recipe(recipe.Recipe): class Recipe(recipe.Recipe):
name = 'gnutls' name = 'gnutls'
version = '3.5.18' version = '3.5.18'
maj_ver = '.'.join(version.split('.')[0:2]) url = 'https://www.gnupg.org/ftp/gcrypt/%(name)s/v%(maj_ver)s/%(name)s-%(version)s.tar.xz'
url = 'https://www.gnupg.org/ftp/gcrypt/{0}/v{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version)
tarball_checksum = 'ae2248d9e78747cf9c469dde81ff8f90b56838b707a0637f3f7d4eee90e80234' tarball_checksum = 'ae2248d9e78747cf9c469dde81ff8f90b56838b707a0637f3f7d4eee90e80234'
stype = SourceType.TARBALL stype = SourceType.TARBALL
# main library is LGPLv2+ and binaries is GPLv3+ and defined below # main library is LGPLv2+ and binaries is GPLv3+ and defined below
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment