http://blogs.sun.com/thaniwa/page/SolarisJa を参考にパッケージを作成する。
SUN Packaging Guide - Roadmap / http://www.garex.net/sun/packaging/ (英語)もどうぞ
mkpkg を修正。
OPTION_EXEC="$OPTION_EXEC -o \"${OPTION[${counter}]}\""
このバックスラッシュを削除して
OPTION_EXEC="$OPTION_EXEC -o "${OPTION[${counter}]}""
とする。
試しに sl のパッケージを作ってみる。 配置は
$HOME/opt/sl -+- bin --- sl +- man --- ja --- man1 - sl.1 +- share --- sl -+- README +- README.patch5
root になってパーミッションを修正する
# chown root:bin bin # chown bin:bin bin/sl # chown -R bin:bin man # chown root:bin man # chown -R root:sys share
一般ユーザに戻り以下のオプションでパッケージを作成
パッケージのファイル名: ../sl5-1.patch.pkg gzip 圧縮する: する (-g) パッケージ名: JPYNsl-patch5fix1 アプリケーション名: sl バージョン: 1.0 patch 5 fix 1 アーキテクチャ: i86pc ベースディレクトリ: /usr/local 説明: "sl_is_a_well-known_joke_program_which_shows_an_animated_SL_(steam_locomotive)_running_across_the_terminal." シェルスクリプトの悲しさよ。アンダーバーで繋がないと、DESC=sl となるのであった。 (文章提供:pkgsrc on NetBSD)
ワーニング消去用オプション。以下は無くても良い。
-o `date +PSTAMP=%Y%m%d%H%M%S` -o CLASSES=none
% ~/archive/mkpkg/mkpkg ../sl-patch5fix1.pkg -g -p JPYNsl-patch5fix1 -n sl -v "1 .0 patch 5 fix 1" -a i86pc -b /usr/local -d "sl_is_a_well-known_joke_program_whi ch_shows_an_animated_SL_(steam_locomotive)_running_across_the_terminal." -o `dat e +PSTAMP=%Y%m%d%H%M%S` -o CLASSES=none unknown OPTION_EXEC -d sl_is_a_well-known_joke_program_which_shows_an_animated_SL_(steam _locomotive)_running_across_the_terminal. -o PSTAMP=20071112150715 -o CLASSES=no ne create pkginfo file... create pkginfo ==== PKG=JPYNsl-patch5fix1 NAME=sl VERSION=1.0 patch 5 fix 1 ARCH=i86pc DESC=sl_is_a_well-known_joke_program_which_shows_an_animated_SL_(steam_locomotiv e)_running_across_the_terminal. BASEDIR=/usr/local CATEGORY=application VENDOR=unknown PSTAMP=20071112150715 CLASSES=none ==== done. create prototype file... making prototype file with user=root and group=other done. ## Building pkgmap from package prototype file. ## Processing pkginfo file. ## Attempting to volumize 10 entries in pkgmap. part 1 -- 64 blocks, 9 entries ## Packaging one part. /home/ossan/opt/sl/JPYNsl-patch5fix1/pkgmap /home/ossan/opt/sl/JPYNsl-patch5fix1/pkginfo /home/ossan/opt/sl/JPYNsl-patch5fix1/reloc/bin/sl /home/ossan/opt/sl/JPYNsl-patch5fix1/reloc/man/ja/man1/sl.1 /home/ossan/opt/sl/JPYNsl-patch5fix1/reloc/share/sl/README /home/ossan/opt/sl/JPYNsl-patch5fix1/reloc/share/sl/README.patch5 ## Validating control scripts. ## Packaging complete. Transferring <JPYNsl-patch5fix1> package instance done.
root に戻ってパッケージを追加
# gzip -d sl-patch5fix1.pkg.gz # pkgadd -d sl-patch5fix1.pkg The following packages are available: 1 JPYNsl-patch5fix1 sl (i86pc) 1.0 patch 5 fix 1 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: Processing package instance <JPYNsl-patch5fix1> from </home/ossan/opt/sl-patch5fix1.pkg> sl (i86pc) 1.0 patch 5 fix 1 This appears to be an attempt to install the same architecture and version of a package which is already installed. This installation will attempt to overwrite this package. unknown Using </usr/local> as the package base directory. ## Processing package information. ## Processing system information. 10 package pathnames are already properly installed. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. Installing sl as <JPYNsl-patch5fix1> ## Installing part 1 of 1. [ verifying class <none> ] Installation of <JPYNsl-patch5fix1> was successful. # pkginfo -l JPYNsl-patch5fix1 PKGINST: JPYNsl-patch5fix1 NAME: sl CATEGORY: application ARCH: i86pc VERSION: 1.0 patch 5 fix 1 BASEDIR: /usr/local VENDOR: unknown DESC: sl_is_a_well-known_joke_program_which_shows_an_animated_SL_(steam_l ocomotive)_running_across_the_terminal. PSTAMP: 20071112150715 INSTDATE: Nov 12 2007 15:09 STATUS: completely installed FILES: 10 installed pathnames 6 directories 1 executables 49 blocks used (approx)
&color():Invalid color: #123;