class RBT::GenerateFlatpakManifestFile
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = nil, run_already = true )
click to toggle source
Public Instance Methods
do_work_on_this_program(i)
click to toggle source
#¶ ↑
do_work_on_this_program
¶ ↑
#¶ ↑
# File lib/rbt/generate_files/generate_flatpak_manifest_file.rb, line 55 def do_work_on_this_program(i) require 'json' dataset = action(:SanitizeCookbook, i) # ======================================================================= # # Now we can collect all information that will be necessary for # the "manifest" file. # ======================================================================= # program_name = dataset.short_name? hash = {} hash['app-id'] = 'org.gnome.'+program_name.capitalize hash['runtime-id'] = 'org.gnome.Platform' hash['runtime-version'] = dataset.program_version? hash['sdk'] = 'org.gnome.Sdk' hash['command'] = dataset.short_name? hash['finish-args'] = [ '--filesystem=xdg-documents', '--socket=x11', # Wayland access: '--socket=wayland', '--share=network' ] # ======================================================================= # # === Modules # # The module list specifies each of the modules that are to be built # as part of the build process. # ======================================================================= # hash['modules'] = { 'name': dataset.short_name?, 'sources': [ 'type': 'archive', 'url': dataset.url1?, 'sha256': `sha256sum #{dataset.program_path?}`.strip ] } # what = hash.to_json what = YAML.dump(hash) into = 'manifest' opne 'Storing into `'+sfile(into)+'`.' write_what_into(what, into) end
reset()
click to toggle source