mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-05-01 03:00:26 -04:00
* Add unbuilt smplayer to updater-smplayer-25.6.0 * updater-smplayer-25.6.0: Package File Update Run on linux/amd64 container. --------- Co-authored-by: satmandu <satmandu@users.noreply.github.com> Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
68 lines
2.1 KiB
Ruby
68 lines
2.1 KiB
Ruby
require 'package'
|
|
|
|
class Smplayer < Package
|
|
description 'SMPlayer is a free media player for Windows and Linux with built-in codecs that can play virtually all video and audio formats.'
|
|
homepage 'https://www.smplayer.info/'
|
|
version '25.6.0'
|
|
license 'GPL-2'
|
|
compatibility 'x86_64'
|
|
min_glibc '2.30'
|
|
source_url "https://github.com/smplayer-dev/smplayer/releases/download/v#{version}/SMPlayer-#{version}-x86_64.AppImage"
|
|
source_sha256 '04b891f013e42c1f92620acf5be57556ac37b973a3aab53489aff58231679794'
|
|
|
|
no_compile_needed
|
|
|
|
depends_on 'gdk_base'
|
|
depends_on 'gtk3'
|
|
depends_on 'jack'
|
|
depends_on 'libthai'
|
|
depends_on 'sommelier' => :logical
|
|
|
|
def self.build
|
|
File.write 'smplayer', <<~EOF
|
|
#!/bin/bash
|
|
export LD_LIBRARY_PATH=#{CREW_PREFIX}/share/smplayer/lib:$LD_LIBRARY_PATH
|
|
cd #{CREW_PREFIX}/share/smplayer
|
|
bin/smplayer "$@"
|
|
EOF
|
|
end
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/smplayer"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/applications"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/icons/hicolor/512x512/apps"
|
|
FileUtils.mv Dir['usr/*'], "#{CREW_DEST_PREFIX}/share/smplayer"
|
|
FileUtils.mv 'smplayer.desktop', "#{CREW_DEST_PREFIX}/share/applications"
|
|
FileUtils.mv 'smplayer.svg', "#{CREW_DEST_PREFIX}/share/icons/hicolor/512x512/apps"
|
|
FileUtils.install 'smplayer', "#{CREW_DEST_PREFIX}/bin/smplayer", mode: 0o755
|
|
end
|
|
|
|
def self.postinstall
|
|
ExitMessage.add <<~EOM
|
|
|
|
Type 'smplayer' to get started.
|
|
|
|
If you have trouble playing videos, try the steps below:
|
|
Select Options > Preferences
|
|
Click the 'Audio' tab
|
|
Uncheck 'Use software volume control'
|
|
Click OK
|
|
EOM
|
|
end
|
|
|
|
def self.postremove
|
|
config_dir = "#{CREW_PREFIX}/.config/smplayer"
|
|
if Dir.exist? config_dir
|
|
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
|
case $stdin.gets.chomp.downcase
|
|
when 'y', 'yes'
|
|
FileUtils.rm_rf config_dir
|
|
puts "#{config_dir} removed.".lightgreen
|
|
else
|
|
puts "#{config_dir} saved.".lightgreen
|
|
end
|
|
end
|
|
end
|
|
end
|