RPM Tool Autospec !
Autospec菜花打包用的是checkinstall(对不? :roll: )
这个是rpm打包工具中系列中的另一个,用来生成spec,可以不用费那么大劲写spec了,
不过生成的spec质量不高,还是需要手动修改一些地方
看看下面这个东西就知道了
[root@Lover src]# cat*.spec
# Initial spec file created by autospec ver. 0.8 with rpm 3 compatibility
Summary: src
# The Summary: line should be expanded to about here -----^
#Summary(zh): (translated summary goes here)
Name: src
Version: unknown
Release: 1
#Group: unknown
#Group(zh): (translated group goes here)
#License: unknown
Source: src.tar.gz
#BuildRoot: %{_tmppath}/%{name}-root
# Following are optional fields
#URL: http://www.example.net/src/
#Distribution: Red Hat Contrib-Net
#Patch: src-%{version}.patch
#Prefix: /usr
#BuildArch: noarch
#Requires:
#Obsoletes:
#BuildRequires:
%description
src version unknown
#%description -l zh
#(translated description goes here)
%prep
%setup -n src
#%patch
%build
make
%install
%makeinstall
#%clean
#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_datadir}/tst
%dir %{_datadir}/tst/plugin
%{_bindir}/tst
%{_datadir}/tst/plugin/libtest.so
"/usr/share/tst/plugin/*.png"
%{_datadir}/tst/plugin/test.plugin
%config %{_datadir}/tst/tst.conf
%changelog
* Sun Oct 03 2004<root@Lover>
- Initial spec file created by autospec ver. 0.8 with rpm 3 compatibility
[root@Lover src]#
还有,这个spec要在你的source已经编译好了后才能正确生成
生成spec用如下命令
make -n install | autospec -i > *.spec
有兴趣看这里:
http://www.npsnet.com/danf/software/
这里是作好的rpm:
RPM:
http://www.magiclinux.org/ftp/people/lovewilliam/Autospec/autospec-0.8-1mgc.noarch.rpm
SRPM:
http://www.magiclinux.org/ftp/people/lovewilliam/Autospec/autospec-0.8-1mgc.src.rpm
想参与MagicLinux的有了这个工具就不怕了 :twisted::twisted::twisted::twisted:
不过这个东西还是不完善啊,还是要学会写spec的好! 这完全是一个(不完善的) spec 模板呀! 关键在于初学者搞不懂每个字段的含义。有了模板也不会用。 恩,基础知识还是必要的 rpm 建包原理参见:
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&p=4176124#4176124 UP! :lol:8) dump! :twisted: :twisted: 支持 :mrgreen:
页:
[1]