1
1
# Package Maintainer: Increment phusion_release to match latest release available
2
2
%define phusion_release 2011.03
3
- %define rubyver 1.8.7
4
- %define rubyxver 1.8
3
+ %define rubyver 1.8.7
4
+ %define rubyxver 1.8
5
5
6
- %{! ?ruby_vendorlib: %global ruby_vendorlib %{_prefix }/lib/ruby}
7
- %{! ?ruby_vendorarch: %global ruby_vendorarch %{_libdir }/ruby}
6
+ %define _prefix /opt/ruby-ee
7
+ %{! ?ruby_prefix: %global ruby_prefix /opt/ruby-ee}
8
+ %{! ?ruby_vendorlib: %global ruby_vendorlib %{ruby_prefix }/lib/ruby}
9
+ %{! ?ruby_vendorarch: %global ruby_vendorarch %{ruby_vendorlib }}
8
10
%{! ?ruby_sitelib: %global ruby_sitelib %{ruby_vendorlib }/site_ruby}
9
11
%{! ?ruby_sitearch: %global ruby_sitearch %{ruby_vendorarch }/site_ruby}
10
12
@@ -13,26 +15,19 @@ Summary: Ruby Enterprise Edition (Release %{phusion_release})
13
15
Name: ruby-ee
14
16
Vendor: Phusion.nl
15
17
Version: 1.8.7
16
- Release: 8 .%{phusion_release }%{?dist }
18
+ Release: 9 .%{phusion_release }%{?dist }
17
19
License: GPL
18
20
Group: Development/Languages
19
21
URL: http://www.rubyenterpriseedition.com/
20
- Source0: ruby-enterprise-%{version }-%{phusion_release }.tar.gz
22
+ Source0: http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-%{version }-%{phusion_release }.tar.gz
23
+ Source1: ruby-ee.sh
24
+ Source2: ruby-ee.conf
21
25
BuildRoot: %{_tmppath }/ruby-%{version }-%{phusion_release }-root-%(%{__id_u} -n)
22
26
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel autoconf gcc unzip openssl-devel db4-devel byacc
23
27
BuildRequires: ruby
24
28
BuildRequires: gcc-c++
25
29
BuildRequires: make
26
30
Provides: ruby(abi) = 1.8
27
- Provides: ruby-irb
28
- Provides: ruby-rdoc
29
- Provides: ruby-libs
30
- Provides: ruby-devel
31
- Obsoletes: ruby
32
- Obsoletes: ruby-libs
33
- Obsoletes: ruby-irb
34
- Obsoletes: ruby-rdoc
35
- Obsoletes: ruby-devel
36
31
37
32
%description
38
33
Ruby Enterprise Edition is a server-oriented friendly branch of Ruby which includes various enhancements:
@@ -46,38 +41,46 @@ Ruby Enterprise Edition is a server-oriented friendly branch of Ruby which inclu
46
41
47
42
%build
48
43
cd source
49
- CFLAGS= "$RPM_OPT_FLAGS -fno-strict-aliasing -g -02"
50
- export CFLAGS
51
- patch -p1 -R < ../fast-threading.patch
44
+ %{__patch} -p1 -R < ../fast-threading.patch
52
45
%configure \
46
+ --prefix= %{ruby_prefix } \
47
+ --exec-prefix= %{ruby_prefix } \
53
48
--with-default-kcode= none \
54
49
--enable-shared \
55
50
--enable-pthread \
56
51
--disable-rpath \
52
+ --program-suffix= '-ree' \
57
53
--with-readline-include= %{_includedir }/readline5 \
58
54
--with-readline-lib= %{_libdir }/readline5 \
59
55
--with-sitedir= '%{ruby_sitelib }' \
60
56
--with-sitearchdir= '%{ruby_sitearch }' \
61
57
--with-vendordir= '%{ruby_vendorlib }' \
62
58
--with-vendorarchdir= '%{ruby_vendorarch }'
63
59
64
- make
60
+ %{__make} %{? _smp_mflags } CFLAGS = "%{ optflags } -fPIC -fno-strict-aliasing -g -D__LINUX__ -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
65
61
66
62
%install
63
+ %{__mkdir_p} $RPM_BUILD_ROOT /%{_sysconfdir }/profile.d/
64
+ %{__mkdir_p} $RPM_BUILD_ROOT /%{_sysconfdir }/ld.so.conf.d/
67
65
cd source
68
- make DESTDIR=$RPM_BUILD_ROOT \
69
- install
70
- cp * .h $RPM_BUILD_ROOT /%{ruby_vendorarch }/%{rubyxver }/
66
+ %{__make} DESTDIR=$RPM_BUILD_ROOT install
67
+ %{__cp} * .h $RPM_BUILD_ROOT /%{ruby_vendorarch }/%{rubyxver }/
68
+ %{__install} -m 0755 %{SOURCE1 } %{buildroot }/%{_sysconfdir }/profile.d/
69
+ %{__cp} %{SOURCE2 } %{buildroot }/%{_sysconfdir }/ld.so.conf.d/
70
+
71
71
72
72
%clean
73
73
rm -rf $RPM_BUILD_ROOT
74
74
75
+ %post
76
+ /sbin/ldconfig
77
+
75
78
%files
76
79
%defattr(-,root,root)
77
- /usr/bin/*
78
- /usr/lib64/*
79
80
/usr/share/man/man1/*
80
- %{ruby_vendorarch }/%{rubyxver }/* .h
81
+ %{ruby_prefix }/*
82
+ %{_sysconfdir }/profile.d/ruby-ee.sh
83
+ %{_sysconfdir }/ld.so.conf.d/ruby-ee.conf
81
84
82
85
%doc source/ChangeLog
83
86
%doc source/COPYING
@@ -89,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT
89
92
%doc source/ToDo
90
93
91
94
%changelog
95
+ *
Wed Jul 27 2011 Sergio Rubio <[email protected] > -
1.8.7-9.2011.03
96
+ - ruby-ee installs to /opt now and is parallel instalable with system ruby
97
+
92
98
*
Mon Apr 11 2011 Sergio Rubio <[email protected] > -
1.8.7-8.2011.03.frameos
93
99
- Back to ruby-ee
94
100
0 commit comments