user797963
user797963

Reputation: 3027

rpm - how to tell rpm where to install files to when creating package?

How can I tell rpm to install files to a specific directory when creating an rpm package? I've been googling around for this, and read a few IBM Developer Works articles, but I can't find info on how to specify in your spec file where the rpm files should be installed to. This is really confusing, because I'm using the %{buildroot} var as a proxy for the actual install location during the build, but my rpm isn't seeing buildroot as the proxy... it's packing up the files using %{buildroot} as the root directory. In other words, when I view the files in my rpm with 'rpm -qlp', I see /lib/, /share/, /bin/, etc as the file locations, not /my/correct/path/lib or /my/correct/path/bin/*.

Upvotes: 1

Views: 341

Answers (1)

Thomas Dickey
Thomas Dickey

Reputation: 54583

In the question

it's packing up the files using %{buildroot} as the root directory.

that would happen if your %files section contains pathnames using %{buildroot}. It should only use the "actual install location".

Upvotes: 1

Related Questions