$ gtar xvzf ./ruby-1.8.6.tar.gz
:
$ cd ruby-1.8.6
$ ./configure –prefix=/usr
:
$ make
:
DAG(rpmforge) は redhat 及び fedora 向けの追加パッケージ群です。
$ wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
$ su
# rpm -hiv rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# vi /etc/yum.repos.d/rpmforge.repo
# yum list | wc -l
5876
# yum list –enablerepo=rpmforge | wc -l
9239
# yum –enablerepo=rpmforge install checkinstall
:
Installed: checkinstall.i386 0:1.6.0-3.el5.rf
Complete!
checkinstallを使ってRPM化していきます。rubyのようなインストールしながら
ファイルをチェックして進んでいくタイプの場合には”-fstrans=no”をつけてあげる必要があります。
$ su
# checkinstall –fstrans=no
checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]:Preparing package documentation…OK
Please choose the packaging method you want to use.
Slackware [S], RPM [R] or Debian [D]? R**************************************
**** RPM package creation selected ***
**************************************This package will be built according to these values:
1 – Summary: [ Package created with checkinstall 1.6.0 ]
2 – Name: [ ruby ]
3 – Version: [ 1.8.6 ]
4 – Release: [ 1 ]
5 – License: [ GPL ]
6 – Group: [ Applications/System ]
7 – Architecture: [ i386 ]
8 – Source location: [ ruby-1.8.6 ]
9 – Alternate source location: [ ]
10 – Requires: [ ]
11 – Provides: [ ruby ]Enter a number to change any of them or press ENTER to continue:
Installing with make install…
========================= Installation results ===========================
./miniruby ./instruby.rb –dest-dir=”" –extout=”.ext” –make=”make” –mflags=”" –make-flags=”" –installed-list .installed.list –mantype=”doc”
installing binary commands
installing command scripts
installing library scripts
installing headers
installing manpages
installing extension objects
installing extension scripts======================== Installation successful ==========================
Copying documentation directory…
./
./doc/
./doc/irb/
./doc/irb/irb.rd.ja
./doc/irb/irb-tools.rd.ja
./doc/irb/irb.rd
./doc/NEWS-1.8.0
./doc/shell.rd.ja
./doc/forwardable.rd.ja
./doc/forwardable.rd
./doc/ChangeLog-1.8.0
./doc/shell.rd
./COPYING.ja
./GPL
./README.EXT
./NEWS
./README
./README.EXT.ja
./ChangeLog
./COPYING
./README.jaSome of the files created by the installation are inside the build
directory: /home/hoge/rpm/ruby-1.8.6You probably don’t want them to be included in the package,
especially if they are inside your home directory.
Do you want me to list them? [n]:
Should I exclude them from the package? (Saying yes is a good idea) [y]:Copying files to the temporary directory…OK
Striping ELF binaries and libraries…OK
Compressing man pages…OK
Building file list…OK
Building RPM package…OK
NOTE: The package will not be installed
Erasing temporary files…OK
Writing backup package…OK
Deleting temp dir…
OK**********************************************************************
Done. The new package has been saved to
/usr/src/redhat/RPMS/i386/ruby-1.8.6-1.i386.rpm
You can install it in your system anytime using:rpm -i ruby-1.8.6-1.i386.rpm
**********************************************************************
$ mkdir -p ~/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
$ echo “%_topdir /home/hoge/rpm” > ~/.rpmmacros
