diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dace708 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.vagrant diff --git a/README.md b/README.md index fbe691b..a545d59 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,59 @@ Forked from imeyer's ruby-1.9.2-rpm project at https://github.com/imeyer/ruby-1.9.2-rpm and updated for 2.0.0. This spec is an attempt to push for a stable replacement of Ruby 1.8.x with 1.9.2+ on RHEL based systems. The original author based it off of the work of [FrameOS](http://www.frameos.org) specs for Ruby 1.9.2 and Ruby Enterprise Edition. + +# Example to build SRPM and RPM + +You need to install [VirtualBox](https://www.virtualbox.org/) and [Vagrant](http://www.vagrantup.com/). + +``` +$ vagrant up +$ vagrant ssh +$ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} +$ (cd ~/rpmbuild/SOURCES && curl -LO http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz) +$ cp /vagrant/ruby21x.spec ~/rpmbuild/SPECS +$ sudo yum update -y +$ sudo yum install -y rpm-build +$ rpmbuild -ba ~/rpmbuild/SPECS/ruby21x.spec +エラー: ビルド依存性の失敗: + readline-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + ncurses-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + gdbm-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + glibc-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + gcc は ruby-2.1.5-2.el6.x86_64 に必要とされています + openssl-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + libyaml-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + libffi-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + zlib-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています +$ sudo yum install -y readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel libyaml-devel libffi-devel zlib-devel +$ rpmbuild -ba ~/rpmbuild/SPECS/ruby21x.spec +(snip) +書き込み完了: /home/vagrant/rpmbuild/SRPMS/ruby-2.1.5-2.el6.src.rpm +書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/ruby-2.1.5-2.el6.x86_64.rpm +``` + +## How to build RPM from SRPM + +``` +$ vagrant up +$ vagrant ssh +$ sudo yum update -y +$ sudo yum install -y rpm-build +$ curl -LO https://github.com/feedforce/ruby-2.1.x-rpm/releases/download/2.1.5/ruby-2.1.5-2.el6.src.rpm +$ rpmbuild --rebuild ruby-2.1.5-2.el6.src.rpm +ruby-2.1.5-2.el6.src.rpm をインストール中です。 +エラー: ビルド依存性の失敗: + readline-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + ncurses-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + gdbm-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + glibc-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + gcc は ruby-2.1.5-2.el6.x86_64 に必要とされています + openssl-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + libyaml-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + libffi-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています + zlib-devel は ruby-2.1.5-2.el6.x86_64 に必要とされています +$ sudo yum install -y readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel libyaml-devel libffi-devel zlib-devel +$ rpmbuild --rebuild ruby-2.1.5-2.el6.src.rpm +(snip) +書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/ruby-2.1.5-2.el6.x86_64.rpm +``` diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..531721e --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,10 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = '2' + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = 'chef/centos-6.6' + config.cache.scope = :box if Vagrant.has_plugin? 'vagrant-cachier' +end diff --git a/ruby21x.spec b/ruby21x.spec index b557327..482c194 100644 --- a/ruby21x.spec +++ b/ruby21x.spec @@ -1,4 +1,4 @@ -%define rubyver 2.1.2 +%define rubyver 2.1.5 Name: ruby Version: %{rubyver} @@ -6,7 +6,8 @@ Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel gcc unzip openssl-devel db4-devel byacc make libyaml libyaml-devel libffi libffi-devel +Requires: readline ncurses gdbm glibc openssl libyaml libffi zlib +BuildRequires: readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel make libyaml-devel libffi-devel zlib-devel Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}.tar.gz Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -63,6 +64,19 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/* %changelog +* Fri Nov 14 2014 Takashi Masuda - 2.1.5 +- Update ruby version to 2.1.5 +- Remove dependency unzip + +* Wed Nov 5 2014 Takashi Masuda - 2.1.4-2 +- Remove dependency db4 and db4-devel + +* Fri Oct 31 2014 Takashi Masuda - 2.1.4 +- Update ruby version to 2.1.4 + +* Wed Oct 29 2014 Takashi Masuda - 2.1.2 +- Remove dependencies on tcl-devel and byacc + * Fri May 9 2014 Masahito Yoshida - 2.1.2 - Update ruby version to 2.1.2 diff --git a/ruby22x.spec b/ruby22x.spec new file mode 100644 index 0000000..2ecc9e4 --- /dev/null +++ b/ruby22x.spec @@ -0,0 +1,137 @@ +%define rubyver 2.2.0 + +Name: ruby +Version: %{rubyver} +Release: 1%{?dist} +License: Ruby License/GPL - see COPYING +URL: http://www.ruby-lang.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: readline ncurses gdbm glibc openssl libyaml libffi zlib +BuildRequires: readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel make libyaml-devel libffi-devel zlib-devel +Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}.tar.gz +Summary: An interpreter of object-oriented scripting language +Group: Development/Languages +Provides: ruby(abi) = 2.2 +Provides: ruby-irb +Provides: ruby-rdoc +Provides: ruby-libs +Provides: ruby-devel +Provides: rubygems +Obsoletes: ruby +Obsoletes: ruby-libs +Obsoletes: ruby-irb +Obsoletes: ruby-rdoc +Obsoletes: ruby-devel +Obsoletes: rubygems + +%description +Ruby is the interpreted scripting language for quick and easy +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, +straight-forward, and extensible. + +%prep +%setup -n ruby-%{rubyver} + +%build +export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing" + +%configure \ + --enable-shared \ + --disable-rpath \ + --without-X11 \ + --without-tk \ + --includedir=%{_includedir}/ruby \ + --libdir=%{_libdir} + +make %{?_smp_mflags} + +%install +# installing binaries ... +make install DESTDIR=$RPM_BUILD_ROOT + +#we don't want to keep the src directory +rm -rf $RPM_BUILD_ROOT/usr/src + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%{_bindir}/* +%{_includedir}/* +%{_datadir}/* +%{_libdir}/* + +%changelog +* Fri Dec 26 2014 Kenta ONISHI - 2.2.0 +- Version bumped to 2.2.0 + +* Fri Nov 14 2014 Takashi Masuda - 2.1.5 +- Update ruby version to 2.1.5 +- Remove dependency unzip + +* Wed Nov 5 2014 Takashi Masuda - 2.1.4-2 +- Remove dependency db4 and db4-devel + +* Fri Oct 31 2014 Takashi Masuda - 2.1.4 +- Update ruby version to 2.1.4 + +* Wed Oct 29 2014 Takashi Masuda - 2.1.2 +- Remove dependencies on tcl-devel and byacc + +* Fri May 9 2014 Masahito Yoshida - 2.1.2 +- Update ruby version to 2.1.2 + +* Thu Dec 26 2013 Masahito Yoshida - 2.1.0 +- Update ruby version to 2.1.0 + +* Sat Nov 23 2013 Masahito Yoshida - 2.0.0-p353 +- Update ruby version to 2.0.0-p353 + +* Tue Jul 2 2013 Masahito Yoshida - 2.0.0-p247 +- Update ruby version to 2.0.0-p247 + +* Sun May 19 2013 Masahito Yoshida - 2.0.0-p195 +- Update ruby version to 2.0.0-p195 + +* Sat Mar 23 2013 Masahito Yoshida - 2.0.0-p0 +- Update ruby version to 2.0.0-p0 + +* Sun Feb 24 2013 Masahito Yoshida - 1.9.3-p392 +- Update ruby version to 1.9.3-p392 + +* Tue Jan 29 2013 Carlos Villela - 1.9.3-p374 +- Update ruby version to 1.9.3-p374 + +* Tue Jan 15 2013 Carlos Villela - 1.9.3-p362 +- Update ruby version to 1.9.3-p362 + +* Thu Nov 15 2012 Rajat Vig - 1.9.3-p327 +- Update ruby version to 1.9.3-p327 + +* Mon Oct 22 2012 Carlos Villela - 1.9.3-p286 +- Update ruby version to 1.9.3-p286 + +* Wed Jul 4 2012 Carlos Villela - 1.9.3-p194 +- Update ruby version to 1.9.3-p194 + +* Wed Jan 18 2012 Mandi Walls - 1.9.3-p0 +- Update ruby version to 1.9.3-p0 + +* Mon Aug 29 2011 Gregory Graf - 1.9.2-p290 +- Update ruby version to 1.9.2-p290 + +* Sat Jun 25 2011 Ian Meyer - 1.9.2-p180-2 +- Remove non-existant --sitearchdir and --vedorarchdir from %configure +- Replace --sitedir --vendordir with simpler --libdir +- Change %{_prefix}/share to %{_datadir} + +* Tue Mar 7 2011 Robert Duncan - 1.9.2-p180-1 +- Update prerequisites to include make +- Update ruby version to 1.9.2-p180 +- Install /usr/share documentation +- (Hopefully!?) platform agnostic + +* Sun Jan 2 2011 Ian Meyer - 1.9.2-p136-1 +- Initial spec to replace system ruby with 1.9.2-p136