Solaris下如何自己定制二进制安装包

来源:互联网 发布:蓝天风扇控制软件 编辑:程序博客网 时间:2024/05/16 09:51
 11.2 Solaris下如何自己定制二进制安装包

A: deepin <deepin@nsfocus.com> & scz <scz@nsfocus.com>

[root@ /tmp/tools]> mkdir srcroot
[root@ /tmp/tools]> cp -p /usr/ccs/bin/as srcroot  <-- 复制那些数据源到该目录下
[root@ /tmp/tools]> cp -p /usr/ccs/bin/make srcroot
[root@ /tmp/tools]> cp -p /usr/ccs/lib/cpp srcroot
[root@ /tmp/tools]> ls -lR srcroot
-rwxr-xr-x   1 bin      bin       342072 1999   1月 12 as*
-rwxr-xr-x   1 bin      bin        91344 1998   4月 27 cpp*
-rwxr-xr-x   1 bin      bin       273196 1998   4月 23 make*
[root@ /tmp/tools]> cd srcroot
[root@ /tmp/tools/srcroot]> find . -print | pkgproto > ../prototype
[root@ /tmp/tools/srcroot]> cd ..
[root@ /tmp/tools]> more prototype
f none cpp 0755 bin bin
f none as 0755 bin bin
f none make 0755 bin bin
[root@ /tmp/tools]> vi prototype  <-- 在头部增加如下行
i pkginfo=./pkginfo
[root@ /tmp/tools]> vi pkginfo
PKG="Scz"
NAME="Scz Package Cool Tools"
VERSION="2000-01-09 14:53"
CATEGORY="application"
PSTAMP="小四"
CLASSES="none"
ARCH="Solaris 2.7 For SPARC"
VENDOR="NSFocus"
BASEDIR="/tmp/tools/opt/"
EMAIL="scz@nsfocus.com"
[root@ /tmp/tools]> pkgmk -o -f ./prototype -b /tmp/tools/srcroot
[root@ /tmp/tools]> pkgtrans -s /var/spool/pkg /tmp/tools/SczPkg Scz
[root@ /tmp/tools]> rm -rf /var/spool/pkg/Scz
[root@ /tmp/tools]> pkgadd -d SczPkg
[root@ /tmp/tools]> ls -lR opt
-rwxr-xr-x   1 bin      bin       342072 1999   1月 12 as*
-rwxr-xr-x   1 bin      bin        91344 1998   4月 27 cpp*
-rwxr-xr-x   1 bin      bin       273196 1998   4月 23 make*
[root@ /tmp/tools]> pkginfo -l Scz
[root@ /tmp/tools]> pkgrm Scz
[root@ /tmp/tools]> rm SczPkg