Linux:ソースからインストール&パッケージ作成


Pocket

checkinstallなるものでソースからインストールしつつパッケージを作成できるらしいので試してみた。

まずはcheckinstallをインストールする。

wget http://asic-linux.com.mx/~izto/checkinstall/files/rpm/checkinstall-1.6.1-1.i386.rpm
rpm -ihv checkinstall-1.6.1

どこに入ったかわからなくなったので・・・^^;

rpm -ql checkinstall

どうやら/usr/local/sbin/checkinstall

-h でヘルプ表示

/usr/local/sbin/checkinstall -h

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

Usage: checkinstall [options] [command [command arguments]]
Options:
*Package type selection*
-t,–type= Choose packaging system
-S Build a Slackware package
-R Build a RPM package
-D Build a Debian package
*Install options*
–install= Toggle created package installation
–fstrans= Enable/disable the filesystem translation code
*Scripting options*
-y, –default Accept default answers to all questions
–pkgname= Set name
–pkgversion= Set version
-A, –arch, –pkgarch= Set architecture
–pkgrelease= Set release
–pkglicense= Set license
–pkggroup= Set software group
–pkgsource=Set source location
–pkgaltsource= Set alternate source location
–pakdir= The new package will be saved here
–maintainer= The package maintainer (.deb)
–provides= Features provided by this package (.rpm)
–requires= Features required by this package
–rpmflags= Pass this flags to the rpm installer
–rpmi Use the -i flag for rpm when installing a .rpm
–rpmu Use the -U flag for rpm when installing a .rpm
–dpkgflags= Pass this flags to the dpkg installer
–spec= .spec file location
–nodoc Do not include documentation files

*Info display options*

-d<0|1|2> Set debug level
-si Run an interactive install command
–showinstall= Toggle interactive install command
-ss Run an interactive Slackware installation script
–showslack= Toggle interactive Slackware installation script

*Package tuning options*

–autodoinst= Toggle the creation of a doinst.sh script
–strip= Strip any ELF binaries found inside the package
–stripso= Strip any ELF binary libraries (.so files)
–addso= Search for any shared libs and add
them to /etc/ld.so.conf
–reset-uids= Reset perms for all files/dirs to 755 and
the owner/group for all dirs to root.root
–gzman= Compress any man pages found inside the package
–docdir= Where to put documentation files
–umask= Set the umask value
–exclude= Exclude these files/directories from the package
–include= Force the inclusion in the package of the
files/dirs listed in “listfile”
–inspect Inspect the package’s file list
–review-spec Review the spec file before creating a .rpm
–review-control Review the control file before creating a .deb
–newslack Use the new (8.1+) Slackware description format
(“–newslack” implies “-S”)
–with-tar=/path/to/tar Manually set the path to the tar binary
in this system

*Cleanup options*

–deldoc= Delete doc-pak upon termination
–deldesc= Delete description-pak upon termination
–delspec= Delete spec file upon termination
–bk Backup any overwritten files
–backup= Toggle backup

*About CheckInstall*

–help, -h Show this message
–copyright Show Copyright information
–version Show version information

RPMは-Rか。

何かのソースからパッケージを作ってみたい。
今回試すのはsquidにしてみる。

wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE13.tar.gz
tar zxfv squid-3.0.STABLE13.tar.gz
cd squid-3.0.STABLE13
./configure
make
make install
/usr/local/sbin/checkinstall -R

途中の入力は全部パスして進めると、最後にこう表示される。OKか?

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

Done. The new package has been saved to

/usr/src/redhat/RPMS/i386/squid-3.0.STABLE13-1.i386.rpm
You can install it in your system anytime using:

rpm -i squid-3.0.STABLE13-1.i386.rpm

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

とりあえず/usr/src/redhat/RPMS/i386/にrpmができているのは確認した。
しかし、このパッケージからインストールしようとするとgrepの競合というエラーが出る。
ソースからすでにインストールしたからかな?

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です