You are not logged in.

#1 2009-11-22 23:51:40

keither
Member
Registered: 2009-07-31
Posts: 57

start program without navigating to directory

This is probably a stupid question, but I've compiled a piece of software I need from source using the traditional (./configure, make, sudo make install) method and I have to navigate to the directory where it was installed (usr/local/bin) in order to start the program from the terminal. How do I compile the program so that I can just open up my terminal and type the command to start the program?

Offline

#2 2009-11-23 00:05:17

spiky25
Member
Registered: 2009-09-29
Posts: 134

Re: start program without navigating to directory

make a sh script then type his name in your terminal it will be enough ...


English isn't my native langage

Offline

#3 2009-11-23 00:08:52

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

Re: start program without navigating to directory

It's considered bad practice in Arch to install stuff into /usr/local and to install stuff without using PKGBUILDs.  If you must install stuff to /usr/local/bin, you need to add it to your $PATH.

Last edited by tdy (2009-11-23 00:28:16)

Offline

#4 2009-11-23 00:17:03

doorknob60
Member
Registered: 2008-09-29
Posts: 403

Re: start program without navigating to directory

Or, usually when compiling you can use ./configure --prefix=/usr and it will install it into /usr instead of /usr/local. Also check to see if what you're using is in AUR, as that is usually the cleanest and simplest way to install unsupported software.

Offline

#5 2009-11-23 00:18:07

keither
Member
Registered: 2009-07-31
Posts: 57

Re: start program without navigating to directory

I am new to Arch, and I don't quite understand PKGBUILDs yet. If I install something from the AUR, I use makepkg, but I really don't know how to do that when the PKGBUILD does not already exist. Is this something I have to write before I install? The ABS wiki does not really clarify this for me, since it seems to make the assumption that I want to install something from the ABS tree where there is already a PKGBUILD.

Thanks!

Offline

#6 2009-11-23 00:22:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: start program without navigating to directory

Update your bash_profile or whatever:
alias abc="/path/to/file -x -y -z"

Offline

#7 2009-11-23 01:20:56

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: start program without navigating to directory

keither wrote:

I am new to Arch, and I don't quite understand PKGBUILDs yet. If I install something from the AUR, I use makepkg, but I really don't know how to do that when the PKGBUILD does not already exist. Is this something I have to write before I install? The ABS wiki does not really clarify this for me, since it seems to make the assumption that I want to install something from the ABS tree where there is already a PKGBUILD.

Thanks!

Yes you have to modify a preexisting PKGBUILD to fit whatever your new program is, but it's not very hard to do. There's also files in /usr/share/pacman that can be used as a starting point, with the basics (./configure -> make -> make install) being in PKGBUILD.proto

Offline

#8 2009-11-23 02:13:00

keither
Member
Registered: 2009-07-31
Posts: 57

Re: start program without navigating to directory

This is actually a good opportunity for me to introduce myself to PKGBUILDs, so I will do just that. Thanks!

Offline

#9 2009-11-23 06:14:01

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: start program without navigating to directory

keither wrote:

This is actually a good opportunity for me to introduce myself to PKGBUILDs, so I will do just that. Thanks!

also look into yaourt for installing from AUR. its a wrapper around pacman which can also handle aur. Much easier for new users than makepkg


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB