From 9db4d542466c6f339d6444b647fbbcd9f52878eb Mon Sep 17 00:00:00 2001 From: John Fieber Date: Wed, 26 Jun 1996 03:28:51 +0000 Subject: [PATCH] Add some formatting bug work-arounds. --- share/doc/handbook/ports.sgml | 254 +++++++++++++++++----------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/share/doc/handbook/ports.sgml b/share/doc/handbook/ports.sgml index e435fab7c54b..a87cd47bd3bd 100644 --- a/share/doc/handbook/ports.sgml +++ b/share/doc/handbook/ports.sgml @@ -1,4 +1,4 @@ - + The Ports collection @@ -78,7 +78,7 @@ as they could be), with perhaps a configuration script. The standard scenario is that you FTP down the tarball, extract it 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. +`make' program to compile and install the program from the source.

FreeBSD ports still use the tarball mechanism, but use a to hold the "knowledge" @@ -107,30 +107,30 @@ known as the Bourne-Again Shell, as that seems fairly typical. -# cd /usr/ports/shells/bash -# make install -Checksums OK. -===> Extracting for bash-1.14.5 -===> Patching for bash-1.14.5 -===> Applying FreeBSD patches for bash-1.14.5 -===> Configuring for bash-1.14.5 -===> Building for bash-1.14.5 -[lots and lots of compiler output here...] -===> Installing for bash-1.14.5 -make -f bash-Makefile bindir=/usr/local/bin prefix=/usr/local install -(cd ./documentation/; make ) -rm -f builtins.txt -nroff -man builtins.1 > builtins.txt -install -c -o bin -g bin -m 555 bash /usr/local/bin/bash -install -c -o bin -g bin -m 555 bashbug /usr/local/bin/bashbug -( cd ./documentation/ ; make mandir=/usr/local/man/man1 man3dir=/usr/local/man/man3 infodir=/usr/local/info install ) -[ -d /usr/local/man/man1 ] || mkdir /usr/local/man/man1 -[ -d /usr/local/info ] || mkdir /usr/local/info -../support/install.sh -c -m 644 bash.1 /usr/local/man/man1 -../support/install.sh -c -m 644 builtins.1 /usr/local/man/man1/bash_builtins.1 -../support/install.sh -c -m 644 features.info /usr/local/info/bash.info -gzip -9nf /usr/local/man/man1/bash.1 /usr/local/man/man1/bash_builtins.1 -===> Registering installation for bash-1.14.5 + # cd /usr/ports/shells/bash + # make install + Checksums OK. + ===> Extracting for bash-1.14.5 + ===> Patching for bash-1.14.5 + ===> Applying FreeBSD patches for bash-1.14.5 + ===> Configuring for bash-1.14.5 + ===> Building for bash-1.14.5 + [lots and lots of compiler output here...] + ===> Installing for bash-1.14.5 + make -f bash-Makefile bindir=/usr/local/bin prefix=/usr/local install + (cd ./documentation/; make ) + rm -f builtins.txt + nroff -man builtins.1 > builtins.txt + install -c -o bin -g bin -m 555 bash /usr/local/bin/bash + install -c -o bin -g bin -m 555 bashbug /usr/local/bin/bashbug + ( cd ./documentation/ ; make mandir=/usr/local/man/man1 man3dir=/usr/local/man/man3 infodir=/usr/local/info install ) + [ -d /usr/local/man/man1 ] || mkdir /usr/local/man/man1 + [ -d /usr/local/info ] || mkdir /usr/local/info + ../support/install.sh -c -m 644 bash.1 /usr/local/man/man1 + ../support/install.sh -c -m 644 builtins.1 /usr/local/man/man1/bash_builtins.1 + ../support/install.sh -c -m 644 features.info /usr/local/info/bash.info + gzip -9nf /usr/local/man/man1/bash.1 /usr/local/man/man1/bash_builtins.1 + ===> Registering installation for bash-1.14.5

To avoid confusing the issue, I've slightly pruned the install @@ -139,16 +139,16 @@ this yourself, you may well have got something like this at the start:-

The 'make' program has noticed that you didn't have a local copy +

The `make' program has noticed that you didn't have a local copy of the source code and tried to FTP it down so it could get the job done (are you starting to feel impressed? 8-)). I already had the source handy in my example, so it didn't need to fetch it. -

Let's go through this and see what the 'make' program was doing. +

