Hi List,
I'm a newb at writing spec files, please bear with me.
I'm rebuilding a package for RHEL 6, so if this is the wrong list,
please let me know.
I have redefined the prefix stack:
%global _prefix /opt/%{name}/%{version}
%global _exec_prefix %{_prefix}
%global _bindir %{_exec_prefix}/bin
%global _sbindir %{_exec_prefix}/sbin
%global _libexecdir %{_exec_prefix}/libexec
%global _sysconfdir /etc
%global _sharedstatedir /var/lib
%global _localstatedir /var
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _datarootdir %{_prefix}/share
%global _datadir %{_datarootdir}
%global _infodir %{_datarootdir}/info
%global _localedir %{_datarootdir}/locale
%global _mandir %{_datarootdir}/man
%global _docdir %{_datarootdir}/doc
%global _htmldir %{_docdir}
%global _dvidir %{_docdir}
%global _pdfdir %{_docdir}
%global _psdir %{_docdir}
%global _defaultdocdir %{_docdir}
In configure:
../configure \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--docdir=%{_docdir} \
...
In make install:
make DESTDIR=%{buildroot} \
prefix=%{_prefix} \
mandir=%{_mandir} \
infodir=%{_infodir} \
docdir=%{_docdir} \
install
The package completes without errors, resulting in RPMs, but In the
output I see multiple instances of:
+ DOCDIR=~/rpmbuild/BUILDROOT/<rpm top buildroot
dir>/usr/share/doc/%{name}-%{version}
+ export DOCDIR
and when installing the RPMs they install docs to /usr/share/doc.
when building and installing manually all is well (share/doc under /opt/...)
What am I doing wrong?
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging