defaultGitVersion = 'origin/master' # or 'origin/KDE/4.8' or 'v4.8.4'
defaultSvnVersion = 'trunk/KDE' # or 'branches/KDE/4.8' or 'tags/KDE/4.8.4'
def KDEGitModule(name, version=defaultGitVersion, **module):
- module['name'] = name
- module['vcs'] = 'kde+git'
+ module['name'] = 'kde:'+name
+ module['vcs'] = 'git'
+ module['build-system'] = 'cmake'
module['version'] = version
return module
def KDESvnModule(name, svnPath=defaultSvnVersion, **module):
module['name'] = name
- module['vcs'] = 'kde+svn'
- module['version'] = svnPath+'/'+name
+ module['vcs'] = 'svn'
+ module['build-system'] = 'cmake'
+ module['version'] = 'svn://svn.kde.org/home/kde/'+svnPath+'/'+name
return module
# the modules we are interested in
modules = [
self.folder = folder
self.name = module['name']
# VCS
- vcsName = module.get('vcs', 'kde+git')
- if vcsName == 'kde+git':
- self.vcs = vcs.KDEGit(self.sourceFolder(), module['name'], module['version'])
- elif vcsName == 'kde+svn':
- self.vcs = vcs.KDESVN(self.sourceFolder(), module['svn-path'], module.get('versionName'))
+ vcsName = module['vcs']
+ if vcsName == 'git':
+ self.vcs = vcs.Git(self.sourceFolder(), module['name'], module['version'])
+ elif vcsName == 'svn':
+ self.vcs = vcs.SVN(self.sourceFolder(), module['svn-path'], module.get('versionName'))
else:
raise Exception("Unknown VCS type "+vcsName)
# build system
if config.get('buildDeb', False):
self.buildSystem = build_system.AutoDebuild(self.sourceFolder(), self.buildFolder(), module, self.vcs, config)
else:
- buildSystemName = module.get('build-system', 'cmake')
+ buildSystemName = module['build-system']
if buildSystemName == 'cmake':
self.buildSystem = build_system.CMake(self.sourceFolder(), self.buildFolder(), module, config)
else:
if v.startswith('v'): v = v[1:]
return v
-class KDEGit(Git):
- def __init__(self, folder, name, commit):
- Git.__init__(self, folder, 'kde:'+name, commit)
-
# Fetch updates via SVN
class SVN:
def __init__(self, folder, svnPath, versionName):
def version(self):
return self.versionName
-
-class KDESVN(SVN):
- def __init__(self, folder, svnPath, version):
- SVN.__init__(self, folder, 'svn://svn.kde.org/home/kde/'+svnPath, version)