Referenced from: 80929319
72050725
1, first I do this is very simple: the source program file on an executable file, the executable I named a, is a source code A.C compiled, A.C source files are:
#include <stdio.h>Main () {printf ("dddd\n");}
2. Compress this executable file into tar.gz format:
Tar zcvf aa.tar.gz A
3, create the Rpmbuild directory under the root directory and several sub-directories of subordinates
[[email protected] ~]$ mkdir-p ~/rpmbuild/{build,buildroot,rpms,sources,specs,srpms}
The general purpose of each directory is as follows:
- Build to compile the temp directory for RPM packages
- BuildRoot compiled post-build software temporary installation directory
- The directory where the RPMS final generated installable RPM package
- SOURCES all source code and patch file directory
- SPECS directory where spec files are stored (important)
- SRPMS Software final RPM source format storage Path
Homemade RPM Package