mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
48 lines
1.5 KiB
Ruby
48 lines
1.5 KiB
Ruby
require 'package'
|
|
require 'convenience_functions'
|
|
|
|
class Opera < Package
|
|
description 'Opera is a multi-platform web browser based on Chromium and developed by Opera Software.'
|
|
homepage 'https://www.opera.com/'
|
|
version '117.0.5408.93'
|
|
license 'OPERA-2018'
|
|
compatibility 'x86_64'
|
|
min_glibc '2.29'
|
|
|
|
# faster apt mirror, but only works when downloading latest version of opera
|
|
# source_url "https://deb.opera.com/opera/pool/non-free/o/opera-stable/opera-stable_#{version}_amd64.deb"
|
|
source_url "https://deb.opera.com/opera-stable/pool/non-free/o/opera-stable/opera-stable_#{version}_amd64.deb"
|
|
source_sha256 'd508b54ae87980325714e9c8dec8e62c236b3450ea57d9f5b13877ac5ad106ba'
|
|
|
|
depends_on 'gtk3'
|
|
depends_on 'gsettings_desktop_schemas'
|
|
depends_on 'harfbuzz'
|
|
depends_on 'graphite'
|
|
depends_on 'cras'
|
|
depends_on 'libcom_err'
|
|
|
|
no_compile_needed
|
|
no_shrink
|
|
|
|
def self.install
|
|
# Since opera puts the executable in a location that is not in the path,
|
|
# we need to link it to bin directory.
|
|
FileUtils.ln_sf "#{CREW_PREFIX}/share/x86_64-linux-gnu/opera/opera", 'bin/opera'
|
|
|
|
# Move lib subfolder to the share directory.
|
|
FileUtils.mv 'lib/x86_64-linux-gnu/', 'share/'
|
|
FileUtils.rm_rf 'lib/'
|
|
|
|
FileUtils.mkdir_p CREW_DEST_PREFIX
|
|
FileUtils.mv Dir['*'], CREW_DEST_PREFIX
|
|
end
|
|
|
|
def self.postinstall
|
|
ConvenienceFunctions.set_default_browser('Opera', 'opera')
|
|
end
|
|
|
|
def self.preremove
|
|
ConvenienceFunctions.unset_default_browser('x86_64-linux-gnu/opera', 'opera')
|
|
end
|
|
end
|