Kamal Ahmed wrote: > Name: foo ... BuildRoot: /tmp/%{name} %prep ... %build ... %install install > -m755 $RPM_BUILD_ROOT/obj/ggsnc/ggsnc %{_bindir}/ %files /usr/bin/ggsnc I think I see the misunderstanding. Perhaps it will help you if I point out that "buildroot" is a very badly chosen word. It should have been called "installroot". The buildroot is not where the build takes place, it's a staging directory that you install into. That "chroot" or "root simulated environment" you're asking for, that's what the buildroot is. In other words, you shouldn't try to copy files *from* the buildroot, you should copy them *to* the buildroot. Use these spec file fragments: # Define a temporary installation root. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %install # Make an empty installation root. rm -rf %{buildroot} mkdir -p %{buildroot} # Make directories in the installation root. mkdir -p %{buildroot}%{_bindir} # Copy files to the installation root. cp obj/ggsnc/ggsnc %{buildroot}%{_bindir} %files %{_bindir}/ggsnc Be sure to note carefully where I have used "%{buildroot}" in the code above, and where I have not used it. (It doesn't matter much whether you use "%{buildroot}" (an RPM macro) or "$RPM_BUILD_ROOT" (a shell variable). I prefer the RPM macro because I think it makes the spec file more readable.) By the way, please don't reply to another message unless the message you're writing is actually a reply to that message. This thread is shown as replies to a question from Mihamina Rakotomandimby that it actually has nothing to do with. Björn Persson
Attachment:
signature.asc
Description: This is a digitally signed message part.
-- packaging mailing list packaging@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/packaging