ソースからインストールするときもパッケージを作ってから入れたい
てなことを、ずいぶん昔に思ってそのときは、google先生にお尋ねし無事完了だったわけだけれども、遙か昔のことで忘れてもた。
てことで、再度google先生にお伺いを…、たてようにも何で検索したら良いかすら忘却の彼方へ。
MAKEPKG(8)
pkgtool内の makepkg がパッケージ作成ツールでした。
MAKEPKG(8) MAKEPKG(8)
NAME
makepkg - make Slackware packages.
SYNOPSIS
makepkg [ -l, --linkadd y|n ] [ -c, --chown y|n ] packagename
DESCRIPTION
makepkg creates a new Slackware compatible package. The package is constructed using the contents of the current directory and all subdirectories. If symbolic links exist,
they will be converted to script code to recreate them when the package is installed. This code will be appended to the primary installation script ( install/doinst.sh ) ,
or, if that script does not exist it will be created with those contents. The package will be written out to the file packagename which should be the full name, including
the extension (usually .tgz).
てことで、/var/log/packages にログを残すためにも、自前パッケージを作成してしましましょう。
パッケージを作成する
準備
tar xzvf hoge-0.1.tar.gz
./configure
make
パッケージ作成用作業フォルダにインストール
make DESTDIR=/tmp/hoge-0.1 install
パッケージ作成
cd /tmp/hoge-0.1
makepkg ../hoge-0.1.tgz
cd /tmp
installpkg hoge-0.1.tgz
cat /var/log/packages/hoge-0.1
まとめ
自前でビルドしたソフトウエアって、ビルドしたディレクトリは残してはいるものの、どれを入れたか忘れちゃうときもあるので、パッケージ作ると後でわかって便利よね−。