[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

A small useful macro



Hello,
here is small macro I use:
%__update_ld_so_conf	\
if [ "%{_prefix}/%{_lib}" != /usr/lib ]; then if ! %{__grep} -q '^%{_prefix}/%{_lib}$' /etc/ld.so.conf; then echo %{_prefix}/%{_lib} >> /etc/ld.so.conf; fi; fi; /sbin/ldconfig	\
%{nil}

For ( almost ) every package that installs shlibs,
it's a good idea to check if the %{_prefix}/%{_lib} is in /etc/ld.so.conf and update if needed.
This macro does just this.
The neat thing is, macro *expansion* is stored
in the binary package, so you do not have to carry
~/.rpmmacros, etc. on the host that installs the package.

Sergey Ostrovsky.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []