Re: spec file, with multiple architectures

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

 





On 3/17/08, Tim Mooney <mooney@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In regard to: spec file, with multiple architectures, Richard Shade said...:

Tim, Thanks

> I want to use one spec file for multiple architectures. However there is the
> following line in my spec file:
> on i386
> %attr(0644,root,root)
> %{_libdir}/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
> on x86_64
> %attr(0644,root,root)
> %{_libdir}/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod



You don't say what version of RPM you're using, or what distributions you
want to package for, but the easiest way to accomplish what you're asking
is just using globbing:

I am on 4.4.2 CentOS 5. 

%{_libdir}/perl5/5.8.8/*-linux-thread-multi/perllocal.pod

Some versions of RPM include pre-defined macros for some of perl's
directories.  In those cases, %{perl_sitearch} is what you're looking for.

%{_libdir}/perl5/5.8.8/%{perl_sitearch}/perllocal.pod

If your distribution doesn't define it, you can define it yourself,
assuming your version of RPM is new enough to handle this type of macro:

%define perl_archlib   %(eval "`perl -V:installarchlib`"; echo $installarchlib)

However, packaging the perllocal.pod is (I think) a bad idea.  You're
better off just skipping that file

Is this what you mean by skipping it?
%exclude %{_libdir}/perl5/5.8.8/%{_arch}-linux-thread-multi/perllocal.pod

Tim
--
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list



--
Thanks,

Richard Shade
RightScale
http://www.rightscale.com/
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux