RPMBUILD(1) General Commands Manual RPMBUILD(1) rpmbuild - RPM rpmbuild -b [] _ ... rpmbuild -r [] _ ... rpmbuild -t [] _tar ... rpmbuild {--rebuild|--recompile} [options] SOURCE_PACKAGE ... rpmbuild RPM . . . : . -bSTAGE . -rSTAGE RPM . -tSTAGE tar(5). --rebuild, --recompile -ra. : . . () . rpmbuild. . a . b s " " . . b . . r . %prep %generate_buildrequires . . s . . . %prep %build %install . RPM / . . p (%prep) . d (%generate_buildrequires) buildreqs.nosrc.rpm . . f (%conf) . ./configure. c (%build) . make. i (%install and %check) . make install make check. l " " - %files . %install. SPEC_FILE RPM. SOURCE_PACKAGE RPM ( .src.rpm) TAR_ARCHIVE tar(5) . rpmbuild Specfile .spec. --build-in-place . %setup %builddir/%buildsubdir . %prep . --clean (). --nobuild . . --nocheck %check . --noclean %clean . --nodebuginfo . --nodeps . --noprep %prep . rpmbuild %prep . --rmsource ( rpmbuild --rmsource foo.spec). NoSource NoPatch . --rmspec ( rpmbuild --rmspec foo.spec). --rpmfcdebug . --scm=SCM SCM %autosetup . SCM patch () gendiff git quilt %autosetup -pN. --short-circuit ( ). -bc -bi -bb. . . --with OPTION OPTION . --without OPTION OPTION . rpm-common(8) . %generate_buildrequires rpmbuild buildreqs.nosrc.rpm 11. dnf-builddep(8). . -br buildreqs.nosrc.rpm rpmbuild 11. -br --nodeps 11 buildreqs.nosrc.rpm. RPM_BUILD_NCPUS . 0 . %generate_buildrequires 11 . rpmbuild --rebuild hello-1.0-1.src.rpm hello-1.0-1.src.rpm. rpmbuild -bb --nocheck --with openssl hello.spec hello.spec %check openssl ( ). rpmbuild -ta hello-2.0.tar.gz hello-2.0.tar.gz ( TAR_ARCHIVE ). rpmbuild -bc hello.spec hello.spec %build . rpmbuild -bi --short-circuit hello.spec %install hello.spec . %build . %files . rpm-common(8) gendiff(1) popt(3) rpm(8) rpm-common(8) rpmbuild-config(5) rpm2cpio(1) rpmkeys(8) rpmspec(1) rpmsign(1) rpm-setup-autosign(1) rpm-macros(7) http://www.rpm.org/ 3 . . : . RPM 6.0.1 6 2026 RPMBUILD(1)