*BSD News Article 46654


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!gatech!howland.reston.ans.net!vixen.cso.uiuc.edu!news.uoregon.edu!news.u.washington.edu!mac-pal.apl.washington.edu!user
From: kargl@apl.washington.edu (steve)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: correct use of ports ?
Date: Mon, 10 Jul 1995 17:55:09 -0800
Organization: University of Washington
Lines: 49
Message-ID: <kargl-1007951755090001@mac-pal.apl.washington.edu>
References: <3tsc4r$5g5@stang.netspace.net.au>
NNTP-Posting-Host: mac-pal.apl.washington.edu

In article <3tsc4r$5g5@stang.netspace.net.au>, ahill@stang.netspace.net.au
(Anthony Hill) wrote:

> Howdy,
> 
> Whilst the ports are a great idea, simple to use, and just plain cool - I 
> have a few things I'd like to clear up.
> 
> 1st, what do you do with a port after you have compiled it - 
> /usr/ports/whatever/work/whatever/bin  seems to be a pretty strange place 
> to keep binaries, and I am never quite sure which files I should move 
> from the ports tree into more "normal" working space, eg. usr/bin, which 
> ones I should keep where they are and which files I should delete
> Is this part of the installation in some way automated - is there usually 
> a file with the ports which suggests what should be put where ?

%cd /path/to/port_dir
%make install

This will ***install*** the needed binaries and any configuration files
in the ***right*** place.    The right place is usually /usr/local and its
subdirectories.  You can get fancy with the DESTDIR variable which should
specify the root of a directory hierarchy similar to /usr/local.

After you install the port, you can delete the source files; ie

%rm -rf /path/to/port_dir

> 
> 2nd, what does "make clean" do ? Does it just kill the sources and 
> intermidiate compilation files, the whole tree - what ? Sometimes instead 

Yes, make clean removes almost all unecessary files after a make install or a
botched build attempt.

> of moving binaries from the ports tree - i just make symbolic links in 
> /usr/bin to point to the relavent binaries in the port tree - what will 
> make clean do to these links ?
> 

NO, I recommend against installing anything in your /usr/bin directory. 
This directory is usually  reserved for binaries installed at the time of
installation
of FreeBSD.   I strongly urge you to create a /usr/local hierarchy where
any ***locally**
(built and) installed software goes (except for X11R6). At a minimum,
you'll need /usr/local/[bin,lib,etc,man/[man1]].  The above "make install"
will, I believe,
create these if they don't already exist.