INSTALL

I have built this tree on NetBSD (i386,sparc), FreeBSD, SunOS, Solaris (sparc,x86). I have also built much of it on HP-UX, IRIX and Ultrix. This release should build on Linux but I cannot promise. Feeback is welcome.

bmake

First unless you are running 4.4BSD, you must build bmake. This tree is designed to be built with bmake and with support for multiple architectures. GNU autoconf is used to generate a config.h which handles most system dependencies, but the Makefiles rely on bmake. Fortunately my bmake uses autoconf :-)

If you are running 4.4BSD

You simply need to install my macros in /usr/share/mk, the following command will skip the bsd.*.mk and *.sys.mk files which you should not install on a 4.4BSD system as they will probably break your /usr/src builds:
# cp bmake/mk/[d-s]*.mk /usr/share/mk
I've not yet worked out why, but FreeBSD installs man pages into /usr/share/man/man/man*. Look in sys.mk for conflicts with man.mk

The easy solution is to simply install bmake.

Building bmake

This should be quite straight forward.

$ BASE=`pwd`
$ mkdir /tmp/bmake
$ cd /tmp/bmake
$ $BASE/bmake/configure
$ gmake -f makefile.boot
# gmake -f makefile.boot install
If you really want to, you can use the bmake thus produced to re-build bmake, though I never bother.

$ cd $BASE/bmake
$ bmake obj
$ bmake
# bmake install

Makefile.base

The Makefiles want to know where the top level directory is. If it is not /usr/local/src/sjg, then you should either create Makefile.base in the top level directory or set BASE in your environment.

These Makefiles use my own macro files which are derrived from the bsd.*.mk macros, if you are not allowed to install bmake/mk/*.mk in /usr/share/mk or /usr/local/share/mk you can use:

	bmake -I ${BASE}/bmake/mk
Finally, if you do not have the BSD mandoc macros for [nt]roff, or you do not want the man pages formatted, set NOMAN=no in your environment or in Makefile.base

Macro files

A couple of my macro files differ from the bsd.* originals (apart from being more portable), man.mk handles installing unformatted nroff, as well as formatted pages with the normal extension rather than BSD's .0 Unless SUBDIR_MUST_EXIST is defined, subdir.mk will skip missing subdirs (after telling you...) rather than die.

Building

In various directories, you may find symlinks named src pointing off to no where. These should point to the directories holding the appropriate distribution. For instance:
$ ls -l ssl/bin/rdist/src
lrwxrwxr-x  1 sjg  wheel  17 Jun 20  1996 ssl/bin/rdist/src@ -> ../../../../rdist-6.1.3
$ 
Obviously you will need these links correct before you can expect to build things like SSLrdist. See other distributions for details on where to get the other distrbutions you might need.

Now just:

$ cd $BASE
$ bmake obj
$ bmake depend
$ bmake
# bmake install

mkdep

When you run bmake depend, the macros will use ${MKDEP} (default is /usr/bin/mkdep or /usr/local/share/bin/mkdeps.sh) If you don't have either skip the bmake depend step.

obj

Note that I always use obj dirs to keep the build tree neat and facilitate build/editing within emacs while shareing the src via NFS. WARNING: If you skip the bmake obj step, don't be surprised when the build fails in subtle ways.

I have an arrangement like:

/usr/local/obj -> src/obj.${MACHINE}
and then I set

BSDSRCDIR=`cd /usr/local/src; /bin/pwd`
BSDOBJDIR=/usr/local/obj
You must set BSDSRCDIR with the same value that /bin/pwd produces as otherwise obj.mk will do the wrong thing.

shared libraries

The lib.mk macros know how to build shared libraries on NetBSD, FreeBSD, SunOS, Solaris, HP-UX and OSF/1. I currently build shared versions of libsslfd as will as SSLeay's libssl and libcrypto.

If you do not want shared libraries built, either set NOPIC in Makefile.base or on the command line, or create .nopic in the src or obj directories concerned.

Alternatively if NOARCHIVE is set you can skip building the archive libraries and use just the shared libs. This can save considerable time.

symlinks

Note that on Solaris and probably some others you need to make a symlink like:
# ln -s /usr/local/lib/libsslfd.so.0.3 /usr/lib/libsslfd.so.0
Before the libraries are really usable. Solaris does not really handle shared lib versioning the way that BSD and SunOS do, so we give it just the major version number to look for. Also, in order to link against a shared lib on Solaris you need to create a link like:
# ln -s libsslfd.so.0.3 libsslfd.so
On HP-UX you need to ensure that shared libs are executable!

SSL

The ssl tree here expects SSLeay to be installed in /usr/local/ssl the ssl/build tree can be used to build SSLeay using bmake, just make ssl/build/dist a symlink to the location of the SSLeay srcs, it is currently configured for SSLeay-6.6, build-081 handles SSLeay-0.8.1

Example

An example usually helps. The following assumes that SSLeay has been built and installed.

First unpack all the Quick.com.au packages in a single tree such as /usr/local/src/sjg.

$ mkdir -p /usr/local/src/sjg
$ cd /usr/local/src/sjg
$ gzcat /tmp/bmake.tar.gz | tar xvf -
$ gzcat /tmp/SSLrsh.tar.gz | tar xvf -
..
..
Now, if you are only building for a single architecture you can:
$ cd bmake
$ ./configure
$ make -f makefile.boot
# make -f makefile.boot install
Otherwise if you are shareing the src via NFS on different machines, you can:
$ mkdir /tmp/bmake
$ cd /tmp/bmake
$ /usr/local/src/sjg/bmake/configure	# or whereever the src is
$ gmake -f makefile.boot
# gmake -f makefile.boot install
The above relies on a make that handles VPATH correctly. I use this method btw.

Unless you are on a BSD system you may have to create a /usr/share/mk/sys.mk (or /usr/local/share/mk if you prefer). bmake/mk/*.sys.mk are examples that I have used, pick one and copy it to sys.mk. Do NOT replace an existing /usr/share/mk/sys.mk

Anyway, now you can return to the main game.

$ cd /usr/local/src/sjg
$ bmake obj
$ bmake
# bmake install
Actually, the first time bmake is invoked it will cause Makefile.base to be created and then tell you to restart make. Also, you will need to be root to install anything as the install macros use chown which is usually restricted to root.

breakage

It is highly likely that your source tree is a small subset of ours. We have taken setps to try and ensure that the build will work for you despite this, but we may have missed something.

In general it is safest to start with a clean tree. If you have unpacked previous versions of SSLrsh.tar you may have Makefiles or headers present that are not in the current release and will cause you problems. If in doubt just:

$ mv /usr/local/src/sjg /usr/local/src/sjg.old
$ mkdir /usr/local/src/sjg
$ ...
$ ...

$Id: install.html,v 1.10 1998/10/30 11:47:06 sjg Exp $
Copyright (c) 1997 QUICK.COM.AU