Commit 91857742 authored by Ed Reel's avatar Ed Reel Committed by Chris Thurber

Add atom package (#3709)

parent ff396d64
require 'package'
class Atom < Package
description 'The hackable text editor'
homepage 'https://atom.io/'
version '1.42.0'
case ARCH
when 'x86_64'
source_url 'file:///dev/null'
source_sha256 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
end
binary_url ({
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/atom-1.42.0-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
x86_64: '7835a7ba3e5a0cd9a02beb36e94fe41605535ab5fd073aa24306c1c60b087084'
})
depends_on 'alien' => :build
depends_on 'fakeroot'
depends_on 'gtk3'
depends_on 'libsecret'
depends_on 'sommelier'
def self.build
system "wget https://github.com/atom/atom/releases/download/v#{version}/atom-amd64.deb"
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest( File.read('atom-amd64.deb') ) == '5e9a487da9d7d6530be61d4af2454b0bcfc907537447cf9d0423766e91282ac7'
system "alien -t -c atom-amd64.deb"
system "tar xvf atom-#{version}.tgz"
end
def self.install
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}"
FileUtils.mv 'usr/bin', "#{CREW_DEST_PREFIX}"
FileUtils.mv 'usr/share', "#{CREW_DEST_PREFIX}"
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