homebrew-cask/Casks/xquartz.rb

40 lines
1.7 KiB
Ruby
Raw Normal View History

2015-12-18 09:15:28 +08:00
cask 'xquartz' do
2015-10-19 22:02:32 +08:00
version '2.7.8'
sha256 '17a4c2da1ab3b676fdf80d1a0714c6bfd22183a604e823b4fd8329fdb4432c2a'
# macosforge.org is the official download host per the vendor homepage
2014-09-26 20:09:19 +08:00
url "https://xquartz.macosforge.org/downloads/SL/XQuartz-#{version}.dmg"
2015-06-29 14:32:18 +08:00
appcast 'https://xquartz-dl.macosforge.org/sparkle/release.xml',
:sha256 => '0b2c7d4e0b101eefc0a3efb000b779b3ec7246fcb5d14a0540e85f540f26a9e6'
2015-01-05 04:45:58 +08:00
name 'XQuartz'
homepage 'http://www.xquartz.org/'
license :oss
2014-09-10 23:37:08 +08:00
pkg 'XQuartz.pkg'
2014-09-09 20:55:28 +08:00
postflight do
Pathname.new(File.expand_path('~')).join('Library', 'Logs').mkpath
# Set default path to X11 to avoid the need of manual setup
system '/usr/bin/defaults', 'write', 'com.apple.applescript', 'ApplicationMap', '-dict-add', 'X11', 'file://localhost/Applications/Utilities/XQuartz.app/'
# Load & start XServer to avoid the need of relogin
system '/bin/launchctl', 'load', '/Library/LaunchAgents/org.macosforge.xquartz.startx.plist'
end
2013-12-10 12:52:34 +08:00
uninstall :quit => 'org.macosforge.xquartz.X11',
:launchctl => 'org.macosforge.xquartz.startx',
:pkgutil => 'org.macosforge.xquartz.pkg',
2014-09-18 19:58:01 +08:00
:delete => '/opt/X11/'
2014-10-11 22:35:50 +08:00
zap :delete => [
'~/Library/Caches/org.macosforge.xquartz.X11',
'~/Library/Logs/X11',
'~/Library/Logs/X11.org.macosforge.xquartz.log',
'~/Library/Logs/X11.org.macosforge.xquartz.log.old',
2014-12-30 23:47:03 +08:00
'~/Library/Preferences/org.macosforge.xquartz.X11.plist',
'~/Library/Saved Application State/org.macosforge.xquartz.X11.savedState',
2014-10-22 18:16:41 +08:00
'~/.Xauthority',
],
:rmdir => '~/.fonts'
end