Setting up rpmbuild

To setup for rpmbuild follow the command below (I’ve added a thing or two past basics.

Commands

# yum install rpmdevtools
# rpmdev-setuptree
# mkdir ~/rpmbuild/tmp

# -- Optional below here
# echo "%_tmppath %{_topdir}/tmp" >> ~/.rpmmacros
# echo "%packager YourName" >> ~/.rpmmacros

Provides These Files

Filename : /usr/bin/rpmdev-vercmp
Filename : /usr/bin/rpmdev-sort
Filename : /usr/bin/rpmdev-sha224
Filename : /usr/bin/rpmdev-sha1
Filename : /usr/bin/rpmdev-sum
Filename : /usr/bin/rpmdev-checksig
Filename : /usr/bin/rpmdev-sha384
Filename : /usr/bin/rpmdev-sha512
Filename : /usr/bin/rpmdev-newinit
Filename : /usr/bin/rpmdev-wipetree
Filename : /usr/bin/rpmdev-packager
Filename : /usr/bin/rpmdev-bumpspec
Filename : /usr/bin/rpmdev-newspec
Filename : /usr/bin/rpmdev-md5
Filename : /usr/bin/rpmdev-diff
Filename : /usr/bin/rpmdev-setuptree
Filename : /usr/bin/rpmdev-rmdevelrpms
Filename : /usr/bin/rpmdev-sha256
Filename : /usr/bin/rpmdev-cksum
Filename : /usr/bin/rpmdev-extract

Sets Up This Directory Tree (in home, ~/)

~/rpmbuild
├── BUILD
├── RPMS
├── SOURCES
├── SPECS
├── SRPMS
└── tmp

6 directories, 0 files

What are the Directories For?

ContentMacro CodeFunction
~/rpmbuild%_topdirThe top most directory of
your structure that everything
else is based off of.
~/rpmbuild/BUILD%_builddirThe build directory for the
source code package which
is decompressed and compiled
here.
~/rpmbuild/RPMS%_rpmdirThe binary RPM package is
created and placed here.
~/rpmbuild/SOURCES%_sourcedirThe source files for the
package (tar.gz, single files,
etc), and all patches are
stored in this directory.
~/rpmbuild/SPECS%_specdirThe RPM package
configuration file (.spec) is
stored here.
~/rpmbuild/SRPMS%_srcrpmdirThe source code RPM
package (SRPM) is created and
stored here.
~/rpmbuild/tmp%_tmppathThe tmp directory for extra
packaging work in case wider
permissions are not available.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.