怎样才能把源码包转换成RPM

怎样才能把源码包转换成RPM

如题,其实是我想知道怎么做一个rpm来给别人使用,这样一来大家都方便
可以用rpm --rebuild *.src.rpm
rpmbuild -ba filename.spec
但是一般的.tar.gz那种包怎么办
[quote:5db45de409="windsoul"]但是一般的.tar.gz那种包怎么办[/quote]
好象不行!
一般一个rpm包都带原码的!
[quote:73edd23423="windsoul"]但是一般的.tar.gz那种包怎么办[/quote]
rpmbuild -ta filename.tar.gz
rpmbuild -tb filename.tar.gz
rpmbuild -ts filename.tar.gz

不是所有的都行
具体的看man手册
http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part1/index.shtml
http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part2/index.shtml
http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part3/index.shtml