Thank you very much for your reply.

I did explore cpanspec, but it appears to offer less configuration options than cpan2rpm.

 

Nevertheless, you helped me isolate the problem:

rpmbuild --showrc | grep docdir

  RPM_DOC_DIR="%{_docdir}"

-14: _defaultdocdir     %{_usr}/share/doc

 

Once I added %_defaultdocdir to /root/.rpmmacros, everything get distributed perfectly.

cat /root/rpmmacros

%_defaultdocdir /foo/usr

%_prefix /foo/usr

%_infodir %{_prefix}/info

%_mandir %{_prefix}/man

%_docdir %{_prefix}/doc

 

 

Yes this helped,

 

Arthur

 

From: Gino LV. Ledesma [mailto:gledesma@gmail.com]
Sent: Thursday, May 03, 2012 5:29 PM
To: Arthur Reyes
Subject: Re: [Cpan2rpm-general] docdir

 

Hi, Arthur

 

You may want to consider using cpanspec <http://cpanspec.sourceforge.net/> instead. This is what the Fedora/EPEL packagers are using for CPAN packages in RPM form. It also generates a much more legible SPEC file than cpan2rpm.

 

You may also want to look at the actual SPEC file that cpan2rpm generates since I believe it has its own ideas for  setting some variables.

 

rpmbuild --showrc | grep docdir should also show you what "live" settings are.

 

HTH,

Gino

 

On Thu, May 3, 2012 at 2:19 PM, Arthur Reyes <areyes1@nyx.com> wrote:

Hi, this is my first post to this list. I hope it is still active.

I'm having trouble identifying how to define certain variables.

I've got .rpmmacros configured to put docs in /foo/docs
cat .rpmmacros
%_prefix /foo
%_infodir %{_prefix}/info
%_mandir %{_prefix}/man
%_docdir %{_prefix}/doc

However, when I compile Net::Netmask, rpmbuild seems to keep placing some files /usr/share/doc
The output of rpm -ql shows the following:
/usr/share/doc/perl-Net-Netmask-1.9016
/usr/share/doc/perl-Net-Netmask-1.9016/README

This is my command line arguments
cpan2rpm Net::Netmask  --make-maker='PREFIX=/foo' --fetch=cpan --url http://mydepot/CPAN --release=1001 --no-sign

When I look at my temp file, I see that mandir and infodir use /usr/share instead of /foo/info or /foo/man
grep /usr/share /var/tmp/rpm-tmp.57620
 RPM_DOC_DIR="/usr/share/doc"
       mandir=/var/tmp/perl-Net-Netmask-1.9016-root/usr/share/man \
       infodir=/var/tmp/perl-Net-Netmask-1.9016-root/usr/share/info \

My kernel: 2.6.18-194.el5
This is perl, v5.8.8 built for x86_64-linux-thread-multi

Am I missing a command line parameter, that makes cpan2rpm put README in /usr/share?

Thanks!

Arthur Reyes
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system.  Thank you.  NYSE Euronext.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Cpan2rpm-general mailing list
Cpan2rpm-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cpan2rpm-general

 


Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.