Commit 8c6e67eb authored by Damian Montero's avatar Damian Montero

Merge with main branch

parents 085766e4 4ba0fab9
......@@ -21,6 +21,9 @@ $LOAD_PATH.unshift "#{CREW_LIB_PATH}lib"
USER = `whoami`.chomp
#disallow sudo
abort "Chromebrew should not be run as root." if Process.uid == 0 && @command != "remove"
@device = JSON.parse(File.read(CREW_CONFIG_PATH + 'device.json'), symbolize_names: true)
#symbolize also values
@device.each do |key, elem|
......@@ -142,7 +145,7 @@ def download
sha1sum = @pkg.binary_sha1[@device[:architecture]]
end
Dir.chdir CREW_BREW_DIR do
system('wget', '--continue', '--content-disposition', '--no-check-certificate', '-N', url, '-O', filename)
system('wget', '--continue', '--no-check-certificate', url, '-O', filename)
abort 'Checksum mismatch :/ try again' unless Digest::SHA1.hexdigest( File.read("./#{filename}") ) == sha1sum
end
puts "Archive downloaded"
......
......@@ -2,7 +2,7 @@
OWNER="skycocker"
REPO="chromebrew"
BRANCH="master"
URL="https://raw.github.com/$OWNER/$REPO/$BRANCH"
URL="https://raw.githubusercontent.com/$OWNER/$REPO/$BRANCH"
CREW_PREFIX=/usr/local
CREW_LIB_PATH=$CREW_PREFIX/lib/crew/
CREW_CONFIG_PATH=$CREW_PREFIX/etc/crew/
......@@ -13,6 +13,11 @@ CREW_PACKAGES_PATH=$CREW_LIB_PATH/packages
user=$(whoami)
architecture=$(uname -m)
if [ $EUID -eq 0 ]; then
echo 'Chromebrew should not be run as root.'
exit 1;
fi
if [ $architecture != "i686" ] && [ $architecture != "x86_64" ]; then
echo 'Your device is not supported by Chromebrew yet.'
exit 1;
......
require 'package'
class Fish < Package
version '2.3.0'
source_url 'https://github.com/fish-shell/fish-shell/releases/download/2.3.0/fish-2.3.0.tar.gz'
source_sha1 'afc6e9ea4cbd1ade63e9af41280b1f08bff23bba'
depends_on 'ncurses'
def self.build
system "./configure"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
end
require 'package' # include package class file
class Libevent < Package # name the package and make it a Package class instance
version '2.0.21' # software version
source_url 'https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz' # software source tarball url
source_sha1 '3e6674772eb77de24908c6267c698146420ab699' # source tarball sha1 sum
version '2.0.22' # software version
source_url 'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz' # software source tarball url
source_sha1 'a586882bc93a208318c70fc7077ed8fca9862864' # source tarball sha1 sum
def self.build # self.build contains commands needed to build the software from source
system "./configure"
system "./configure --disable-openssl"
system "make" # ordered chronologically
end
......
require 'package' # include package class file
class Tmux < Package # name the package and make it a Package class instance
version '1.9a' # software version
source_url 'http://downloads.sourceforge.net/tmux/tmux-1.9a.tar.gz' # software source tarball url
source_sha1 '815264268e63c6c85fe8784e06a840883fcfc6a2' # source tarball sha1 sum
version '2.2' # software version
source_url 'https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz' # software source tarball url
source_sha1 '5ed1430bc7ef44c227e64e9401c686573dd0791a' # source tarball sha1 sum
depends_on 'readline' # software dependencies
depends_on 'libevent'
depends_on 'openssl'
depends_on 'ncurses'
def self.build # self.build contains commands needed to build the software from source
......
require 'package'
class Yasm < Package
version '1.3.0'
source_url 'http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz'
source_sha1 'b7574e9f0826bedef975d64d3825f75fbaeef55e'
def self.build
system './configure --prefix=/usr/local'
system 'make'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} make install"
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