print('Standards-Version: 3.9.3', file=f)
print('Homepage: https://dcpomatic.com/', file=f)
print('', file=f)
- print('Package: dcpomatic', file=f)
+ suffix = '' if gui else '-cli'
+ print(f'Package: dcpomatic{suffix}', file=f)
if bits == 32:
print('Architecture: i386', file=f)
else:
print(' DCP-o-matic generates Digital Cinema Packages (DCPs) from videos, images,', file=f)
print(' sound and subtitle files. You can use it to make content for playback on DCI-compliant', file=f)
print(' cinema projectors.', file=f)
+ if not gui:
+ print(' This package contains the command-line tools only.', file=f)
if debug:
print('', file=f)
- print('Package: dcpomatic-dbg', file=f)
+ print(f'Package: dcpomatic{suffix}-dbg', file=f)
if bits == 32:
print('Architecture: i386', file=f)
else:
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':
+ if target.version != '9' and target.version != '16.04' and options['gui']:
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)
+ suffix = '' if options['gui'] else '-cli'
+ print(f'dcpomatic{suffix}_{version}-1_{cpu}.deb video extra', file=f)
shutil.rmtree('build/deb', ignore_errors=True)
os.makedirs('build/deb')
target.set('CDIST_DIRECTORY', target.directory)
target.set('CDIST_CONFIGURE', '"' + configure_options(target, options) + '"')
+ target.set('CDIST_PACKAGE', f'dcpomatic{suffix}')
if target.debug:
- target.set('CDIST_DEBUG_PACKAGE', '--dbg-package=dcpomatic-dbg')
+ target.set('CDIST_DEBUG_PACKAGE_FLAG', f'--dbg-package=dcpomatic{suffix}-dbg')
target.command('dpkg-buildpackage -uc -us')
./waf build
override_dh_auto_install:
- ./waf install --destdir=debian/dcpomatic
- mkdir -p debian/dcpomatic/usr/share/locale/de/LC_MESSAGES/
- cp -a /usr/share/locale/de/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/de/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/es/LC_MESSAGES/
- cp -a /usr/share/locale/es/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/es/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/fr/LC_MESSAGES/
- cp -a /usr/share/locale/fr/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/fr/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/it/LC_MESSAGES/
- cp -a /usr/share/locale/it/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/it/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/sv/LC_MESSAGES/
- cp -a /usr/share/locale/sv/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/sv/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/nl/LC_MESSAGES/
- cp -a /usr/share/locale/nl/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/nl/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/pl/LC_MESSAGES/
- cp -a /usr/share/locale/pl/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/pl/LC_MESSAGES/dcpomatic2-wxstd.mo
- mkdir -p debian/dcpomatic/usr/share/locale/ru/LC_MESSAGES/
- cp -a /usr/share/locale/ru/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/ru/LC_MESSAGES/dcpomatic2-wxstd.mo
- cp -a $(CDIST_DIRECTORY)/src/openssl/apps/openssl debian/dcpomatic/usr/bin/dcpomatic2_openssl
- cp -a $(CDIST_DIRECTORY)/src/libdcp/build/tools/dcpverify debian/dcpomatic/usr/bin/dcpomatic2_verify
- cp -ar $(CDIST_DIRECTORY)/share/libdcp debian/dcpomatic/usr/share
+ ./waf install --destdir=debian/$(CDIST_PACKAGE)
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/de/LC_MESSAGES/
+ cp -a /usr/share/locale/de/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/de/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/es/LC_MESSAGES/
+ cp -a /usr/share/locale/es/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/es/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/fr/LC_MESSAGES/
+ cp -a /usr/share/locale/fr/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/fr/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/it/LC_MESSAGES/
+ cp -a /usr/share/locale/it/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/it/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/sv/LC_MESSAGES/
+ cp -a /usr/share/locale/sv/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/sv/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/nl/LC_MESSAGES/
+ cp -a /usr/share/locale/nl/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/nl/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/pl/LC_MESSAGES/
+ cp -a /usr/share/locale/pl/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/pl/LC_MESSAGES/dcpomatic2-wxstd.mo
+ mkdir -p debian/$(CDIST_PACKAGE)/usr/share/locale/ru/LC_MESSAGES/
+ cp -a /usr/share/locale/ru/LC_MESSAGES/wxstd.mo debian/$(CDIST_PACKAGE)/usr/share/locale/ru/LC_MESSAGES/dcpomatic2-wxstd.mo
+ cp -a $(CDIST_DIRECTORY)/src/openssl/apps/openssl debian/$(CDIST_PACKAGE)/usr/bin/dcpomatic2_openssl
+ cp -a $(CDIST_DIRECTORY)/src/libdcp/build/tools/dcpverify debian/$(CDIST_PACKAGE)/usr/bin/dcpomatic2_verify
+ cp -ar $(CDIST_DIRECTORY)/share/libdcp debian/$(CDIST_PACKAGE)/usr/share
.PHONY: override_dh_strip
override_dh_strip:
- dh_strip $(CDIST_DEBUG_PACKAGE)
+ dh_strip $(CDIST_DEBUG_PACKAGE_FLAG)
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
def build(bld):
# Linux application icons
- if bld.env.TARGET_LINUX:
+ if bld.env.TARGET_LINUX and not bld.env.DISABLE_GUI:
for r in [16, 22, 32, 48, 64, 128, 256, 512]:
for p in ['dcpomatic2', 'dcpomatic2_kdm', 'dcpomatic2_server', 'dcpomatic2_batch', 'dcpomatic2_player', 'dcpomatic2_playlist', 'dcpomatic2_disk', 'dcpomatic2_combiner']:
bld.install_files('${PREFIX}/share/icons/hicolor/%dx%d/apps' % (r, r), 'linux/%d/%s.png' % (r, p))
# Install stuff for POSIX systems
- if not bld.env.TARGET_WINDOWS:
+ if not bld.env.TARGET_WINDOWS and not bld.env.DISABLE_GUI:
bld.install_as('${PREFIX}/share/dcpomatic2/dcpomatic2_server_small.png', 'linux/16/dcpomatic2.png')
bld.install_files('${PREFIX}/share/dcpomatic2', 'splash.png')
bld.install_files('${PREFIX}/share/dcpomatic2', 'zoom.png')
obj.VERSION = bld.env.VERSION
desktops.append(obj.target)
- bld.install_as('${PREFIX}/share/polkit-1/actions/com.dcpomatic.write-drive.policy', 'com.dcpomatic.write-drive.policy')
-
- bld.install_files('${PREFIX}/share/applications', desktops)
+ if not bld.env.DISABLE_GUI:
+ bld.install_as('${PREFIX}/share/polkit-1/actions/com.dcpomatic.write-drive.policy', 'com.dcpomatic.write-drive.policy')
+ bld.install_files('${PREFIX}/share/applications', desktops)
uselib += 'DL '
cli_tools = ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']
- if bld.env.ENABLE_DISK:
+ if bld.env.ENABLE_DISK and not bld.env.DISABLE_GUI:
cli_tools.append('dcpomatic_disk_writer')
for t in cli_tools: