how to build a package from 'this' directory ?

Fulko Hew fulko.hew at gmail.com
Fri Jun 29 14:07:27 UTC 2012


On Thu, Jun 28, 2012 at 5:20 PM, Greg Swift <gregswift at gmail.com> wrote:

> On Thu, Jun 28, 2012 at 4:20 PM, Fulko Hew <fulko.hew at gmail.com> wrote:
> > This is basically my first attempt at RPM-ifying my apps
> > (for internal coprporate distribution)...
>
> great :)
>
> > I'm probably doing this all wrong, but what I want to do is
> > create a spec file that allows me to build an RPM based on
> > the files in 'this' directory.
>

... snip ...


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

Thanks!

With your attachments, it makes a _whole_ lot more sense!

Something that simple should have been included in the
original documentation and in 'Maximum RPM' to
'pull it all together'!

BTW.  So far, all of my packageshave been Perl applications,
so the need for SRPMs is sort of moot because my RPM effectively
_is_ the SRPM, hence my 'want' / need / approach to bypass the
whole SPRM/tarball phase.

But now that I understand that missing link... I'll change my evil ways.

Fulko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20120629/598999b8/attachment.html>


More information about the Rpm-list mailing list