You are not logged in.

#1 2013-01-21 17:29:11

shaumux
Member
Registered: 2013-01-21
Posts: 13

Modify Path from PKGBUILD

Hi,
What is the correct way or the recommended way to add a directory to the path from a PKGBUILD?
Thanks

Offline

#2 2013-01-21 17:37:42

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: Modify Path from PKGBUILD

I think generally you shouldn't but you should instead print a message via the .install file telling the user what to add to his/her PATH.

Offline

#3 2013-01-21 17:40:35

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Modify Path from PKGBUILD

The question is pretty vague, but if you're asking how to add a dir to $PATH after the package is installed, install a profile to /etc/profile.d/ containing something like this:

export PATH="$PATH":/opt/smth/bin

Otherwise, you need to provide actual details about what you want.

Last edited by tdy (2013-01-21 17:44:18)

Offline

#4 2013-01-21 17:56:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: Modify Path from PKGBUILD

This sounds like an "X-Y"[1] problem.

I'm guessing you have something that needs to be installed somewhere not in a "normal" $PATH like /opt/ or /usr/local/, right?  If so, you can put a link in /usr/bin to the executable.  Alternately you could create a short script that launches the executable and place the script in /usr/bin.

[1]: http://mywiki.wooledge.org/XyProblem

Last edited by Trilby (2013-01-21 17:57:48)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2013-01-21 18:39:02

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Modify Path from PKGBUILD

Trilby wrote:

I'm guessing you have something that needs to be installed somewhere not in a "normal" $PATH like /opt/ or /usr/local/, right?  If so, you can put a link in /usr/bin to the executable.  Alternately you could create a short script that launches the executable and place the script in /usr/bin.

Yes that's right and the package is vmware workstation.
the solution you suggested was actually what i thought and i looked up other binary packages and that's how it was done but the problem here is there's a bunch of binaries for vmware and it would be just easier to add vmware's bin directory than to symlink each binary and hence what i asked.

tdy wrote:

The question is pretty vague, but if you're asking how to add a dir to $PATH after the package is installed, install a profile to /etc/profile.d/ containing something like this:

export PATH="$PATH":/opt/smth/bin

Otherwise, you need to provide actual details about what you want.

This seems to be what i want i'll try this.

Thanks

Offline

Board footer

Powered by FluxBB