From 0847fb06e91eacd061980ca614957f2134692600 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 31 Jul 2012 13:14:56 +0200 Subject: [PATCH] remove any KDE special treatment from sourcecode, this is all a matter of configuration now --- config.py.sample | 10 ++++++---- kdebuildpy.py | 12 ++++++------ vcs.py | 8 -------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/config.py.sample b/config.py.sample index cf1b36e..672c79d 100644 --- a/config.py.sample +++ b/config.py.sample @@ -9,14 +9,16 @@ installCmdPrefix = [] 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 = [ diff --git a/kdebuildpy.py b/kdebuildpy.py index 38e74c2..91ce798 100755 --- a/kdebuildpy.py +++ b/kdebuildpy.py @@ -33,18 +33,18 @@ class Project: 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: diff --git a/vcs.py b/vcs.py index f7a99c1..b2387c7 100644 --- a/vcs.py +++ b/vcs.py @@ -52,10 +52,6 @@ class Git: 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): @@ -72,7 +68,3 @@ class SVN: 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) -- 2.30.2