On 01/08/2013 06:11 AM, Mike Goins wrote:
> On Mon, Jan 7, 2013 at 9:41 PM, Lv Terry-R65388 <[email protected]> wrote:
>> Hi experts,
>>
>>         For some reason, we have to add kernel version to source name in 
>> ltib spec.
>>
>>         For example:
>>
>> %define pfx /opt/freescale/rootfs/%{_target_cpu}
>>
>> Summary         : Interfaces for accessibility support
>> Name            : elftosb
>> Version         : 3.0.35
>> Release         : 13.01.00
>> License         : Free BSD
>> Vendor          : Freescale
>> Packager        : Frank Li
>> Group           : System Environment/Libraries
>> Source          : %{name}-%{version}-%{release}.tar.gz
>> BuildRoot       : %{_tmppath}/%{name}
>> Prefix          : %{pfx}
>> Autoreq         : no
>> Autoreqprov     : no
>> Autoprov        : no
>> %Description
>> %{summary}
>>
>> %Prep
>> %setup
>> ... ...
>>
>>         At first, I tried to add the 3.0.35 and 13.01.00 to Version, that is 
>> "Version:     3.0.35-13.01.00" and found that "-" is not allowed in Version 
>> name.
>>         Then I tried to add 13.01.00 to Release, and found that %setup will 
>> not use %Release for package's directory name.
>>
>>         What I want is to add 3.0.35 and 13.01.00 to %Source's package name 
>> and %setup can find the package directory and start building.
>>
>>         Any suggestion for this case?
>
> The only solution I know of is to specify a directory as an argument to setup:
> %setup -n elftosb-3.0.35-13.01.00

Yes, you can use an literal arg to %setup, but if possible use the RPM
variables to make it cleaner if you change versions:

%setup -n %{name}-%{version}-%{release}

-- 
Peter Barada
[email protected]


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

Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib

Reply via email to