make the prefix options optional; fix SVN for the case that the parent folder does...
authorRalf Jung <post@ralfj.de>
Thu, 13 Sep 2012 10:06:22 +0000 (12:06 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 13 Sep 2012 11:05:58 +0000 (13:05 +0200)
build_system.py
mass-build.conf.kde.sample
vcs.py

index bdca10aa66b144cffb39c4327930b89e47898fc6..1c0411bc02739d78068b3ebdafe0ec0dc1a941cc 100644 (file)
@@ -25,9 +25,9 @@ class CMake:
                if waitAfterConfig:
                        raw_input('Configuration done. Hit "Enter" to build the project. ')
                # run compilation
-               subprocess.check_call(self.config['buildCmdPrefix'] + ['make', '-j'+str(self.config['jobs'])])
+               subprocess.check_call(self.config.get('buildCmdPrefix', []) + ['make', '-j'+str(self.config['jobs'])])
                # run installation
-               subprocess.check_call(self.config['installCmdPrefix'] + ['make', 'install'])
+               subprocess.check_call(self.config.get('installCmdPrefix', []) + ['make', 'install'])
 
 # if auto-debuild is available, provide a wrapper for it
 try:
index 535b6d4a3b302b02db9c6a83dbb34b1952aa6661..4af7aafc172a2f47b10b98eea2187a87f157454c 100644 (file)
@@ -1,36 +1,36 @@
 # global configuration
 installDir = '/opt/kde'
+buildSystem = 'cmake'
 buildDir = 'build'
 buildType = 'Debug'
 jobs = 2
 buildCmdPrefix = ['nice']
 installCmdPrefix = []
-# helper function for the KDE modules - per default, they assume an SC 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):
+# helper function for the modules
+def KDEGitModule(name, **module):
        module['name'] = name
-       module['build-system'] = 'cmake'
        module['vcs'] = 'git'
-       module['url'] = 'kde:'+name # relies on the kde: prefix being set up for git
-       module['version'] = version
+       if 'url' not in module: module['url'] = 'kde:'+name
        return module
-def KDESvnModule(name, svnPath=defaultSvnVersion, **module):
+def KDESCSvnModule(name, svnPath='trunk/KDE', **module):
        module['name'] = name
-       module['build-system'] = 'cmake'
        module['vcs'] = 'svn'
-       module['url'] = 'svn://svn.kde.org/home/kde/'+svnPath+'/'+name
+       if 'url' not in module: module['url'] = 'svn://svn.kde.org/home/kde/'+svnPath+'/'+name
        return module
 # the modules we are interested in
 projects = [
        # KDE support
-       {'folder': 'kdesupport', 'projects': [
+       {'name': 'kdesupport',
+        'projects': [
        ]},
        # KDE SC
-       {'folder': 'kde-sc', 'projects': [
+       {'name': 'kde-sc',
+        'version': 'origin/master',
+        'projects': [
                # KDE core
-               KDESvnModule('oxygen-icons', '/trunk/kdesupport'), # released within the SC, but located in kdesupport...
+               KDESCSvnModule('oxygen-icons', '/trunk/kdesupport'), # released within the SC, but located in kdesupport...
                KDEGitModule('kdelibs'),
+               KDEGitModule('nepomuk-core'),
                KDEGitModule('kactivities'),
                KDEGitModule('kdepimlibs'),
                KDEGitModule('kde-runtime'),
@@ -38,13 +38,13 @@ projects = [
                KDEGitModule('kde-baseapps'),
                KDEGitModule('kdepim-runtime'),
                # KDE applications
-               KDESvnModule('kde-wallpapers'),
                KDEGitModule('konsole'),
                KDEGitModule('kate'),
                KDEGitModule('kwallet'),
        ]},
        # Extragear
-       {'folder': 'extragear', 'projects': [
-               KDEGitModule('networkmanagement', 'v0.9.0.4')
+       {'name': 'extragear',
+        'projects': [
+               KDEGitModule('networkmanagement', version='v0.9.0.4')
        ]},
 ]
diff --git a/vcs.py b/vcs.py
index 785a9ba35c4a1e10e649db55c4eaaf84d0032df6..0dc9685a265172dafbd73b6dffedf0c5e1a0294d 100644 (file)
--- a/vcs.py
+++ b/vcs.py
@@ -71,4 +71,5 @@ class SVN:
                        if forceVersion: subprocess.check_call(['svn', 'revert', '-R', '.'])
                        subprocess.check_call(['svn', 'switch', self.url]) # and update to the URL we got
                else:
+                       os.makedirs(self.folder) # if even the parent folder does not exist, svn fails
                        subprocess.check_call(['svn', 'co', self.url, self.folder]) # just download it