- def copyOption(self, src, name, dstName = None):
- if dstName is None: dstName = name # per default, stick with original name
- if name in src:
- self.autoDebuildConfig[dstName] = src[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
- if self.autoDebuildConfig['version'] is None:
- raise Exception("VCS did not provide us with a proper version, please fix this")
- 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', 'binarySkipFiles', 'binaryInstallFiles',
+ 'buildDepends', 'binaryDepends', 'binaryRecommends', 'binaryProvides',
+ 'cmakeParameters', 'automakeParameters'):
+ if option in self.module:
+ autoDebuildConfig[option] = self.module[option]
+ # create Debian files