mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 16:08:08 -05:00
44 lines
1.5 KiB
Ruby
44 lines
1.5 KiB
Ruby
require 'package'
|
|
|
|
class Netbeans < Package
|
|
description 'Apache NetBeans IDE is free open source software to quickly and easily develop desktop, mobile, and web applications with Java, JavaScript, HTML5, PHP, C/C++ and more.'
|
|
homepage 'https://netbeans.org/'
|
|
version '21'
|
|
license 'Apache-2.0, custom, EPL-1.0, W3C, MIT, BSD, MPL-1.0, CC-BY-3.0, CDDL and CDDL-1.1'
|
|
compatibility 'x86_64 aarch64 armv7l'
|
|
source_url 'https://dlcdn.apache.org/netbeans/netbeans/21/netbeans-21-bin.zip'
|
|
source_sha256 '7a71a9683c526a847c1ff43bc9403d5c01c50b739e3c5170feffb2aa7fbaf7fd'
|
|
|
|
depends_on 'openjdk11'
|
|
depends_on 'libxtst'
|
|
depends_on 'sommelier'
|
|
|
|
no_compile_needed
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/netbeans"
|
|
FileUtils.rm Dir['bin/*.exe']
|
|
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/netbeans"
|
|
FileUtils.ln_s "#{CREW_PREFIX}/share/netbeans/bin/netbeans", "#{CREW_DEST_PREFIX}/bin/netbeans"
|
|
end
|
|
|
|
def self.postinstall
|
|
puts "\nType 'netbeans' to get started.\n".lightblue
|
|
end
|
|
|
|
def self.remove
|
|
config_dir = "#{HOME}/.netbeans"
|
|
if Dir.exist? config_dir
|
|
print "Would you like to remove the config directory #{config_dir}? [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
|