[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: %files section of SPEC file



On Mon, Jul 23, 2007 at 10:31:06AM -0700, Joshua M. Miller wrote:
> If I understand what you're saying correctly, does this mean I can build 
> an RPM and specify the files in the %files section relative to their 
> final destination, without actually having them in the final destination 
> on the build host, but keeping them in the buildroot?

Yes. That's exactly what buildroot is for. Put this line or something
similar in your spec file:

 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

(Eventually, this will be standardized properly as predefined and you won't
have to include this line, but for now, it's important to have.)

and then install your package's files underneath %{buildroot}. If you're
lucky, "make install DESTDIR=%{buildroot}" will work for the program
you're packaging. If that doesn't work, try "%makeinstall".


-- 
Matthew Miller           mattdm mattdm org          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]