Skip to content

Commit 21f43b9

Browse files
committed
* ruby-ee is now parallel instalable
1 parent d55245b commit 21f43b9

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

ruby-ee.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/opt/ruby-ee/lib64

ruby-ee.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
export PATH=$PATH:/opt/ruby-ee/bin/

ruby-ee.spec

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Package Maintainer: Increment phusion_release to match latest release available
22
%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
55

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}}
810
%{!?ruby_sitelib: %global ruby_sitelib %{ruby_vendorlib}/site_ruby}
911
%{!?ruby_sitearch: %global ruby_sitearch %{ruby_vendorarch}/site_ruby}
1012

@@ -13,26 +15,19 @@ Summary: Ruby Enterprise Edition (Release %{phusion_release})
1315
Name: ruby-ee
1416
Vendor: Phusion.nl
1517
Version: 1.8.7
16-
Release: 8.%{phusion_release}%{?dist}
18+
Release: 9.%{phusion_release}%{?dist}
1719
License: GPL
1820
Group: Development/Languages
1921
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
2125
BuildRoot: %{_tmppath}/ruby-%{version}-%{phusion_release}-root-%(%{__id_u} -n)
2226
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel autoconf gcc unzip openssl-devel db4-devel byacc
2327
BuildRequires: ruby
2428
BuildRequires: gcc-c++
2529
BuildRequires: make
2630
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
3631

3732
%description
3833
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
4641

4742
%build
4843
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
5245
%configure \
46+
--prefix=%{ruby_prefix} \
47+
--exec-prefix=%{ruby_prefix} \
5348
--with-default-kcode=none \
5449
--enable-shared \
5550
--enable-pthread \
5651
--disable-rpath \
52+
--program-suffix='-ree' \
5753
--with-readline-include=%{_includedir}/readline5 \
5854
--with-readline-lib=%{_libdir}/readline5 \
5955
--with-sitedir='%{ruby_sitelib}' \
6056
--with-sitearchdir='%{ruby_sitearch}' \
6157
--with-vendordir='%{ruby_vendorlib}' \
6258
--with-vendorarchdir='%{ruby_vendorarch}'
6359

64-
make
60+
%{__make} %{?_smp_mflags} CFLAGS="%{optflags} -fPIC -fno-strict-aliasing -g -D__LINUX__ -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
6561

6662
%install
63+
%{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/
64+
%{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/
6765
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+
7171

7272
%clean
7373
rm -rf $RPM_BUILD_ROOT
7474

75+
%post
76+
/sbin/ldconfig
77+
7578
%files
7679
%defattr(-,root,root)
77-
/usr/bin/*
78-
/usr/lib64/*
7980
/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
8184

8285
%doc source/ChangeLog
8386
%doc source/COPYING
@@ -89,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT
8992
%doc source/ToDo
9093

9194
%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+
9298
* Mon Apr 11 2011 Sergio Rubio <[email protected]> - 1.8.7-8.2011.03.frameos
9399
- Back to ruby-ee
94100

0 commit comments

Comments
 (0)