Let's go through this and see what the `make' program was doing. Locate the source code -# mkdir /usr/ports -# cd /usr/ports -# ln -s /cdrom/ports/distfiles distfiles + # mkdir /usr/ports + # cd /usr/ports + # ln -s /cdrom/ports/distfiles distfiles to enable the ports make mechanism to find the tarballs (it expects to @@ -214,21 +214,21 @@ Now, suppose you want to install the gnats program from the databases directory. Here's how to do it:- -# cd /usr/ports -# mkdir databases -# cp -R /cdrom/ports/databases/gnats databases -# cd databases/gnats -# make install + # cd /usr/ports + # mkdir databases + # cp -R /cdrom/ports/databases/gnats databases + # cd databases/gnats + # make install Or if you're a serious database user and you want to compare all the ones available in the Ports collection, do -# cd /usr/ports -# cp -R /cdrom/ports/databases . -# cd databases -# make install + # cd /usr/ports + # cp -R /cdrom/ports/databases . + # cd databases + # make install (yes, that really is a dot on its own after the cp command and not a @@ -272,23 +272,23 @@ bits in square brackets are comments, don't type them in if you're trying this yourself!):- -# cd /usr/ports -# mkdir databases -# cd databases -# ftp ftp.freebsd.org -[log in as `ftp' and give your email address when asked for a -password. Remember to use binary (aka image) mode!] -> cd /pub/FreeBSD/ports/databases -> get gnats.tar.gz [tarballs up the gnats skeleton for us] -> quit -# tar xzf gnats.tar.gz [extract the gnats skeleton] -# cd gnats -# make install [build and install gnats] + # cd /usr/ports + # mkdir databases + # cd databases + # ftp ftp.freebsd.org + [log in as `ftp' and give your email address when asked for a + password. Remember to use binary (aka image) mode!] + > cd /pub/FreeBSD/ports/databases + > get gnats.tar.gz [tarballs up the gnats skeleton for us] + > quit + # tar xzf gnats.tar.gz [extract the gnats skeleton] + # cd gnats + # make install [build and install gnats] What happened here? We connected to the FTP server in the usual way and went to its databases sub-directory. When we gave it the command -'get gnats.tar.gz', the FTP server up the gnats directory for us and even went to the trouble of compressing it before sending it so we could get our hands on it a little quicker. @@ -304,16 +304,16 @@ port skeleton, let's get a whole sub-directory, for example all the database skeletons in the ports collection. It looks almost the same:- -# cd /usr/ports -# ftp ftp.freebsd.org -[log in as `ftp' and give your email address when asked for a -password. Remember to use binary (aka image) mode!] -> cd /pub/FreeBSD/ports/databases -> get databases.tar.gz [tarballs up the databases directory for us] -> quit -# tar xzf databases.tar.gz [extract all the database skeletons] -# cd databases -# make install [build and install all the database ports] + # cd /usr/ports + # ftp ftp.freebsd.org + [log in as `ftp' and give your email address when asked for a + password. Remember to use binary (aka image) mode!] + > cd /pub/FreeBSD/ports/databases + > get databases.tar.gz [tarballs up the databases directory for us] + > quit + # tar xzf databases.tar.gz [extract all the database skeletons] + # cd databases + # make install [build and install all the database ports] With half a dozen straightforward commands, we have now got a set of @@ -343,44 +343,44 @@ various statements that specify how the port should be compiled and installed. Here's the Makefile for bash:- -# New ports collection makefile for: bash -# Version required: 1.14.5 -# Date created: 21 August 1994 -# Whom: jkh -# -# Makefile,v 1.13 1995/10/04 14:45:01 asami Exp -# - -DISTNAME= bash-1.14.5 -CATEGORIES+= shells -MASTER_SITES= ftp://slc2.ins.cwru.edu/pub/dist/ - -MAINTAINER= ache@FreeBSD.ORG - -post-install: -.if !defined(NOMANCOMPRESS) - gzip -9nf ${PREFIX}/man/man1/bash.1 ${PREFIX}/man/man1/bash_builtins.1 -.endif - -.include + # New ports collection makefile for: bash + # Version required: 1.14.5 + # Date created: 21 August 1994 + # Whom: jkh + # + # Makefile,v 1.13 1995/10/04 14:45:01 asami Exp + # + + DISTNAME= bash-1.14.5 + CATEGORIES+= shells + MASTER_SITES= ftp://slc2.ins.cwru.edu/pub/dist/ + + MAINTAINER= ache@FreeBSD.ORG + + post-install: + .if !defined(NOMANCOMPRESS) + gzip -9nf ${PREFIX}/man/man1/bash.1 ${PREFIX}/man/man1/bash_builtins.1 + .endif + + .include <bsd.port.mk> The lines beginning with a "#" sign are comments for the benefit of human readers (as in most Unix script files).

-"DISTNAME" specifies the name of the , but without the extension.

-"CATEGORIES" states what kind of program this is. +`CATEGORIES" states what kind of program this is.

-"MASTER_SITES" is the URL(s) of the master FTP site, which is +`MASTER_SITES" is the URL(s) of the master FTP site, which is used to retrieve the if it is not available on the local system. This is a site which is regarded as reputable, and is normally the one from which the program is officially distributed (in so far as any software is "officially" distributed on the Internet).

-"MAINTAINER" is the email address of the person who is +`MAINTAINER" is the email address of the person who is responsible for updating the skeleton if, for example a new version of the program comes out. (Note: The title of "maintainer" is mainly an administrative one; it does Skipping over the next few lines for a minute, the line -.include + .include says that the other statements and commmands needed for this port are in a standard file called -"bsd.port.mk". As these are the same for all ports, there is +`bsd.port.mk". As these are the same for all ports, there is no point in duplicating them all over the place, so they are kept in a single standard file.

This is probably not the place to go into a detailed examination of how Makefiles work; suffice it to say that the lines starting with -"post-install" over-ride the instructions in bsd.port.mk +`post-install" over-ride the instructions in bsd.port.mk about what to do after installing the program, so that the man pages can be compressed after they have been put in their final destination. @@ -434,7 +434,7 @@ DESCR - a more detailed description. PLIST - a list of all the files that will be created when the program is installed. -It does not work?! +It does not work?!

Oh. You can do one of four (4) things : @@ -536,8 +536,8 @@ generated by a program of that name.

-A. It's a file ending in .tar.gz (with variations like .tar.Z, or even -.tgz if you're trying to squeeze the names into a DOS filesystem). +A. It's a file ending in .tar.gz (with variations like .tar.Z, or +even .tgz if you're trying to squeeze the names into a DOS filesystem).

Basically, it's a directory tree that's been archived into a single file (.tar) and then compressed (.gz). This technique was originally @@ -550,8 +550,8 @@ using the standard Unix tar program, which comes with the base FreeBSD system, like this:- -tar tvzf foobar.tar.gz # View contents of foobar.tar.gz -tar xzvf foobar.tar.gz # Extract contents into the current directory + tar tvzf foobar.tar.gz # View contents of foobar.tar.gz + tar xzvf foobar.tar.gz # Extract contents into the current directory