- def copyFromModule(self, module, name):
- if name in module:
- self.autoDebuildConfig[name] = module[name]
-
- def configure(self, force=False): # force is ignored
- self.autoDebuildConfig['version'] = self.vcs.version() # by now, data has been fetched, so this is possible
- self.vcs.ignore('/debian/') # make sure the debian folder is ignored
- os.chdir(self.sourceFolder)
- #print self.autoDebuildConfig
- self.files = auto_debuild.createDebianFiles(self.autoDebuildConfig)
- self.configured = True
-
- def build(self):
- if not self.configured: self.configure()
+ def build(self, reconfigure=False): # reconfigure is ignored (we always do a reconfiguration)
+ # create auto-debuild configuration
+ autoDebuildConfig = {
+ 'sourceName': self.module['name'],
+ 'buildSystem': self.module['buildSystem'],
+ 'debDir': self.debDir,
+ 'buildDir': self.buildFolder,
+ 'name': self.debName,
+ 'email': self.debEMail,
+ 'parallelJobs': self.jobs,
+ 'version': self.vcs.version(),
+ 'waitAfterConfig': self.waitAfterConfig,
+ }
+ if autoDebuildConfig['version'] is None:
+ raise Exception("VCS did not provide us with a proper version number, please fix this")
+ # copy some more optional configuration
+ for option in ('dbgPackage', 'section', 'withPython2', 'binarySkipFiles', 'binaryInstallFiles',
+ 'buildDepends', 'binaryDepends', 'binaryRecommends', 'binaryProvides',
+ 'cmakeParameters', 'automakeParameters'):
+ if option in self.module:
+ autoDebuildConfig[option] = self.module[option]
+ # create Debian files