Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (87 sloc) 2.22 KB
name: ruby
version: '2.8.0'
base: core18
summary: Interpreter for the Ruby programming language
description: |
Ruby is an interpreted object-oriented programming language often
used for web development. It also offers many scripting features to
process plain text and serialized files, or manage system tasks.
It is simple, straightforward, and extensible.
grade: stable
confinement: classic
environment:
GEM_HOME: $HOME/.gem
GEM_PATH: $HOME/.gem:$SNAP/lib/ruby/gems/2.8.0
RUBYLIB: $SNAP/lib/ruby/2.8.0:$SNAP/lib/ruby/2.8.0/$SNAP_ARCH:$RUBYLIB
apps:
env:
command: bin/env
adapter: none
ruby:
command: bin/ruby
adapter: none
irb:
command: bin/irb
adapter: none
rdoc:
command: bin/rdoc
adapter: none
ri:
command: bin/ri
adapter: none
gem:
command: bin/gem
adapter: none
rake:
command: bin/rake
adapter: none
bundle:
command: bin/bundle
adapter: none
parts:
ruby:
plugin: make
source: https://cache.ruby-lang.org/pub/ruby/snapshot.tar.gz
build-packages: [gcc, curl, autoconf, bison, libssl-dev, libyaml-dev, libreadline6-dev, zlib1g-dev, libncurses5-dev, libffi-dev, libdb-dev, libgdbm-dev]
override-pull: |
snapcraftctl pull
override-build: |
./configure --prefix=/ --enable-shared
make
make extract-gems
make install DESTDIR=$SNAPCRAFT_PART_INSTALL
case "$SNAPCRAFT_ARCH_TRIPLET" in
"x86_64-linux-gnu")
target="x86_64-linux"
arch="amd64"
;;
"arm-linux-gnueabihf")
target="armv7l-linux-eabihf"
arch="armhf"
;;
"aarch64-linux-gnu")
target="aarch64-linux"
arch="arm64"
;;
"i386-linux-gnu")
target="i686-linux"
arch="i386"
;;
*)
echo "Unsupported architecture $SNAPCRAFT_ARCH_TRIPLET"
exit 1
;;
esac
root="$SNAPCRAFT_PART_INSTALL/lib/ruby/2.8.0"
ln -s "$target" "$root/$arch"
override-prime: |
snapcraftctl prime
find bin/ -type f -exec grep -Iq . {} \; -and -exec sed -i -e 's|^#!//bin/ruby$|#!/snap/ruby/current/bin/ruby|' {} \;
stage:
- -bin/gem
gem:
source: src
plugin: dump
env:
source: src
plugin: dump
You can’t perform that action at this time.