[arch-general] Howto properly set LD_LIBRARY_PATH to /opt/trinity/lib from PKGBUILD (postbuild)
C Anthony Risinger
anthony at extof.me
Mon Feb 7 19:21:00 EST 2011
On Mon, Feb 7, 2011 at 6:10 PM, David C. Rankin
<drankinatty at suddenlinkmail.com> wrote:
> After building trinity-kdelibs, I need to create an entry and set
> LD_LIBRARY_PATH to /opt/trinity/lib. I manually created:
> '/etc/ld.so.conf.d/trinity.conf' containing "/opt/trinity/lib" and then ran
> ldconfig. That worked.
> What I need to know is how to properly do this from the kdelibs
> PKBUILD. I can do it by creating the file in $pkgdir, but is there a
> standard way to do it? Also, what about calling ldconfig after install? Is
> there a standard (post-install) snippet to add?
i don't see anything wrong with the package doing both, but i can't
comment on an "official" method.
sometimes it's appropriate (when the binaries are 1 or very few) to
make a wrapper that adds the path before invocation.
the other option (i think firefox does something like this) is to add
the path and re-export from an /etc/profile.d/ script, which would run
once at login. if you look in that directory you will see similar
mods to the environment by packages.
More information about the arch-general