title: rpmbuild simple copy of files
body: <p>Looking for someone to just clarify the <code>%install</code> macro when it comes to just placing files. I created a RPM without errors that is supposed to just take files from the buildroot and cp them to /usr/lib. What I have in the SPEC file for the %install is the following, and based on <a href="https://stackoverflow.com/questions/16079464/how-to-control-the-rpmbuild-buildroot-and-install-directory">this post</a>. I though that would be enough for the rpm to copy the files from the buildroot to the /usr/lib location.</p>
  
  <p>This is what I tried and it builds:</p>
  
  <pre><code>%install
  mkdir -p %{buildroot}/usr/lib
  install -d %{buildroot}/usr/lib/
  </code></pre>
  
  <p>Rethinking, I figure, well lets tell the rpm where I want to copy the files. SO I tried this:</p>
  
  <pre><code>%install
  mkdir -p %{buildroot}/usr/lib
  cp %{buildroot}/usr/lib/ /usr/lib/
  </code></pre>
  
  <p>well that complains about the /usr/lib/ location not being writable by the user I am creating the rpm as on the build machine. Which my impression is that <code>%install</code> section of the spec file should be instructions on where the files should be copied to when the rpm is installed on the destination server. I don't want it looking at the local files system for the rpm build server. My though behind this is, the RPM should build, but it shouldn't fail until the rpm install if I try to install the rpm as a non-privileged user. It shouldn't care during the build. I'm merely trying to cp/extract some lib files to the /usr/lib on the server I install the rpm on. </p>
  
  <p>My assumption is, the rpm would create the BUILDROOT location on the server I'm installing the rpm on, then cp the contents from the buildroot location to the mentioned destination location.</p>