On 09-12-2014 15:08, neubyr wrote:
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 location. * Listing files in resulting RPM # rpm -qlp /usr/src/redhat/RPMS/x86_64/curl-7.19.7-41.el6.x86_64.rpm /opt/bin/curl /opt/share/man/man1/curl.1 /usr/share/doc/curl-7.19.7 /usr/share/doc/curl-7.19.7/BUGS /usr/share/doc/curl-7.19.7/FAQ /usr/share/doc/curl-7.19.7/FEATURES * 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 + DOCDIR=/usr/src/redhat/BUILDROOT/curl-7.19.7-41.el6.x86_64/usr/share/doc/curl-7.19.7 + export DOCDIR + rm -rf /usr/src/redhat/BUILDROOT/curl-7.19.7-41.el6.x86_64/usr/share/doc/curl-7.19.7 + /bin/mkdir -p /usr/src/redhat/BUILDROOT/curl-7.19.7-41.el6.x86_64/usr/share/doc/curl-7.19.7 + cp -pr docs/BUGS docs/FAQ docs/FEATURES /usr/src/redhat/BUILDROOT/curl-7.19.7-41.el6.x86_64/usr/share/doc/curl-7.19.7 + 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.
I'm not 100% sure, but this might be because you are using '%doc' in the '%files' section of the spec file.
Try creating '%_docdir' manually and putting the files there ( with 'cp' or 'install' ) instead of using '%doc' and see if it works.
[ ]'s _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list