+ buildDir = config.get('buildDir', 'build.dir') # "build" is not a good idea, as that's also the name of a target...
+ srcDir = os.getcwd()
+ r = RulesFile()
+ r.dh += ["--buildsystem=cmake", "--builddirectory="+buildDir] # dh parameters
+ r.rules['auto_configure'] = [
+ safeCall(["mkdir", "-p", buildDir]),
+ safeCall(["cd", buildDir]) + " && " +
+ safeCall(["cmake", srcDir, "-DCMAKE_INSTALL_PREFIX=/usr"] + config.get('cmakeParameters', []))
+ ]
+ r.rules['auto_clean'] = [safeCall(['rm', '-f', os.path.join(buildDir, 'CMakeCache.txt')])] # clean old cmake cache
+ return r
+
+def automakeRules(config):