ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] _rpmfilename


From: Stuart Hughes
Subject: Re: [Ltib] _rpmfilename
Date: Thu, 08 Oct 2009 09:39:36 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Aaron,

What you suggest is possible, but is a corner case that I don't think it's worth the potential fall-out to implement.

So many other programs (aside from LTIB) assume that the binary rpm is %{name}-%{version}-%{release}._arch_.rpm that I think it may cause more problems than it solves if you diverge from this convention.

I think your best bet is just to live with the fact that the pristine tarball has a slightly odd naming convention and work on the bases of the patches/binary rpm you product produce a more conventional (predictable) result.

Maybe it's worth asking the maintainer of SeaMAC to change his tarball?

Regards, Stuart

address@hidden wrote:
I have a package I'm integrating into my LTIB tree, and the tarfile uses a
style of naming that is not conventional.  This is probably not so
important, but I was wondering if it would be possible to add support for
something like the _rpmfilename macro in the ltib script when it comes
time to check for a pre-built rpm and for the creation of patch files.

The tarfile I'm working with is:

SeaMAC_0.98.1.tar.gz

It expands to a directory tree whose base is:

seamac/

I figured out that I needed to add

%Prep
%setup -n seamac

to my .spec file to have the build directory recognized.  Beyond that, I
wanted to see if I could change the name of the output binary package file
name from the default

SeaMAC-0.98.1-1.ppc.rpm

to

SeaMAC_0.98.1-1.ppc.rpm

(with the underscore), just to match the format of the .tar.gz file name. Using either the _rpmfilename or the _build_name_fmt macro in the %Files
section of my .spec file, I was able to accomplish this.

%Files
%define _rpmfilename %{ARCH}/%{NAME}_%{VERSION}-%{RELEASE}.%{ARCH}.rpm

I ran into a separate problem then however, since the ltib script was
searching for the .rpm file with the dash and not the underscore, and so
this package was being rebuilt every time I ran ltib, because it wasn't
finding the .rpm file created in the previous run.  I noticed that there
could potentially be support for this if the ltib script searched for the
_rpmfilename macro in the .spec file.  Also, it might be nice if the patch
files that are created could check for this as well, and instead of

SeaMAC-0.98.1-1254860786.patch

be

SeaMAC_0.98.1-1254860786.patch

depending on if _rpmfilename or _build_name_fmt or some other similar type
macro were defined in the .spec file.  I don't know if added flexibility
would be useful here, or if it's just bad naming conventions to begin
with.



_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib





reply via email to

[Prev in Thread] Current Thread [Next in Thread]