X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=cscript;h=ee483094577e4fd6497df6732ac4b882a3ee4a0c;hp=cc441ba0b57b24a307c201a268d187279e9bee09;hb=b0d658e5c5b953b38e341a90518b5e7b2108811a;hpb=48f5b7ecaca25b99afdb78ca0ccd28c27db8243f;ds=sidebyside diff --git a/cscript b/cscript index cc441ba0b..ee4830945 100644 --- a/cscript +++ b/cscript @@ -208,15 +208,17 @@ def can_build_disk(target): if target.platform == 'osx': return True if target.platform == 'linux': - if target.distro == 'ubuntu' and target.version in ['18.04', '20.04', '20.10', '21.04']: + if target.distro == 'ubuntu' and target.version != '16.04': return True - if target.distro == 'debian' and target.version == '10': + if target.distro == 'debian' and target.version != '9': return True if target.detail == 'appimage': return True if target.distro == 'fedora' and int(target.version) >= 31: return True - if target.distro == 'centos' and target.version == '8': + if target.distro == 'centos' and target.version != '7': + return True + if target.distro == 'mageia': return True return False @@ -301,7 +303,7 @@ def make_spec(filename, version, target, options, requires=None): print('%{_bindir}/dcpomatic2_verify', file=f) if os.path.exists(os.path.join(tools, "dcpomatic2_disk")): print('%{_bindir}/dcpomatic2_disk', file=f) - print('%attr(4755, root, root) %{_bindir}/dcpomatic2_disk_writer', file=f) + print('%caps(cap_dac_override=ep) %{_bindir}/dcpomatic2_disk_writer', file=f) print('%{_datadir}/applications/dcpomatic2.desktop', file=f) print('%{_datadir}/applications/dcpomatic2_batch.desktop', file=f) print('%{_datadir}/applications/dcpomatic2_server.desktop', file=f) @@ -386,8 +388,8 @@ def dependencies(target, options): # Use distro-provided FFmpeg on Arch deps = [] - deps.append(('libdcp', '6384002')) - deps.append(('libsub', '55ebde1')) + deps.append(('libdcp', 'b3cb9c0')) + deps.append(('libsub', '587e475')) deps.append(('leqm-nrt', '93ae9e6')) deps.append(('rtaudio', 'f619b76')) # We get our OpenSSL libraries from the environment, but we @@ -396,7 +398,7 @@ def dependencies(target, options): # the appropriate place later deps.append(('openssl', '7f29dd5')) if can_build_disk(target): - deps.append(('lwext4', '9d20ec5')) + deps.append(('lwext4', 'cce3730')) deps.append(('ffcmp', '6259cd4')) return deps @@ -580,6 +582,11 @@ def package_windows(target): def package_debian(target, cpu, version, options): make_control(target.version, target.bits, 'debian/control', target.debug, options['gui']) + if target.version != '9' and target.version != '16.04': + with open('debian/postinst', 'w') as f: + print('#!/bin/sh', file=f) + # Get the required capability to write to disks + print('setcap "cap_dac_override+ep cap_sys_admin+ep" /usr/bin/dcpomatic2_disk_writer', file=f) target.command('./waf dist') f = open('debian/files', 'w') print('dcpomatic_%s-1_%s.deb video extra' % (version, cpu), file=f) @@ -625,7 +632,7 @@ def package_rpm(target, cpu, version, options): requires = None if target.distro == 'mageia': - requires = "lib64xmlsec1-devel" + requires = "lib64xmlsec1-devel lib64canberra-gtk0" make_spec('build/platform/linux/dcpomatic2.spec', version, target, options, requires) cmd = 'rpmbuild --define "_topdir %s" -bb build/platform/linux/dcpomatic2.spec' % topdir @@ -703,7 +710,8 @@ def package(target, version, options): elif target.distro == 'centos' or target.distro == 'fedora' or target.distro == 'mageia': return package_rpm(target, cpu, version, options) elif target.platform == 'osx': - target.command('bash platform/osx/make_dmg.sh %s %s %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + archs = ' '.join(f'{t.arch}/{t.deployment}' for t in target.sub_targets) + target.command('bash platform/osx/make_dmg.sh %s %s %s %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password, archs)) packages = [] for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg'): a = os.path.abspath(x)