Building ruby-1.8.4 and ruby-gems
From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia
Building ruby-1.8.4 for CentOS 4
sipX release 3.3 requires ruby-1.8.4 for the CSE / CDR processing (Call Resolver). CentOS 4.2 comes with ruby-1.8.1, which is too old. On Fedora Core 4 and 5 the correct version of ruby is installed through yum automatically.
The correct version of ruby can be downloaded from the CentOS development area:
wget http://dev.centos.org/centos/4/testing/i386/RPMS/ruby-1.8.4-1.c4.i386.rpm wget http://dev.centos.org/centos/4/testing/i386/RPMS/ruby-devel-1.8.4-1.c4.i386.rpm wget http://dev.centos.org/centos/4/testing/i386/RPMS/ruby-docs-1.8.4-1.c4.i386.rpm wget http://dev.centos.org/centos/4/testing/i386/RPMS/ruby-libs-1.8.4-1.c4.i386.rpm wget http://dev.centos.org/centos/4/testing/i386/RPMS/irb-1.8.4-1.c4.i386.rpm rpm -U ruby-libs-1.8.4-1.c4.i386.rpm ruby-docs-1.8.4-1.c4.i386.rpm ruby-devel-1.8.4-1.c4.i386.rpm \ ruby-1.8.4-1.c4.i386.rpm irb-1.8.4-1.c4.i386.rpm
Alternatively, you can build the ruby-1.8.4 RPMs using a non-root user. Please refer to Enable Building RPM Packages without being root for information on how to build RPM packages without being root.
| Code: Install source and build dependencies |
wget ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ruby-1.8.4-3.2.src.rpm rpm -i ruby-1.8.4-3.2.src.rpm sudo yum install readline-devel ncurses-devel gdbm-devel tcl-devel tk-devel libX11-devel emacs byacc |
The list of build dependencies in the file ruby.spec needs to be modified for the rpm to build:
| File: ~/rpmbuild/SPECS/ruby.spec |
BuildRequires: # Remove "libX11"; Add "byacc" #the dependency on libX11 could be replaced with xorg-x11-libs |
| Code: Build ruby-1.8.4 |
cd rpmbuild/SPECS/ rpmbuild -ba ruby.spec |
Generated RPMs in ~/rpmbuild/RPMS/i386:
ruby-1.8.4-3.2.i386.rpm ruby-debuginfo-1.8.4-3.2.i386.rpm ruby-devel-1.8.4-3.2.i386.rpm ruby-docs-1.8.4-3.2.i386.rpm ruby-irb-1.8.4-3.2.i386.rpm ruby-libs-1.8.4-3.2.i386.rpm ruby-mode-1.8.4-3.2.i386.rpm ruby-rdoc-1.8.4-3.2.i386.rpm ruby-ri-1.8.4-3.2.i386.rpm ruby-tcltk-1.8.4-3.2.i386.rpm
Install necessary RPMs:
cd ~/rpmbuild/RPMS/i386 sudo rpm -U ruby-libs-1.8.4-3.2.i386.rpm ruby-docs-1.8.4-3.2.i386.rpm ruby-devel-1.8.4-3.2.i386.rpm \ ruby-1.8.4-3.2.i386.rpm ruby-irb-1.8.4-3.2.i386.rpm
Building ruby-gems (FC4, CentOS 4)
ruby-gems is similar to yum as it resolves dependencies from the ruby library at rubyforge. gems is required during the build process of sipX to install rake, the ruby equivalent of a make utility. gems is also a new run-time dependency that is required to install the call resolver application used for CDR generation during installation of sipX. The Red Hat platforms (Fedora, CentOS) currently do not offer ruby-gems as part of the repository and it therefore has to be installed from source. Note that ruby-gems is architecture independent.
wget http://people.redhat.com/dlutter/yum/RPMS/ruby-gems-0.8.11-2.noarch.rpm rpm -i ruby-gems-0.8.11-2.noarch.rpm gem install --no-rdoc rake
Alternatively, you can build the ruby-gems RPM from source using a non-root user. Please refer to Enable Building RPM Packages without being root for information on how to build RPM packages without being root.
| Code: Install source |
wget http://people.redhat.com/dlutter/yum/SRPMS/ruby-gems-0.8.11-2.src.rpm rpm -i ruby-gems-0.8.11-2.src.rpm |
| Code: Build and install ruby-gems |
cd rpmbuild/SPECS/ rpmbuild -ba ruby-gems.spec cd ../RPMS/noarch sudo rpm -i ruby-gems-0.8.11-2.noarch.rpm |
| Code: Install rake |
sudo gem install --no-rdoc rake |
