src.rpm contains both patchs and original source code.
rpmbuild and some related rpm command will not be introduced in this article.
some important file such as file.spec in rpm configuration will be ignored as well
It only talk about how to uncompress source code and patch source code and build the final binary.
take ftp-0.17-65.fc20.src.rpm for example.
1. uncompress rpm to source code folder
1 | rpm2cpio ftp-0.17-65.fc20.src.rpm | cpio -idmv --no-absolute-filenames |
2. patch patch file
1 | patch -p1 < *.patch |