mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
Update opera package from 75.0.3969.93 to 75.0.3969.171 (#5666)
* Update opera from 75.0.3969.93 to 75.0.3969.171 * Update postinstall and remove sections
This commit is contained in:
@@ -3,11 +3,11 @@ require 'package'
|
||||
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 '75.0.3969.93'
|
||||
version '75.0.3969.171'
|
||||
license 'OPERA-2018'
|
||||
compatibility 'x86_64'
|
||||
source_url "https://get.geo.opera.com/pub/opera/desktop/#{version}/linux/opera-stable_#{version}_amd64.deb"
|
||||
source_sha256 `curl -Ls https://get.geo.opera.com/pub/opera/desktop/#{version}/linux/opera-stable_#{version}_amd64.deb.sha256sum`.chomp
|
||||
source_sha256 '7ce460d2c53dbefb83106d90812f60e36e09165548dcb0907f52b44bd66b8039'
|
||||
|
||||
depends_on 'gtk3'
|
||||
depends_on 'gsettings_desktop_schemas'
|
||||
@@ -20,10 +20,11 @@ class Opera < Package
|
||||
# llvm-strip doesn't works with opera
|
||||
ENV['CREW_NOT_STRIP'] = '1'
|
||||
|
||||
# since opera put the executable to library, we need to link it to CREW_PREFIX
|
||||
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/opera/opera", 'bin/opera'
|
||||
# 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'
|
||||
|
||||
# place all stuff to lib64 instead of lib
|
||||
# Move lib subfolder to the share directory.
|
||||
FileUtils.mv 'lib/x86_64-linux-gnu/', 'share/'
|
||||
FileUtils.rm_rf 'lib/'
|
||||
|
||||
@@ -33,21 +34,25 @@ class Opera < Package
|
||||
|
||||
def self.postinstall
|
||||
puts
|
||||
puts 'Set Opera as your default browser? [Y/n]: '
|
||||
case STDIN.gets.chomp
|
||||
when "\n", 'Y', 'y', 'yes'
|
||||
print 'Set Opera as your default browser? [Y/n]: '
|
||||
case STDIN.getc
|
||||
when "\n", 'Y', 'y'
|
||||
Dir.chdir("#{CREW_PREFIX}/bin") do
|
||||
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/opera/opera", 'x-www-browser'
|
||||
end
|
||||
puts 'Opera is now your default browser.'.lightgreen
|
||||
else
|
||||
puts 'No change has been made.'
|
||||
puts
|
||||
puts 'No change has been made.'.orange
|
||||
end
|
||||
puts "\nType 'opera' to get started.\n".lightblue
|
||||
end
|
||||
|
||||
def self.remove
|
||||
Dir.chdir("#{CREW_PREFIX}/bin") do
|
||||
FileUtils.rm 'x-www-browser' if File.symlink?('x-www-browser') && File.realpath('x-www-browser') == "#{CREW_LIB_PREFIX}/opera/opera"
|
||||
if File.exist?('x-www-browser') and File.symlink?('x-www-browser') and \
|
||||
File.realpath('x-www-browser') == "#{CREW_PREFIX}/share/x86_64-linux-gnu/opera/opera"
|
||||
FileUtils.rm 'x-www-browser'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user