How to make an RPM package (without rpmbuild)
deb:
fakeroot dpkb-build -b directory pack开发者_JAVA百科age.deb
# Name, version, architecture, etc. are in directory/DEBIAN/control
rpm:
$SOME_COMMAND directory package.rpm
# Name, version, architecture, etc. are in SOME_FILE
What to use as SOME_COMMAND and SOME_FILE?
First it is not clear what kind of RPM package you intend to build. It is .src.rpm
or a binary .rpm
?
RPM packages have a file format. This consists of a lead block, a number of header structures, a signature block, and an archive. It's like a ZIP file, but it contains extra information in binary at the beginning to ensure that the package meta-data is stored and accessible for those who wish to query the package prior to installation.
So you can either write a binary file according to the specification, or you can use the tools which guarantee the file is written according to the specification (namely rpmbuild). I would highly recommend the latter, as an RPM is not "just another ZIP file" and it's not "just another tar file". It has more structure than that, and the cost of rolling it "manually" eventually starts to incur the cost of redeveloping portions of rpmbuild.
Note that rpmbuild can be installed on systems that don't actually use RPM for their own internal package management.
精彩评论