Skip to content
Advertisement

Install Section of rpm package

I am naive on creating RPM packages.

I want to know the meaning of below command:

JavaScript

Advertisement

Answer

in the %install section, you are supposed to install all your files in the %{buildroot] directory; just the way they will be installed on the final system.

JavaScript

he cleans this directory. I never use this; since my buildroot is unique for each of my packages. (using BuildRoot: %{_tmppath}/%{name}-%{version}-build in the beginning of my spec file)

JavaScript

there seems to have been a %{_prefix} variable declared; he just creates that directory. Probably %{_prefix} is reused in the %files section then.

JavaScript

here the file %{SOURCE0} is installed (copied) to the %{buildroot}%{_prefix} directory. So in the %files section I would expect a line like this:

JavaScript

meaning that the ROOT.war file is to be packaged in that rpm.

EDIT the %__install -D command just expands to /usr/bin/install -D (see defined macros)

the -D option is explained in the install man page:

-D
create all leading components of DEST except the last, then copy SOURCE to DEST

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement