[arch-general] Howto properly set LD_LIBRARY_PATH to /opt/trinity/lib from PKGBUILD (postbuild)
Guys, 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? Thanks. -- David C. Rankin, J.D., P.E.
On 02/07/2011 07:10 PM, David C. Rankin wrote:
Guys,
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?
Thanks.
Well David lets see this might be a good start: tux:~ $ ls /etc/ld.so.conf.d/ fakeroot.conf lib32-glibc.conf *qt3.conf* *xulrunner.conf* tux:~ $ cat /etc/ld.so.conf.d/qt3.conf /opt/qt/lib tux:~ $ pacman -Qo /etc/ld.so.conf.d/qt3.conf /etc/ld.so.conf.d/qt3.conf is owned by qt3 3.3.8-18 http://projects.archlinux.org/svntogit/packages.git/tree/qt3/trunk/PKGBUILD Look at lines 116 & 117 http://projects.archlinux.org/svntogit/packages.git/tree/xulrunner/trunk/PKG... Look at lines 67 & 68 A little bit of self help could go a long way... pyther
On Mon, Feb 7, 2011 at 6:10 PM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Guys,
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. C Anthony
On 02/07/2011 06:21 PM, C Anthony Risinger wrote:
On Mon, Feb 7, 2011 at 6:10 PM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Guys,
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.
C Anthony
Thank you Matthew and C Anthony, That's what I needed. I just want some reference that I can use and feel reasonably confident that it is a proper approach and not a hack I'm using that will bite me later. I'll look at qt3 and xulrunner. -- David C. Rankin, J.D., P.E.
participants (3)
-
C Anthony Risinger
-
David C. Rankin
-
Matthew Gyurgyik