ksaitoの日記

日々試したことの覚え書き

tar ballからパッケージを作るパッケージ

移転しました。

自動的にリダイレクトします。

checkinstallを使うと簡単にtar ballからパッケージを作れます。
debrpmのパッケージがないソフトウェアをインストールするときに便利です。
RedHatrubyのバージョンが古かったので、新しいバージョンに入れ替えてみました。

checkinstallパッケージのインストール

checkinstallRPMをダウンロードしてインストールします。

$ wget http://herr0s.hp.infoseek.co.jp/checkinstall-1.6.0-1.i386.rpm
`checkinstall-1.6.0-1.i386.rpm' に保存中

100%[======================================>] 94,563      --.-K/s 時間 0.1s

$ sudo rpm -i checkinstall-1.6.0-1.i386.rpm
$

rubyのソースを取得してmakeする

手順をコピーするの忘れてしまいました。
ソースのtar ballを展開して、configure&makeします。

パッケージ化する

コンパイルが正常に終了したら、そのディレクトリでcheckinstallを起動します。
パッケージ化してインストールまでしてくれます。
お手軽ですが、パッケージ化の作業を手伝ってくれるだけなのでパッケージの依存関係には十分注意が必要です。
今度、debパッケージも試してみよう。

$ sudo checkinstall --fstrans=no

checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.



 **************************************
 **** RPM package creation selected ***
 **************************************

This package will be built according to these values:

1 -  Summary: [ ruby 1.8.7 ]
2 -  Name:    [ ruby-1.8.7 ]
3 -  Version: [ p160 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ Applications/System ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ ruby-1.8.7-p160 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ ruby-1.8.7 ]

変更を行う場合、項目を番号で選んで Enter キーを押してください 。行わないならこのまま Enter でかまいません:

Installing with make install...

 ========================= Installation results ===========================
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb  ./instruby.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --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...
./
./NEWS
./GPL
./ChangeLog
./COPYING.ja
./doc/
./doc/ChangeLog-1.8.0
./doc/irb/
./doc/irb/irb.rd
./doc/irb/irb-tools.rd.ja
./doc/irb/irb.rd.ja
./doc/forwardable.rd
./doc/forwardable.rd.ja
./doc/NEWS-1.8.0
./doc/shell.rd
./doc/shell.rd.ja
./README.EXT.ja
./README.EXT
./COPYING
./README.ja
./README

Some of the files created by the installation are inside the build
directory: /home/ksaito/src/ruby-1.8.7-p160

You 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]:
これらをパッケージから除外しますか? (普通 Enter でしょ?)  [y]:

ファイルを tmp ディレクトリにコピーします…OK

ELF バイナリとライブラリを削除…OK

man を圧縮…OK

ファイルリストを作成…OK

RPM パッケージを作成中…OK

RPM パッケージをインストール中…OK

一時ファイルを消去…OK

バックアップパッケージを書きだし中…OK

temp ディレクトリを消去…OK


 **********************************************************************

 Done. The new package has been installed and saved to

 /usr/src/redhat/RPMS/i386/ruby-1.8.7-p160-1.i386.rpm

 You can remove it from your system anytime using:

      rpm -e ruby-1.8.7-p160-1

 **********************************************************************

$