Commit bea635c8 authored by Ed Reel's avatar Ed Reel

Update ruby from 2.5.1 to 2.5.3

Add pre-built binaries

Add gcc7 dependency to install.sh

Add EDITOR section and improve comments in install.sh
parent 7d834905
......@@ -25,22 +25,24 @@ case "$architecture" in
exit 1;;
esac
#This will allow things to work without sudo
# This will allow things to work without sudo
sudo chown -R `id -u`:`id -g` "${CREW_PREFIX}"
#prepare directories
# prepare directories
for dir in $CREW_LIB_PATH $CREW_CONFIG_PATH $CREW_CONFIG_PATH/meta $CREW_BREW_DIR $CREW_DEST_DIR $CREW_PACKAGES_PATH; do
mkdir -p $dir
done
#prepare url and sha256
# install only ruby, git and libssh2
# prepare url and sha256
# install only gcc7, ruby, libiconv, git and libssh2 (order matters)
urls=()
sha256s=()
case "$architecture" in
"aarch64")
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-armv7l.tar.xz')
sha256s+=('b03154f57e2599f71b0bdd42ba3a126397eca451ccb99485615b5b0429955152')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc7-7.3.0-3-chromeos-armv7l.tar.xz')
sha256s+=('c9dd2a2b2d195f0f2021dc673d6317e46b5dfaef582f496b4cea1f3c5c2c17ad')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-armv7l.tar.xz')
sha256s+=('5e485a0320b298e1f5c4ff50d98c6fe6d06ad9a38d9119d580a8b469418e1e6a')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/libiconv-1.15-chromeos-armv7l.tar.xz')
sha256s+=('047163a67f3ea9e143b465087d5ea4a3d17b963c8ad3579bc27a21934d4a17ab')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/git-2.20.1-chromeos-armv7l.tar.xz')
......@@ -53,8 +55,10 @@ case "$architecture" in
urls+=('https://github.com/snailium/chrome-cross/releases/download/v1.8.1/xz-5.2.3-chromeos-armv7l.tar.gz')
sha256s+=('4dc9f086ee7613ab0145ec0ed5ac804c80c620c92f515cb62bae8d3c508cbfe7')
fi
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-armv7l.tar.xz')
sha256s+=('b03154f57e2599f71b0bdd42ba3a126397eca451ccb99485615b5b0429955152')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc7-7.3.0-3-chromeos-armv7l.tar.xz')
sha256s+=('c9dd2a2b2d195f0f2021dc673d6317e46b5dfaef582f496b4cea1f3c5c2c17ad')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-armv7l.tar.xz')
sha256s+=('5e485a0320b298e1f5c4ff50d98c6fe6d06ad9a38d9119d580a8b469418e1e6a')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/libiconv-1.15-chromeos-armv7l.tar.xz')
sha256s+=('047163a67f3ea9e143b465087d5ea4a3d17b963c8ad3579bc27a21934d4a17ab')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/git-2.20.1-chromeos-armv7l.tar.xz')
......@@ -63,8 +67,10 @@ case "$architecture" in
sha256s+=('6fa84296583273dd9e749a2c54cb1cf688a7dab032e2528de5944a4d9777f037')
;;
"i686")
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-i686.tar.xz')
sha256s+=('de1d30b89fd09b6e544fe537cbbc4cdc76f4f1610b0f801ab82ce90c1dc04999')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc7-7.3.0-3-chromeos-i686.tar.xz')
sha256s+=('4202ea5e9d703d39c522e5f1d7145b8d682a0380baf53b98309b94816408e0b6')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-i686.tar.xz')
sha256s+=('6f4a5b96c31ef5ee4f09ac15da4c7a4a9d838ed5233038136ead1e155d17f342')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/libiconv-1.15-chromeos-i686.tar.xz')
sha256s+=('28de005b59407d5343775296814e10272c53aedd860e0208f396cc873045c095')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/git-2.20.1-chromeos-i686.tar.xz')
......@@ -73,8 +79,10 @@ case "$architecture" in
sha256s+=('771b2d30a49dd691db8456f773da404753d368f3c31d03c682c552ea0b5eb65e')
;;
"x86_64")
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-x86_64.tar.xz')
sha256s+=('2e60c9b84968f17ac796e92992a5e32b4c39291d5a0b1bb0183f43d1c784303f')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/gcc7-7.3.0-3-chromeos-x86_64.tar.xz')
sha256s+=('992fa6556e3c4b45ae548b0ce64e1c5cafaffd109fe9aba5d857c6c569e5b33e')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-x86_64.tar.xz')
sha256s+=('352b78fc883cf8936136991fda9ca5d49e90b2951626158d6af8ef4b58d67f97')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/libiconv-1.15-chromeos-x86_64.tar.xz')
sha256s+=('8689ee2b4acc0440df6eec9eb0fb19aa8393b68bd64517cbca65d98041a2c7cc')
urls+=('https://dl.bintray.com/chromebrew/chromebrew/git-2.20.1-chromeos-x86_64.tar.xz')
......@@ -84,7 +92,7 @@ case "$architecture" in
;;
esac
#functions to maintain packages
# functions to maintain packages
function download_check () {
cd $CREW_BREW_DIR
......@@ -143,7 +151,7 @@ function update_device_json () {
fi
}
#create the device.json file if it doesn't exist
# create the device.json file if it doesn't exist
cd $CREW_CONFIG_PATH
if [ ! -f device.json ]; then
echo "Creating new device.json..."
......@@ -154,7 +162,7 @@ if [ ! -f device.json ]; then
echo '}' >> device.json
fi
#extract, install and register packages
# extract, install and register packages
for i in `seq 0 $((${#urls[@]} - 1))`; do
url=${urls[$i]}
sha256=${sha256s[$i]}
......@@ -169,7 +177,7 @@ for i in `seq 0 $((${#urls[@]} - 1))`; do
update_device_json $name $version
done
#download, prepare and install chromebrew
# download, prepare and install chromebrew
cd $CREW_LIB_PATH
rm -rf crew lib packages
curl -# -o crew $URL/crew
......@@ -182,14 +190,13 @@ cd $CREW_LIB_PATH/lib
curl -# -o package.rb $URL/lib/package.rb
curl -# -o package_helpers.rb $URL/lib/package_helpers.rb
#Making GCC act like CC (For some npm packages out there, only required for gcc)
# Making GCC act like CC (For some npm packages out there, only required for gcc)
#rm -f $CREW_PREFIX/bin/cc
#ln -s $CREW_PREFIX/bin/gcc $CREW_PREFIX/bin/cc
#package gcc7 has already made symbolic links for cc and gcc, no action required here
# package gcc7 has already made symbolic links for cc and gcc, no action required here
#prepare sparse checkout .rb packages directory and do it
# prepare sparse checkout .rb packages directory and do it
cd $CREW_LIB_PATH
rm -rf .git
git init
......@@ -200,7 +207,10 @@ echo lib >> .git/info/sparse-checkout
echo crew >> .git/info/sparse-checkout
git fetch origin master
git reset --hard origin/master
# install a base set of essential packages
yes | crew install buildessential less most
echo
echo "To set the default PAGER environment variable to be able to use less:"
echo "echo \"export PAGER=$CREW_PREFIX/bin/less\" >> ~/.bashrc && . ~/.bashrc"
......@@ -208,4 +218,9 @@ echo
echo "Alternatively, you could use most. Why settle for less, right?"
echo "echo \"export PAGER=$CREW_PREFIX/bin/most\" >> ~/.bashrc && . ~/.bashrc"
echo
echo "You may wish to set the default EDITOR. The current EDITOR is '$EDITOR'."
echo "For example, to set vim as the default editor, execute the following:"
echo "echo \"export EDITOR=$CREW_PREFIX/bin/vim\" >> ~/.bashrc && . ~/.bashrc"
echo "To install the vim editor, run 'crew install vim'"
echo
echo "Chromebrew installed successfully and package lists updated."
......@@ -3,21 +3,21 @@ require 'package'
class Ruby < Package
description 'Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.'
homepage 'https://www.ruby-lang.org/en/'
version '2.5.1'
source_url 'https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.xz'
source_sha256 '886ac5eed41e3b5fc699be837b0087a6a5a3d10f464087560d2d21b3e71b754d'
version '2.5.3'
source_url 'https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz'
source_sha256 '9828d03852c37c20fa333a0264f2490f07338576734d910ee3fd538c9520846c'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.1-chromeos-x86_64.tar.xz',
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/ruby-2.5.3-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: 'b03154f57e2599f71b0bdd42ba3a126397eca451ccb99485615b5b0429955152',
armv7l: 'b03154f57e2599f71b0bdd42ba3a126397eca451ccb99485615b5b0429955152',
i686: 'de1d30b89fd09b6e544fe537cbbc4cdc76f4f1610b0f801ab82ce90c1dc04999',
x86_64: '2e60c9b84968f17ac796e92992a5e32b4c39291d5a0b1bb0183f43d1c784303f',
aarch64: '5e485a0320b298e1f5c4ff50d98c6fe6d06ad9a38d9119d580a8b469418e1e6a',
armv7l: '5e485a0320b298e1f5c4ff50d98c6fe6d06ad9a38d9119d580a8b469418e1e6a',
i686: '6f4a5b96c31ef5ee4f09ac15da4c7a4a9d838ed5233038136ead1e155d17f342',
x86_64: '352b78fc883cf8936136991fda9ca5d49e90b2951626158d6af8ef4b58d67f97',
})
depends_on 'readline'
......@@ -27,8 +27,11 @@ class Ruby < Package
# at run-time, system's gmp, openssl, readline and zlibpkg are possible to use
def self.build
system "CC='gcc' ./configure --prefix=#{CREW_PREFIX} --libdir=#{CREW_LIB_PREFIX} --enable-shared"
system "make"
system './configure',
"--prefix=#{CREW_PREFIX}",
"--libdir=#{CREW_LIB_PREFIX}",
'--enable-shared'
system 'make'
end
def self.install
......
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