- sourceName = config['sourceName']
- binaryName = config.get('binaryName', sourceName+'-local')
- name = config.get('name', os.getenv('USER')) # os.getlogin() fails in minimal chroots
- email = config.get('email', os.getenv('USER')+'@'+os.uname()[1]) # user@hostname
- debDir = os.path.expanduser(config['debDir'])
- buildSystem = buildSystems[config['buildSystem']] # get the data immediately
- version = config['version']
- dbgPackage = config.get('dbgPackage', False)
- parallelJobs = int(config.get('parallelJobs', 2))
- packageArchitecture = config.get('architecture', 'any')
- withPython2 = config.get('withPython2', False)
+ if not isinstance(config, ConfigDict):
+ config = ConfigDict(config)
+ sourceName = config.getstr('sourceName')
+ binaryName = config.getstr('binaryName', sourceName+'-local')
+ config['binaryName'] = binaryName # make it usable by build systems
+ name = config.getstr('name', os.getenv('USER')) # os.getlogin() fails in minimal chroots
+ email = config.getstr('email', os.getenv('USER')+'@'+os.uname()[1]) # user@hostname
+ debDir = os.path.expanduser(config.getstr('debDir'))
+ buildSystem = buildSystems[config.getstr('buildSystem')] # get the data immediately
+ version = config.getstr('version') # version name excluding epoch (used for filenames)
+ fullVersion = str(config.getint('epoch'))+':'+version if 'epoch' in config else version # version name including epoch
+ dbgPackage = config.getbool('dbgPackage', False)
+ parallelJobs = config.getint('parallelJobs', 2)
+ packageArchitecture = config.getstr('architecture', 'any')
+ withPython2 = config.getbool('withPython2', False)
+ withAutoreconf = config.getbool('withAutoreconf', False)
+ # add some build dependencies (a bit hacky adding it to the build system...)