You are not logged in.

#1 2016-05-19 12:55:43

bagol
Member
Registered: 2015-01-29
Posts: 28

Configuring PATH and LD_LIBRARY_PATH in makepkg environment

What is the correct way to configure those variables in makepkg environment?

Say, I have package function like this

package() {

    make DESTDIR="$pkgdir" install

    # i need to use the package right here
    # so id did this:
    PATH="${pkgdir}/usr/bin:$PATH" \
    LD_LIBRARY_PATH="${pkgdir}/usr/lib" \
        my-executable --option # bla bla bla
   
}

I don't feel right with that. What is the correct way to do that? I mean, expanding PATH and LD path?

Offline

#2 2016-05-19 13:06:58

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,868
Website

Re: Configuring PATH and LD_LIBRARY_PATH in makepkg environment

Why do you need to call a binary from the package during the packaging phase?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-05-19 13:20:44

bagol
Member
Registered: 2015-01-29
Posts: 28

Re: Configuring PATH and LD_LIBRARY_PATH in makepkg environment

I'm doing LFS and using pacman as package manager. I translate installation step on BLFS to PKGBUILD. Some of installation steps need to execute the installed binary.
Look at cracklib installation.

There's a line said:

create-cracklib-dict     /usr/share/dict/cracklib-words \
                         /usr/share/dict/cracklib-extra-words

Which need to resolve PATH and LD path. Or, maybe I'm doing wrong?

Offline

#4 2016-05-19 15:05:12

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Configuring PATH and LD_LIBRARY_PATH in makepkg environment

Umm, the README instructs you to run the command `make dict`, why are you following the directions of a downstream distributor rather than the official project documentation?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB