%distribution Fedora Core %(tr -dc [0-9] </etc/fedora-release)
# The vendor here is the same as the packager. Use a company or
# organization if appropriate.
%vendor %{packager}
%_home %(echo $HOME)
%_topdir %{_home}/rpm
%_tmppath %{_topdir}/tmp
%_builddir %{_tmppath}
%_rpmtopdir %{_topdir}/%{name}
%_sourcedir %{_rpmtopdir}
%_specdir %{_rpmtopdir}
%_rpmdir %{_topdir}/RPMS
%_srcrpmdir %{_topdir}/RPMS
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%_signature gpg
%_gpg_path %{_home}/.gnupg
%_gpgbin /usr/bin/gpg
%_gpg_name %(gpg --list-keys|sed -n 's/^uid *//p'|head -1)
You can also create this file by manually filling in the values you wish to use:
#
# ~/.rpmmacros file
#
# This gets all necessary information from environment variables and
# system utilities. The first e-mail address on your gnupg keyring
# should be your own.
#
%packager
%distribution Fedora Core 6
# Use an organization or company in the next line if applicable
%vendor
%_home
%_topdir
%_tmppath
%_builddir
%_rpmtopdir
%_sourcedir %{_rpmtopdir}
%_specdir %{_rpmtopdir}
%_rpmdir
%_srcrpmdir
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%_signature gpg
%_gpg_path
%_gpgbin /usr/bin/gpg
%_gpg_name
To test that this file has been saved in the correct location and is being correctly interpreted by
$ rpm --eval
Chris Tyler <[email protected]>
$ rpm --eval
/home/chris/rpm/RPMS
Both versions of this file use the directory
? A directory for each package being built, named after that package.
? A directory named
? A directory named
You'll need to create these directories:
$ mkdir -p ~/rpm/RPMS ~/rpm/tmp
The
5.7.1.2. Creating a spec file
The RPM building process is controlled by a
To start, create a new directory within
$ mkdir ~/rpm/
I'll place the source tarball
The first part of any spec file is called the
Table 5-7. Basic preamble tags in a spec file