On Mon, Mar 02, 2015 at 04:46:47PM -0500, Eric Griffith wrote:
Hey all,
First off, let me just get this out of the way: Not looking to get
this package into the repo's or even into RPMFusion, I'm just playing
around to help myself learn and I had this on hand.
[snip]
I'm assuming that i should be creating the directory structure under
%prep, yes? via "mkdir -p" but wouldn't it then get deleted when
%install happened? and what would even be the correct command
sequence? $RPM_BUILD_ROOT/%{_bindir}/ ? then copy %source0 into said
directory?
%prep is for preparing to build. So things like untarring source files and
applying patches.
%build is for actually building.
%install is for putting things into the %{buildroot} (aka $RPM_BUILD_ROOT).
So in your example, since there is no source (you're just dropping the files
you retrieved into the filesystem), you'd want to do your mkdir -p and cp -p
SOURCEFILE %{buildroot}/DESTINATION_DIR/FILENAME in %install.
-Toshio