Add dummy ('none') build system for packages only containing a bunch of static files
[auto-debuild.git] / auto_debuild.py
index e629a23b985dbe79f345b3ca54c7b7aec0338a92..11845ded1ace00745ea5002e7b5ad404c02e13c4 100755 (executable)
@@ -30,7 +30,7 @@ def safeCall(*args):
                res += "'"+arg+"'"
        return res
 
-# Load a section-less config file: maps parameter names to strings or lists of strings (which are comma-separated or in separate lines)
+# Load a section-less config file: maps parameter names to space-separated lists of strings (with shell quotation)
 # Lines starting with spaces are continuation lines
 def loadConfigFile(file):
        import shlex
@@ -54,8 +54,7 @@ def loadConfigFile(file):
                                        # option line
                                        pos = line.index("=") # will raise exception when substring is not found
                                        curKey = line[:pos].strip()
-                                       value = line[pos+1:]
-                                       result[curKey] = shlex.split(value)
+                                       result[curKey] = shlex.split(line[pos+1:]) # shlex.split also strips
                        except Exception:
                                raise Exception("Invalid config, line %d: Error parsing line (quoting issue?)" % linenr)
        # add some convencience get functions
@@ -145,11 +144,18 @@ def pythonRules(config):
        ]
        return r
 
+def noneRules(config):
+       r = RulesFile()
+       r.dh += ["--buildsystem=makefile"] # makefile does the last possible harm
+       r.rules['auto_build'] = []
+       return r
+
 # build systems
 buildSystems = {
        'cmake': BuildSystem(cmakeRules, ["cmake"]),
        'automake': BuildSystem(automakeRules),
        'python': BuildSystem(pythonRules, ["python-setuptools"], ["${python:Depends}"]),
+       'none': BuildSystem(noneRules),
 }
 
 # utility functions