summaryrefslogtreecommitdiff
path: root/cscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-21 22:41:22 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-22 15:42:11 +0200
commit4dab2ee8e05acdd56b39bb6edd4e80f795d7e0d9 (patch)
tree8d59e315b75bbe308b2b80484d1bee8729ea0618 /cscript
parentf68217c17dddafdf9453e3bfdc6d7acb9430736e (diff)
Install polkit policy file (#1970).
Diffstat (limited to 'cscript')
-rw-r--r--cscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/cscript b/cscript
index 7dba91447..ea8056c5d 100644
--- a/cscript
+++ b/cscript
@@ -341,6 +341,7 @@ def make_spec(filename, version, target, options, requires=None):
print('%%{_datadir}/locale/%s/LC_MESSAGES/libdcpomatic2.mo' % l, file=f)
print('%{_datadir}/libdcp/tags/*', file=f)
print('%{_datadir}/libdcp/xsd/*', file=f)
+ print('%{_datadir}/polkit-1/actions/com.dcpomatic.write-drive.policy', file=f)
print('', file=f)
print('%prep', file=f)
print('rm -rf $RPM_BUILD_DIR/dcpomatic-%s' % version, file=f)
@@ -651,6 +652,10 @@ def make_appimage(target, nice_name, internal_name, version):
target.command('cp -r %s/share/dcpomatic2 build/%s.AppDir/usr/share/' % (target.directory, nice_filename))
target.command('cp -r %s/share/libdcp/xsd build/%s.AppDir/usr/share/libdcp/' % (target.directory, nice_filename))
target.command('cp -r %s/share/libdcp/tags build/%s.AppDir/usr/share/libdcp/' % (target.directory, nice_filename))
+ if internal_name == 'dcpomatic2_disk':
+ target.command('mkdir -p build/%s.AppDir/usr/share/polkit-1/actions', nice_filename)
+ target.command('cp %s/share/polkit-1/actions/com.dcpomatic.write-drive.policy build/%s.AppDir/usr/share/polkit-1/actions' % (target.directory, nice_filename))
+
with open('build/%s.AppDir/AppRun' % nice_filename, 'w') as f:
print('#!/bin/bash', file=f)
print('export PATH=$APPDIR/usr/bin:$PATH', file=f)