curl packaging under different location prefix

neubyr neubyr at
Tue Dec 9 17:08:28 UTC 2014

I am trying to build curl with OpenSSL RPM and install it in /opt location.
I have changed prefix and other macros as follows:

%define _prefix /opt
%define _datadir %{_prefix}/share
%define _datarootdir %{_prefix}/share
%define _mandir %{_datadir}/man
%define _defaultdocdir %{_datadir}/doc
%define _docdir %{_datadir}/doc
%define _infodir %{_datadir}/info

Curl binary and man page gets packaged for installation under /opt tree,
however, other doc pages get packaged using default /usr/share/doc

* Listing files in resulting RPM
# rpm -qlp /usr/src/redhat/RPMS/x86_64/curl-7.19.7-41.el6.x86_64.rpm

* Snippet of 'rpmbuild -ba' output:

+ exit 0
Processing files: curl-7.19.7-41.el6.x86_64
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.igiGgT
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd curl-7.19.7
+ export DOCDIR
+ rm -rf
+ /bin/mkdir -p
+ cp -pr docs/BUGS docs/FAQ docs/FEATURES
+ exit 0

I am wondering why DOCDIR is getting set with usr/share path and how can I
change it to use /opt path. Am I missing anything in the macros definition?
Any pointers in solving this will be helpful.

- thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Rpm-list mailing list