<font style="font-family:courier new,monospace" face="courier new,monospace"></font><br style="font-family:courier new,monospace"><div style="font-family:courier new,monospace" class="gmail_quote">On Thu, Jun 28, 2012 at 5:20 PM, Greg Swift <span dir="ltr"><<a href="mailto:gregswift@gmail.com" target="_blank">gregswift@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Jun 28, 2012 at 4:20 PM, Fulko Hew <<a href="mailto:fulko.hew@gmail.com">fulko.hew@gmail.com</a>> wrote:<br>


> This is basically my first attempt at RPM-ifying my apps<br>
> (for internal coprporate distribution)...<br>
<br>
</div>great :)<br>
<div class="im"><br>
> I'm probably doing this all wrong, but what I want to do is<br>
> create a spec file that allows me to build an RPM based on<br>
> the files in 'this' directory.<br></div></blockquote><div> </div><div>... snip ...<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im">
> but the first thing that rpmbuild does is cd into the build directory.<br>
><br>
> It seems that RPM building is always expecting to<br>
> build from a tarball from an RPM SOURCE directory.<br>
<br>
</div>ya, thats pretty much what it wants to do, and is considered a best practice.<br>
<div class="im"><br>
> Is there anyway I can do this 'more simply'?<br>
> or... what am I not groking about the whole process?<br>
<br>
</div>So The RPM process is basically:<br>
<br>
1: Take Source Tarball<br>
2: Take SPEC file<br>
3: Build software and wrap it into a package<br>
<br>
For a lot of people that work directly off their own source that first<br>
step can be very annoying, as you are complaining about.  What that<br>
step gives you though is source RPMs (SRPM).  If you find a way to<br>
build a package where your source is a directory (its possible, but<br>
i'd rather not go into it because its horribly ugly... i'll give you<br>
an alternative in a second) then your SRPMs are effectively useless<br>
because it doesn't actually grab the source.<br>
<br>
There are a few ways that people approach step 1.<br>
<br>
1: A custom script that tars up the current directory and then runs the rpmbuild<br>
2: A Makefile that does the same thing as the last step<br>
3: Other programs like tito (<a href="http://rm-rf.ca/tito" target="_blank">http://rm-rf.ca/tito</a>)<br>
<br>
There is also a lot of good information here:<br>
<br>
<a href="http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html" target="_blank">http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html</a><br>
<br>
<br>
Personally, I'm a fan of the Makefile.  I'm attaching a sample<br>
Makefile that would do what you are trying to do.<br></blockquote><div><br>Thanks!<br><br>With your attachments, it makes a _whole_ lot more sense!<br><br>Something that simple should have been included in the<br>original documentation and in 'Maximum RPM' to<br>

'pull it all together'!<br> <br></div></div><span style="font-family:courier new,monospace">BTW.  So far, all of my packageshave been Perl applications,</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">so the need for SRPMs is sort of moot because my RPM effectively</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">_is_ the SRPM, hence my 'want' / need / approach to bypass the</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">whole SPRM/tarball phase.</span><br style="font-family:courier new,monospace">

<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">But now that I understand that missing link... I'll change my evil ways.</span><br style="font-family:courier new,monospace">

<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Fulko</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">