Kaixo!

On Thu, Apr 06, 2000 at 10:52:50PM -0500, Lord And Master;) wrote:
> the contrib rpms work well except they need to add the lib dir to the
> ld.so.conf so that they are found in the lib path:)

What about putting this in the *.spec file:


%define qt2_libdir  /the/directory/you/need

[....]

%files
%dir %{qt2_libdir}
%{qt2_libdir}/lib*.so.*
.....


%pre
if ! grep %{qt2_libdir} /etc/ld.so.conf
then
    echo %{qt2_libdir} >> /etc/ld.so.conf
fi

%post -p /sbin/ldconfig

%postun
if [ ! -d %{qt2_libdir} ]
then
    cp /etc/ld.so.conf /etc/ld.so.conf.tmp && \
    cat /etc/ld.so.conf.tmp | grep -v "^%{qt2_libdir}$" > /etc/ld.so.conf && \
    rm /etc/ld.so.conf
fi
/sbin/ldconfig


-- 
Ki �a vos v�ye b�n,
Pablo Saratxaga

http://www.ping.be/~pin19314/           PGP Key available, key ID: 0x8F0E4975

Reply via email to