Subject: Re: Compiling Outside Source Code
To: Randy Beaudreault <maccult@pacbell.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 07/24/2001 09:51:56
On Tue, 24 Jul 2001, Randy Beaudreault wrote:
> How do I compile source code that isn't part of the NetBSD package
> system? I want to get icepref up and running to modify icewm but
> since I don't have a clue as to building source code not in the
> package system I need help. Thanks for any help here.
Here are some ideas:
mkdir a directory to do your work in, like /usr/local/src or
/home/randy/src.
Grab the source tar ball.
Use "tar tvzf" (if it is gzipped) to make sure it unpacks to its own
directory. If not, then make a new directory for it.
Untar it and go into the new directory.
Look for a README. And read it.
Look for an INSTALL file and read it.
The instructions may indicate that you need to first install other
libraries or software. (Do so.)
If it uses a configure script, then run it: "./configure" (with any
options you desire as indicated with "./configure --help")
Run "make" to use the Makefile.
Test the software (if possible without installing).
If you trust it, then do a "make install" as root. (You may want to edit
the Makefile to select where it will be installed -- maybe install it to
/usr/local/ ...)
You don't need to be root to build and (usually) test the software. Also,
you can choose to install the software under you own home
directory. Superuser privileges may not even be needed in most
situations.
To summarize:
tar xvzf filename.tar.gz
cd filename-or-name-of-new-directory
./configure
make
su root -c "make install"
Hope this helps,
Jeremy C. Reed
http://www.reedmedia.net/