somewhere, glance through the instructions, make any changes that seem necessary, run the configure script to set things up and use the standard `make' program to compile and install the program from the source.
FreeBSD ports still use the tarball mechanism, but use a skeleton to hold the "knowledge" of how to get the program working on FreeBSD, rather than expecting the user to be able to work it out. They also supply their own customised Makefile, so that almost every port can be built in the same way.
If you look at a port skeleton (either on your FreeBSD system or the FTP site) and expect to find all sorts of pointy-headed rocket science lurking there, you may be disappointed by the one or two rather unexciting-looking files and directories you find there. (We will discuss in a minute how to go about Getting a port).
``How on earth can this do anything?'' I hear you cry. ``There is no source code there!''
Fear not, gentle reader, all will become clear (hopefully). Let's see what happens if we try and install a port. I have chosen `ElectricFence', a useful tool for developers, as the skeleton is more straightforward than most.
Note if you are trying this at home, you will need to be root.
# cd /usr/ports/devel/ElectricFence # make install >> Checksum OK for ElectricFence-2.0.5.tar.gz. ===> Extracting for ElectricFence-2.0.5 ===> Patching for ElectricFence-2.0.5 ===> Applying FreeBSD patches for ElectricFence-2.0.5 ===> Configuring for ElectricFence-2.0.5 ===> Building for ElectricFence-2.0.5 [lots of compiler output...] ===> Installing for ElectricFence-2.0.5 ===> Warning: your umask is "0002". If this is not desired, set it to an appropriate value and install this port again by ``make reinstall''. install -c -o bin -g bin -m 444 /usr/ports/devel/ElectricFence/work/ElectricFence-2.0.5/libefence.a /usr/local/lib install -c -o bin -g bin -m 444 /usr/ports/devel/ElectricFence/work/ElectricFence-2.0.5/libefence.3 /usr/local/man/man3 ===> Compressing manual pages for ElectricFence-2.0.5 ===> Registering installation for ElectricFence-2.0.5
To avoid confusing the issue, I have completely removed the build output.
If you tried this yourself, you may well have got something like this at the start:-
# make install >> ElectricFence-2.0.5.tar.gz doesn't seem to exist on this system. >> Attempting to fetch from ftp://ftp.doc.ic.ac.uk/Mirrors/sunsite.unc.edu/pub/Linux/devel/lang/c/.
The `make' program has noticed that you did not have a local copy of the source code and tried to FTP it down so it could get the job done. I already had the source handy in my example, so it did not need to fetch it.
Let's go through this and see what the `make' program was doing.
Scroll up to the make output and see if you can match these steps to it. And if you were not impressed before, you should be by now!