homebrew-cask/Casks/xquartz.rb

39 lines
1.8 KiB
Ruby
Raw Normal View History

2014-11-14 01:27:24 +08:00
cask :v1 => 'xquartz' do
2014-08-21 04:02:42 +08:00
version '2.7.7'
sha256 'c9b3a373b7fd989331117acb9696fffd6b9ee1a08ba838b02ed751b184005211'
2014-09-26 20:09:19 +08:00
url "https://xquartz.macosforge.org/downloads/SL/XQuartz-#{version}.dmg"
2014-10-15 23:43:58 +08:00
appcast 'http://xquartz-dl.macosforge.org/sparkle/release.xml',
:sha256 => '9792f0d6abd547e523f6ca33c4dd3847134bc3d46d77ac91b93fe932d6123568'
2015-01-05 04:45:58 +08:00
name 'XQuartz'
homepage 'http://xquartz.macosforge.org/'
license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
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