summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-08-02 00:05:37 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-13 01:22:00 +0200
commite7f7bf3a63c801a215d4b9832f01b8b27ee8944a (patch)
treedc65088e8ab2d74cb714dafcb2986ecea2d2d249
parent0c0eeadf18add7e9165c0a0946ea0a52aac9990f (diff)
Support building of cli-only .deb packages (#2066).
-rw-r--r--cscript15
-rwxr-xr-xdebian/rules42
-rw-r--r--graphics/wscript4
-rw-r--r--platform/linux/wscript6
-rw-r--r--src/tools/wscript2
5 files changed, 37 insertions, 32 deletions
diff --git a/cscript b/cscript
index db676c335..d713c3838 100644
--- a/cscript
+++ b/cscript
@@ -266,7 +266,8 @@ def make_control(debian_version, bits, filename, debug, gui):
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:
@@ -282,10 +283,12 @@ def make_control(debian_version, bits, filename, debug, gui):
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:
@@ -610,14 +613,15 @@ 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':
+ 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')
@@ -633,8 +637,9 @@ def package_debian(target, cpu, version, options):
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')
diff --git a/debian/rules b/debian/rules
index aac2dacaa..e98c39133 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,30 +20,30 @@ override_dh_auto_build:
./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
diff --git a/graphics/wscript b/graphics/wscript
index 157b2c77e..68435ea23 100644
--- a/graphics/wscript
+++ b/graphics/wscript
@@ -21,13 +21,13 @@ import os
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')
diff --git a/platform/linux/wscript b/platform/linux/wscript
index 587da325e..19e87db33 100644
--- a/platform/linux/wscript
+++ b/platform/linux/wscript
@@ -58,6 +58,6 @@ def build(bld):
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)
diff --git a/src/tools/wscript b/src/tools/wscript
index 81575c5dc..018689e03 100644
--- a/src/tools/wscript
+++ b/src/tools/wscript
@@ -43,7 +43,7 @@ def build(bld):
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: