3.12. An example SPEC file for a program written in C
This section shows an example SPEC file for the cello program that was written in the C programming language.
An example SPEC file for the cello program written in C
The BuildRequires
directive, which specifies build-time dependencies for the package, includes two packages that are needed to perform the compilation build process:
-
The
gcc
package -
The
make
package
The Requires
directive, which specifies run-time dependencies for the package, is omitted in this example. All runtime requirements are handled by rpmbuild
, and the cello
program does not require anything outside of the core C standard libraries.
The %build
section reflects the fact that in this example a Makefile
for the cello program was written, hence the GNU make command provided by the rpmdev-newspec
utility can be used. However, you need to remove the call to %configure
because you did not provide a configure script.
The installation of the cello program can be accomplished by using the %make_install
macro that was provided by the rpmdev-newspec
command. This is possible because the Makefile
for the cello program is available.