-
Notifications
You must be signed in to change notification settings - Fork 34
/
ruby.rb
69 lines (61 loc) · 1.88 KB
/
ruby.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class Ruby < FPM::Cookery::Recipe
description 'The Ruby virtual machine'
name 'ruby'
version '2.1.5.0'
revision 0
homepage 'http://www.ruby-lang.org/'
source 'http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz'
sha256 '4305cc6ceb094df55210d83548dcbeb5117d74eea25196a9b14fa268d354b100'
maintainer '<github@tinycat.co.uk>'
vendor 'fpm'
license 'The Ruby License'
section 'interpreters'
platforms [:ubuntu, :debian] do
build_depends 'autoconf',
'libreadline6-dev',
'bison',
'zlib1g-dev',
'libssl-dev',
'libncurses5-dev',
'build-essential',
'libffi-dev',
'libgdbm-dev'
depends 'libncurses5',
'libreadline6',
'libssl1.0.0',
'libtinfo5',
'zlib1g',
'libgdbm3'
end
platforms [:ubuntu] do depends.push('libffi6') end
platforms [:debian] do depends.push('libffi5') end
platforms [:fedora, :redhat, :centos] do
build_depends 'rpmdevtools',
'libffi-devel',
'autoconf',
'bison',
'libxml2-devel',
'libxslt-devel',
'openssl-devel',
'gdbm-devel'
depends 'zlib',
'libffi',
'gdbm'
end
platforms [:fedora] do depends.push('openssl-libs') end
platforms [:redhat, :centos] do depends.push('openssl') end
def build
configure :prefix => destdir,
'enable-shared' => true,
'disable-install-doc' => true,
'with-opt-dir' => destdir
make
end
def install
make :install
# Shrink package.
rm_f "#{destdir}/lib/libruby-static.a"
safesystem "strip #{destdir}/bin/ruby"
safesystem "find #{destdir} -name '*.so' -or -name '*.so.*' | xargs strip"
end
end