<div class="gmail_quote">On Tue, May 17, 2011 at 10:46 PM, Fred Moyer <span dir="ltr"><<a href="mailto:fred@redhotpenguin.com">fred@redhotpenguin.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Mon, May 16, 2011 at 8:04 PM, Joseph Brenner <<a href="mailto:doom@kzsu.stanford.edu">doom@kzsu.stanford.edu</a>> wrote:<br>
> Sounds like a worthy experiment.  As far as names go, the way these<br>
> things are done in the ubuntu/debian world is a version number is<br>
> tacked on to the name.  So you might name the binary perl5.14 and call<br>
> the package perl5.14-5_14_0-0-i386.rpm.<br>
<br>
</div>Thanks for the good feedback, I've renamed the rpms to contain the<br>
version, ala perl_5_14_0 which results in<br>
perl_5_14_0-5.14.0-1.i386.rpm<br>
<br clear="all"></blockquote></div><br>A couple thoughts from a cursory once-over:<br><br>You can use the canonical source package and location, and cause tell rpm what directory to change into by:<br><br>%prep<br>%setup -q -n perl-%{version}<br>

<br>You're going to want to strip or rename the metadata given in the Provides lines (e.g. the perl(Foo)), as that will conflict with the metadatasystem provided by the system Perl package.<br><br>Automatic Perl metadata generation should be disabled, for the same reason (conflicts with the system Perl package).  Generally speaking, this does the trick without impacting other metadata generation:<br>

<br>%global __perl_requires %{nil}<br>%global __perl_provides %{nil}<br><br>Similarly, you're going to want to remove the "Obsoletes" lines.<br><br>%global vs %define: %define was the standard approach for years, but eschewing %define for %global has become the norm in the Fedora/RHEL world at this point.  (AFAICT the difference is in lazy evaluation -- %global is evaluated and set as it's read, %defined as used.)<br>

<br>I generally set %_prefix to /usr/perl-%{version} instead of /opt/... as I'm given to understand that /opt is reserved for packages completely independent from the system itself (e.g. self-satisfying to just about all dependencies) and the non-system Perl packages I build still leverage parts of the installed system (e.g. shared libraries) and express RPM dependency information.  I suspect this might get a touch religious, however. :)<br>

<br>I'm going on the assumption here that you don't want to replace the system Perl package.  If this is the case, then you're going to want to steer clear of the existing RPM/Perl metadata system (autogeneration of deps of the form perl(Foo)), or you'll run into no end of trouble.  If you're building RPMs to deliver CPAN package as well, you're going to need a way to declare dependencies to RPM that satisfies their needs and doesn't conflict with the system Perl dependency system.<br>

<br>Whew!  Now I'm feeling an itch to get back into reviewing Fedora packages :-D<br><br>                           -Chris<br><br>-- <br>Chris Weyl<br>Ex astris scientia<br>