Added --arch-pkg option to package.py

Otherwise, AUR packages don't work with Arch lookalikes like Manjaro.
This commit is contained in:
Virgil Dupras 2014-10-17 15:58:45 -04:00
parent 6e7b95b2cf
commit 79800bc6ed
2 changed files with 42 additions and 28 deletions

View File

@ -106,12 +106,22 @@ def get_module_version(modulename):
return mod.__version__
def setup_package_argparser(parser):
parser.add_argument('--sign', dest='sign_identity',
help="Sign app under specified identity before packaging (OS X only)")
parser.add_argument('--nosign', action='store_true', dest='nosign',
help="Don't sign the packaged app (OS X only)")
parser.add_argument('--src-pkg', action='store_true', dest='src_pkg',
help="Build a tar.gz of the current source.")
parser.add_argument(
'--sign', dest='sign_identity',
help="Sign app under specified identity before packaging (OS X only)"
)
parser.add_argument(
'--nosign', action='store_true', dest='nosign',
help="Don't sign the packaged app (OS X only)"
)
parser.add_argument(
'--src-pkg', action='store_true', dest='src_pkg',
help="Build a tar.gz of the current source."
)
parser.add_argument(
'--arch-pkg', action='store_true', dest='arch_pkg',
help="Force Arch Linux packaging type, regardless of distro name."
)
# `args` come from an ArgumentParser updated with setup_package_argparser()
def package_cocoa_app_in_dmg(app_path, destfolder, args):

View File

@ -214,7 +214,10 @@ def main():
if ISWINDOWS:
package_windows(edition, dev)
elif ISLINUX:
distname, _, _ = platform.dist()
if not args.arch_pkg:
distname, _, _ = platform.dist()
else:
distname = 'arch'
if distname == 'arch':
package_arch(edition)
else:
@ -224,3 +227,4 @@ def main():
if __name__ == '__main__':
main()