Commit f0fe372e authored by supechicken's avatar supechicken Committed by GitHub

opera => 74.0.3911.160 (#5302)

* Add files via upload

* Update opera.rb
Co-authored-by: default avatarsupechicken666 <68530202+supechicken666@users.noreply.github.com>
parent acee8bcc
...@@ -3,35 +3,52 @@ require 'package' ...@@ -3,35 +3,52 @@ require 'package'
class Opera < Package class Opera < Package
description "Opera isn't just a browser. It's an awesome browser." description "Opera isn't just a browser. It's an awesome browser."
homepage 'https://www.opera.com/' homepage 'https://www.opera.com/'
version '74.0.3911.154' version '74.0.3911.160'
compatibility 'x86_64' compatibility 'x86_64'
if ARCH == 'x86_64' if ARCH == '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
depends_on 'alien' => :build
depends_on 'gtk3' depends_on 'gtk3'
depends_on 'gsettings_desktop_schemas' depends_on 'gsettings_desktop_schemas'
depends_on 'harfbuzz' depends_on 'harfbuzz'
depends_on 'graphite' depends_on 'graphite'
depends_on 'cras' depends_on 'cras'
depends_on 'sommelier' depends_on 'sommelier'
source_url "https://get.geo.opera.com/pub/opera/desktop/74.0.3911.160/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
end end
def self.install
def self.build # llvm-strip doesn't works with opera
Dir.chdir('../') do ENV['CREW_NOT_STRIP'] = '1'
system "alien -tc opera-stable_#{version}_amd64.deb"
system "tar xf opera-stable-#{version}.tgz" # 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'
# place all stuff to lib64 instead of lib
FileUtils.mv 'lib/x86_64-linux-gnu/', 'share/'
FileUtils.rm_rf 'lib/'
FileUtils.mkdir_p CREW_DEST_PREFIX
FileUtils.mv Dir.glob('*'), CREW_DEST_PREFIX
end
def self.postinstall
puts
puts 'Set Opera as your default browser? [Y/n]: '
case STDIN.gets.chomp
when "\n", 'Y', 'y', 'yes'
Dir.chdir("#{CREW_PREFIX}/bin") do
FileUtils.ln_sf "#{CREW_LIB_PREFIX}/opera/opera", 'x-www-browser'
end
else
puts 'No change has been made.'
puts
end end
end end
def self.install def self.remove
Dir.chdir('../') do Dir.chdir("#{CREW_PREFIX}/bin") do
# llvm-strip doesn't works with opera FileUtils.rm 'x-www-browser' if File.realpath('x-www-browser') == "#{CREW_LIB_PREFIX}/opera/opera"
ENV['CREW_NOT_STRIP'] = '1' end
FileUtils.mkdir_p CREW_DEST_PREFIX
FileUtils.mv Dir.glob('usr/*'), CREW_DEST_PREFIX
FileUtils.ln_s "#{CREW_PREFIX}/bin/opera", "#{CREW_DEST_PREFIX}/bin/x-www-browser" unless File.exist?("#{CREW_PREFIX}/bin/x-www-browser")
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment