rpm简单制作
我对linux一窍不通,可前段时间由于客户需要,要求给他们一个RPM版本,本人咬牙切齿鼓捣了两天,终于应付过去(这不是本人一贯作风,以后有机会仔细研究一下linux的基本操作)。
?
RPM打包是使用的linux的rpm build工具,如果命令行中提示“rpmbuild : command not found”,那是因为系统没有安装rpm build工具,这个工具一般在安装光盘中。
下面对整个实现过程简单描述一下:
使用到的linux命令有:
spec文件示例:
Summary: The Install Package for InforSuite Studio on LinuxName: ISStudioVersion: 6.0.0Release: 1License: CommercialGroup: Applications/EditorsSource: inforsuite-studio.tar.gzBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootUrl: http://www.inforbus.comPackager: CVICSEPrefix: %{_prefix}Prefix: %{_sysconfdir}%define userpath /home/CVICSE%descriptionInforSuite Studio is one of the CVICSE's Products锛宨t provides a development environment for support CVICSE's midllewares: inforflow & inforsib, and so on.Beside, we also provide some excellet tool for JEE develop, for example, the Develop Platform supports UML,MDA,Struts,Hibernate,Spring developing. %prep%setup -c%installinstall -d $RPM_BUILD_ROOT%{userpath}#cp -a %{name}* $RPM_BUILD_ROOT%{userpath}cp -a * $RPM_BUILD_ROOT%{userpath}%cleanrm -rf $RPM_BUILD_ROOTrm -rf $RPM_BUILD_DIR/%{name}-%{version}%files%defattr(-,root,root)%{userpath}%postcat > ~/Desktop/ISStudio.desktop <<EOF[Desktop Entry]Encoding=UTF-8Name=ISStudioExec=%{userpath}/eclipse/eclipseIcon=%{userpath}/ISStudio/resources/eclipse.pngCategories=Application;Development;Version=6.0.0StartupNotify=trueType=ApplicationTerminal=falseEOFcp -a ~/Desktop/ISStudio.desktop /usr/share/applications%postunrm ~/Desktop/ISStudio.desktoprm /usr/share/applications/ISStudio.desktop%changelog* Wed Mar 12 2008 zhu_qhua - InforSuite Studio project to RPM build spec-file
?
参考: http://blog.csdn.net/yueyinggufan/archive/2009/08/21/4469000.aspx
http://wiki.netbeans.org/VestaBuild
?
?
?
?
1 楼 yianpuodiaotu 2010-02-23 使用虚拟机的时候,经常会发现ssh连接不到虚拟的linux,解决方案: