remove any KDE special treatment from sourcecode, this is all a matter of configurati...
authorRalf Jung <post@ralfj.de>
Tue, 31 Jul 2012 11:14:56 +0000 (13:14 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 31 Jul 2012 11:14:56 +0000 (13:14 +0200)
config.py.sample
kdebuildpy.py
vcs.py

index cf1b36e3ac50355b8adca125654cf24425bc017a..672c79d12e933f9cbc42df8bb220e264d071df2c 100644 (file)
@@ -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):
 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['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 = [
        return module
 # the modules we are interested in
 modules = [
index 38e74c23905f541085bd99c478f2f4236d0d9587..91ce798dcd2caaeac6ec131987110d0e36ad57c2 100755 (executable)
@@ -33,18 +33,18 @@ class Project:
                self.folder = folder
                self.name = module['name']
                # VCS
                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:
                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 buildSystemName == 'cmake':
                                self.buildSystem = build_system.CMake(self.sourceFolder(), self.buildFolder(), module, config)
                        else:
diff --git a/vcs.py b/vcs.py
index f7a99c10d006557918a17e4f6497e463cb5a0d10..b2387c7f53eb65e2207a9577bdb613652a7ffde0 100644 (file)
--- a/vcs.py
+++ b/vcs.py
@@ -52,10 +52,6 @@ class Git:
                if v.startswith('v'): v = v[1:]
                return v
 
                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):
 # Fetch updates via SVN
 class SVN:
        def __init__(self, folder, svnPath, versionName):
@@ -72,7 +68,3 @@ class SVN:
 
        def version(self):
                return self.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)