Skip to content

Commit b29df36

Browse files
committed
Add section 'How to make RPM from SRPM'
1 parent 6d8c565 commit b29df36

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Forked from imeyer's ruby-1.9.2-rpm project at https://github.com/imeyer/ruby-1.
44

55
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.
66

7-
# A example to make {SRPM,RPM}
7+
# A example to build SRPM and RPM
88

99
You need to install [VirtualBox](https://www.virtualbox.org/) and [Vagrant](http://www.vagrantup.com/).
1010

@@ -34,3 +34,30 @@ $ rpmbuild -ba ~/rpmbuild/SPECS/ruby21x.spec
3434
書き込み完了: /home/vagrant/rpmbuild/SRPMS/ruby-2.1.4-2.el6.src.rpm
3535
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/ruby-2.1.4-2.el6.x86_64.rpm
3636
```
37+
38+
## How to build RPM from SRPM
39+
40+
```
41+
$ vagrant up
42+
$ vagrant ssh
43+
$ sudo yum update -y
44+
$ sudo yum install -y rpm-build
45+
$ curl -LO https://github.com/feedforce/ruby-2.1.x-rpm/releases/download/2.1.4/ruby-2.1.4-2.el6.src.rpm
46+
$ rpmbuild --rebuild ruby-2.1.4-2.el6.src.rpm
47+
ruby-2.1.4-2.el6.src.rpm をインストール中です。
48+
エラー: ビルド依存性の失敗:
49+
readline-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
50+
ncurses-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
51+
gdbm-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
52+
glibc-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
53+
gcc は ruby-2.1.4-2.el6.x86_64 に必要とされています
54+
openssl-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
55+
db4-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
56+
libyaml-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
57+
libffi-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
58+
zlib-devel は ruby-2.1.4-2.el6.x86_64 に必要とされています
59+
$ sudo yum install -y readline-devel ncurses-devel gdbm-devel glibc-devel gcc openssl-devel db4-devel libyaml-devel libffi-devel zlib-devel
60+
$ rpmbuild --rebuild ruby-2.1.4-2.el6.src.rpm
61+
(snip)
62+
書き込み完了: /home/vagrant/rpmbuild/RPMS/x86_64/ruby-2.1.4-2.el6.x86_64.rpm
63+
```

0 commit comments

Comments
 (0)