Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions munkipkg
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def get_build_info(project_dir, options):
supported_keys = ['name', 'identifier', 'version', 'ownership',
'install_location', 'postinstall_action',
'suppress_bundle_relocation',
'distribution_style', 'signing_info']
'distribution_style', 'signing_info','distribution']
build_file = os.path.join(project_dir, BUILD_INFO_FILE)
file_type = None
if not options.yaml and not options.json:
Expand Down Expand Up @@ -555,7 +555,6 @@ def add_signing_options_to_cmd(cmd, build_info, options):
else:
cmd.extend(['--timestamp=none'])


def build_pkg(build_info, options):
'''Use pkgbuild tool to build our package'''
cmd = [PKGBUILD,
Expand Down Expand Up @@ -603,7 +602,14 @@ def build_distribution_pkg(build_info, options):
build_info['project_dir'], REQUIREMENTS_PLIST)
if os.path.exists(requirements_plist):
cmd.extend(['--product', requirements_plist])
cmd.extend(['--package', pkginputname, distoutputname])
if 'distribution' in build_info:
distributionname = os.path.join(build_info['project_dir'], build_info['distribution']['name'])
if os.path.exists(distributionname):
cmd.extend(['--distribution', distributionname])
cmd.extend(['--resources', build_info['distribution']['resources']])
cmd.extend(['--package-path', build_info['build_dir'], distoutputname])
else:
cmd.extend(['--package', pkginputname, distoutputname])

retcode = subprocess.call(cmd)
if retcode:
Expand Down