Commit dde319f5 authored by Fred Clift's avatar Fred Clift

Merge remote-tracking branch 'upstream/master' into filecmd

parents 433cbfc2 aed23353
......@@ -23,7 +23,7 @@ Installation
------------
Open the terminal with Ctrl+Alt+T and type `shell`.
If this command returns `Unknown command: 'wget'` please have a second look at the prerequisites and make sure your Chromebook is in developer mode.
If this command returns `Unknown command: 'shell'` please have a second look at the prerequisites and make sure your Chromebook is in developer mode.
Then download and run the installation script
......
......@@ -145,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/
......@@ -10,7 +10,6 @@ CREW_BREW_DIR=$CREW_PREFIX/tmp/crew/
CREW_DEST_DIR=$CREW_BREW_DIR/dest
CREW_PACKAGES_PATH=$CREW_LIB_PATH/packages
user=$(whoami)
architecture=$(uname -m)
if [ $EUID -eq 0 ]; then
......@@ -24,12 +23,9 @@ if [ $architecture != "i686" ] && [ $architecture != "x86_64" ]; then
fi
#prepare directories
sudo mkdir -p $CREW_LIB_PATH && sudo chown -R $USER:$USER $CREW_LIB_PATH
sudo mkdir -p $CREW_CONFIG_PATH && sudo chown -R $USER:$USER $CREW_CONFIG_PATH
sudo mkdir -p $CREW_CONFIG_PATH/meta && sudo chown -R $USER:$USER $CREW_CONFIG_PATH/meta
sudo mkdir -p $CREW_BREW_DIR && sudo chown -R $USER:$USER $CREW_BREW_DIR
sudo mkdir -p $CREW_DEST_DIR && sudo chown -R $USER:$USER $CREW_DEST_DIR
sudo mkdir -p $CREW_PACKAGES_PATH && sudo chown -R $USER:$USER $CREW_PACKAGES_PATH
for dir in $CREW_LIB_PATH $CREW_CONFIG_PATH $CREW_CONFIG_PATH/meta $CREW_BREW_DIR $CREW_DEST_DIR $CREW_PACKAGES_PATH; do
sudo mkdir -p $dir && sudo chown -R $USER:$USER $dir
done
#cd into the brew directory, everything will happen there
cd $CREW_BREW_DIR
......@@ -39,16 +35,16 @@ echo "Downloading ruby..."
case "$architecture" in
"i686")
link='https://dl.dropboxusercontent.com/s/tufbuqcn80ubypx/ruby-2.0.0p247-chromeos-i686.tar.gz?token_hash=AAGu_5wuqZe2eDOkfL5oh4esQ8HAZJIvbMG7GplnQrSa3g&dl=1'
link='https://dl.dropboxusercontent.com/s/tufbuqcn80ubypx/ruby-2.0.0p247-chromeos-i686.tar.gz'
tarname='ruby-2.0.0p247-chromeos-'$architecture'.tar.gz'
;;
"x86_64")
link='https://dl.dropboxusercontent.com/s/3dw5ue5vhf5nj8k/ruby-2.0.0-p247-chromeos1-chromeos-x86_64.tar.gz?dl=1&token_hash=AAHYJ-WOExuc2f4mKN3pDHUOlTMnt3h-rBosLmYr2Gvy7w'
link='https://dl.dropboxusercontent.com/s/3dw5ue5vhf5nj8k/ruby-2.0.0-p247-chromeos1-chromeos-x86_64.tar.gz'
tarname='ruby-2.0.0-p247-chromeos1-chromeos-'$architecture'.tar.gz'
;;
esac
wget --continue --no-check-certificate --content-disposition $link -O $tarname
wget -c $link -O $tarname
#extract and install ruby
echo "Extracting ruby (this may take a while)..."
......@@ -60,17 +56,16 @@ mv ./filelist $CREW_CONFIG_PATH/meta/ruby.filelist
#download, prepare and install chromebrew
cd $CREW_LIB_PATH
wget -N --continue --no-check-certificate $URL/crew
wget -N -c $URL/crew
chmod +x crew
sudo ln -s `pwd`/crew $CREW_PREFIX/bin
#install crew library
mkdir $CREW_LIB_PATH/lib && cd $CREW_LIB_PATH/lib
wget -N --continue --no-check-certificate $URL/lib/package.rb
wget -N --continue --no-check-certificate $URL/lib/package_helpers.rb
wget -N -c $URL/lib/package.rb
wget -N -c $URL/lib/package_helpers.rb
#create the device.json file
cd $CREW_CONFIG_PATH
touch device.json
echo "{" > device.json
echo '{' > device.json
echo ' "architecture": "'$architecture'",' >> device.json
echo ' "installed_packages": [' >> device.json
echo ' {' >> device.json
......@@ -78,38 +73,25 @@ echo ' "name": "ruby",' >> device.json
echo ' "version": "2.0.0p247"' >> device.json
echo ' }' >> device.json
echo ' ]' >> device.json
echo "}" >> device.json
echo '}' >> device.json
#download git and its dependencies .rb package files
cd $CREW_PACKAGES_PATH
wget -N --continue --no-check-certificate $URL/packages/git.rb
wget -N --continue --no-check-certificate $URL/packages/zlibpkg.rb
wget -N --continue --no-check-certificate $URL/packages/libssh2.rb
wget -N --continue --no-check-certificate $URL/packages/perl.rb
wget -N --continue --no-check-certificate $URL/packages/curl.rb
wget -N --continue --no-check-certificate $URL/packages/expat.rb
wget -N --continue --no-check-certificate $URL/packages/gettext.rb
wget -N --continue --no-check-certificate $URL/packages/python.rb
wget -N --continue --no-check-certificate $URL/packages/readline.rb
wget -N --continue --no-check-certificate $URL/packages/ruby.rb
wget -N --continue --no-check-certificate $URL/packages/buildessential.rb
wget -N --continue --no-check-certificate $URL/packages/gcc.rb
wget -N --continue --no-check-certificate $URL/packages/binutils.rb
wget -N --continue --no-check-certificate $URL/packages/make.rb
wget -N --continue --no-check-certificate $URL/packages/mpc.rb
wget -N --continue --no-check-certificate $URL/packages/mpfr.rb
wget -N --continue --no-check-certificate $URL/packages/gmp.rb
wget -N --continue --no-check-certificate $URL/packages/glibc.rb
wget -N --continue --no-check-certificate $URL/packages/linuxheaders.rb
for file in git zlibpkg libssh2 perl curl expat gettext python readline ruby buildessential gcc binutils make mpc mpfr gmp glibc linuxheaders; do
wget -N -c $URL/packages/$file.rb
done
#install readline for ruby
(echo y;) | crew install readline
echo y | crew install readline
#install git
(echo y;) | crew install git
echo y | crew install git
#Making GCC act like CC (For some npm packages out there)
ln -s /usr/local/bin/gcc /usr/local/bin/cc
sudo ln -s /usr/local/bin/gcc /usr/local/bin/cc
#This will allow a lot of things to work without sudo
sudo chown -R chronos:chronos /usr/local
#prepare sparse checkout .rb packages directory and do it
cd $CREW_LIB_PATH
......
require 'package'
class Cmake < Package
version '3.0.2'
source_url 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz'
source_sha1 '379472e3578902a1d6f8b68a9987773151d6f21a'
version '3.6.1'
source_url 'https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz'
source_sha1 'a37785b3f256a31ee21a047569bc74a8f57067bb'
depends_on 'buildessential'
depends_on 'openssl_devel'
def self.build
system "./configure --prefix=/usr/local"
system "./bootstrap"
system "make"
end
......
require 'package'
class Elixir < Package
version '1.3.1'
depends_on 'erlang'
source_url 'https://github.com/elixir-lang/elixir/archive/v1.3.1.tar.gz'
source_sha1 '29dc1b4da5e051ad71ad84b6886d7c184e4b9add'
def self.build
system 'make clean test'
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
end
require 'package'
class Erlang < Package
version '19.0'
source_url 'http://www.erlang.org/download/otp_src_19.0.tar.gz'
source_sha1 '3be958b529de4be19d77eb77f587a76210b43bfd'
def self.build
system 'export ERL_OTP=`pwd`'
system './configure --prefix=/usr/local'
system 'make'
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
end
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
......@@ -2,8 +2,8 @@ require 'package'
class Flex < Package
version '2.5.39'
source_url 'http://fossies.org/linux/misc/flex-2.5.39.tar.gz'
source_sha1 '40866373afd3ab88a7f7fe26c9b27b035aa1f2a9'
source_url 'http://fossies.org/linux/misc/flex-2.6.0.tar.gz'
source_sha1 'cfe10b5de4893ced356adc437e78018e715818c3'
depends_on 'm4'
......
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
depends_on 'openssl_devel'
def self.build # self.build contains commands needed to build the software from source
system "./configure"
......
require 'package'
class Libpng < Package
version '1.6.19'
source_url 'http://downloads.sourceforge.net/project/libpng/libpng16/1.6.19/libpng-1.6.19.tar.xz'
source_sha1 '483d72ced11c9258f9d1119105273d9af9ff151c'
version '1.6.24'
source_url 'http://downloads.sourceforge.net/project/libpng/libpng16/1.6.24/libpng-1.6.24.tar.xz'
source_sha1 'b8fa86449bebd7b1cda71e0ed2cd417b6596ce78'
def self.build
system "./configure --libdir=/usr/local/lib#{SHORTARCH}/ CC=\"gcc -m#{SHORTARCH}\" CFLAGS=\" -fPIC\""
......
......@@ -2,7 +2,7 @@ require 'package'
class Libsigsegv < Package
version '2.10'
source_url 'ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz'
source_url 'ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz'
source_sha1 'b75a647a9ebda70e7a3b33583efdd550e0eac094'
def self.build
......
require 'package'
class Libunwind < Package
version '1.1'
source_url 'http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz'
source_sha1 '7c93a6ae35afff4d0efd143b62a9fd235423964f'
depends_on 'buildessential'
depends_on 'openssl_devel'
def self.build
system "CC='gcc' ./configure"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
end
require 'package'
class Lldb < Package
version '3.6'
binary_url ({
i686: "https://www.dropbox.com/s/bls4hv4z8m2ifsc/lldb-3.6-i386.tar.gz?dl=0",
x86_64: "https://www.dropbox.com/s/zi3rzdmz2awu8u8/lldb-3.6-64x.tar.gz?dl=0"
})
binary_sha1 ({
i686: "de6ca73c1bcc0d72db81d14cd4e31b8f479e12e8",
x86_64: "6265cacf22b191e22a439019b4a2eb0ef7df3813"
})
end
require 'package'
class Llvm < Package
version '3.8.1'
source_url 'http://llvm.org/releases/3.8.1/llvm-3.8.1.src.tar.xz'
source_sha1 'e0c48c4c182424b99999367d688cd8ce7876827b'
depends_on 'buildessential'
depends_on 'cmake'
def self.build
system "mkdir mybuilddir"
Dir.chdir CREW_BREW_DIR+"llvm-"+version+".src/mybuilddir" do
system "cmake .."
system "cmake --build ."
end
end
def self.install
Dir.chdir CREW_BREW_DIR+"llvm-"+version+".src/mybuilddir" do
system "cmake -DCMAKE_INSTALL_PREFIX=/usr/local -P cmake_install.cmake"
end
end
end
require 'package'
class Mono < Package
version '4.4.0.148'
source_url 'http://download.mono-project.com/sources/mono/mono-4.4.0.148.tar.bz2'
source_sha1 '8da7726b7c09df97856b55eda062356666928d35'
def self.build
system "./configure","--disable-dependency-tracking","--disable-silent-rules","--enable-nls=no","prefix=#{CREW_DEST_DIR}/usr/local"
system "make"
end
def self.install
system "make", "PREFIX=#{CREW_DEST_DIR}/usr/local", "install"
end
end
require 'package'
class Node < Package
version '4.3.0'
source_url 'https://nodejs.org/dist/v4.3.0/node-v4.3.0.tar.xz'
source_sha1 'd7b4e9676e63fc3dd1d506cef244874466264e22'
version '4.4.5'
source_url 'https://nodejs.org/dist/v4.4.5/node-v4.4.5.tar.xz'
source_sha1 'be0af595facab8be2dd8fa64c051c4c5a7ec0c4a'
depends_on 'buildessential'
depends_on 'python27'
def self.build
system "CC='gcc' python2.7 ./configure"
system "CC='gcc' python2.7 ./configure --without-snapshot"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
#Fix Permissiongs for -g installs of node packages
system "sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}"
end
end
require 'package'
class Node_current < Package
version '6.2.2'
source_url 'https://nodejs.org/dist/v6.2.2/node-v6.2.2.tar.xz'
source_sha1 '5014800813fa3682b8053637518b37a119c26e93'
depends_on 'buildessential'
depends_on 'python27'
def self.build
system "CC='gcc' python2.7 ./configure --without-snapshot"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
#Fix Permissiongs for -g installs of node packages
system "sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}"
end
end
require 'package'
class Node_stable < Package
version '5.6.0'
source_url 'https://nodejs.org/dist/v5.6.0/node-v5.6.0.tar.xz'
source_sha1 '522b4f1027549eb8161c1edba222176aba92e294'
version '6.2.2'
source_url 'https://nodejs.org/dist/v6.2.2/node-v6.2.2.tar.xz'
source_sha1 '5014800813FA3682B8053637518B37A119C26E93'
depends_on 'buildessential'
depends_on 'python27'
def self.build
system "CC='gcc' python2.7 ./configure"
system "CC='gcc' python2.7 ./configure --without-snapshot"
system "make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
#Fix Permissiongs for -g installs of node packages
system "sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}"
end
end
require 'package'
#Installs JUST the headers to match the chromeos supplied libraries so that you can build things
# that link with openssl. Needs to be kept version-synced with chromeos releases
# Could detect current version and grab one of many different packages, compare to saved
# hashes and support multiple versions if needed
#grumble - package names in crew must conform to ruby variable name restrictions. For instance '-' is disallowed
class Openssl_devel < Package
version '1.0.2f'
# chromeos wget can't do proper ssl negotiation with this server
# source_url 'https://www.openssl.org/source/old/1.0.2/openssl-1.0.2g.tar.gz'
# so use their ftp server.
source_url 'ftp://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz'
source_sha1 '2047c592a6e5a42bd37970bdb4a931428110a927'
depends_on 'perl'
def self.build
# only need to run config to get the headers set up right
system './config'
end
def self.install
out = "#{CREW_DEST_DIR}/usr/local/include/openssl"
system "mkdir -p #{out}"
`ls ./include/openssl`.split(' ').each do |header|
system "cp", "./include/openssl/#{header}", out
end
#system "cp", "./include/openssl/*", "#{out}"
end
end
require 'package'
class Pkg-config < Package
version '29.1'
source_url 'https://pkg-config.freedesktop.org/releases/pkg-config-0.29.1.tar.gz'
source_sha1 '271ce928f6d673cc16cbced2bfd14a5f2e5d3d37'
depends_on 'buildessential'
def self.build
system "configure --prefix=/usr/local --with-internal-glib --disable-host-tool"
system "make"
end
def self.install
system "make install"
#remove the man pages we couldn't install
end
end
require 'package'
class Python27 < Package
version '2.7.10'
source_url 'https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz' # software source tarball url
source_sha1 '49089f1f6ab445dc8ace97beeb276095c4c8039b' # source tarball sha1 sum
version '2.7.12'
source_url 'https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz' # software source tarball url
source_sha1 '1e80b781eacc6b7e243bd277e5002426aa56d0f1' # source tarball sha1 sum
depends_on 'bz2'
depends_on 'ncurses'
......
......@@ -4,6 +4,8 @@ class Python34 < Package
version '3.4.1'
source_url 'https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz' # software source tarball url
source_sha1 'e8c1bd575a6ccc2a75f79d9d094a6a29d3802f5d' # source tarball sha1 sum
depends_on 'openssl_devel'
def self.build # self.build contains commands needed to build the software from source
system "./configure"
......
require 'package' # include package class file
class Screen < Package # name the package and make it a Package class instance
version '4.3.1' # software version
source_url 'ftp://ftp.gnu.org/gnu/screen/screen-4.3.1.tar.gz' # software source tarball url
source_sha1 'a524761504e28480517e338b20c852f2ab100c93' # source tarball sha1 sum
depends_on 'ncurses' # software dependencies
def self.build # self.build contains commands needed to build the software from source
system "./configure --prefix=/usr/local"
system "make" end
def self.install # self.install contains commands needed to install the software on the target system
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" # remember to include DESTDIR set to CREW_DEST_DIR - needed to keep track of changes made to system
end # during installation
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'
# does this really depend on openssl? or just on libevent that depends on openssl
depends_on 'openssl_devel'
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