This is a port of FreeBSD fortune to OpenStep/Mach and MacOS X Server. The original README file is here and is called "README.ORIG". It's possible that this port will build and run on NeXTSTEP 3.x, but I don't program on NeXTSTEP these days.

The whole UN*X experience has gone downhill as vendors increasingly forget to ship the /usr/games stuff in their operating systems. I consider it a bug in OpenStep and MacOS X Server that fortune doesn't ship with the system. So, here's what you need to make your computing experience complete. What's the point in logging in if you can't play "mille", keep your files private using the unbreakable encryption of "caesar", or read a good fortune?

I took this from the FreeBSD-current directory tree on July 10, 1999, mainly because I was too lazy to download and unpack the games sources from a RELEASE version of FreeBSD. You can get FreeBSD from ftp://ftp.freebsd.org/pub/FreeBSD/ or on http://www.freebsd.org/. If you're running Intel hardware and you don't have NeXTSTEP or OpenStep, then you should run FreeBSD because it's cool.

I've hacked out a bunch of stuff including all the FreeBSD makefiles, since they don't work in other operating systems. I also flattened out the directories and moved unstr, fortune and strfile into the top level. I made a brand spanking new Makefile which builds all three programs. I replaced the manpages with some older manpages I found in a previous port that someone did of fortune to NeXTSTEP. The ones that came with the current FreeBSD sources won't work with the man/nroff commands in OpenStep or MacOS X Server.

I made very few changes to the C source files, but all my changes are marked with comments that include the string "CFS" so you can search for them.

The licenses and copyrights for the source files in this project are included in each file. Most files are taken from FreeBSD, except the regexpr.{c,h} files which have a different copyright.


INSTALLING:
----------
Copy fortune, strfile and unstr into /usr/local/bin or wherever's in your path.

If you care, copy the manpages in /usr/local/man/man{6,8}.

Put the fortunes (everything in the datfiles directory) into /usr/local/games/fortunes. If you don't like this directory, you need to recompile.

Then, you're done!


COMPILING:
---------

You should go into the top-level directory and type "make clean" and then "make". This will build fortune, strfile and unstr binaries. You can copy these binaries wherever you like. I put them in /usr/local/bin.

The fortune files (everything in the datfiles directory) have to go into /usr/local/games/fortunes. You can change this by editing the file pathname.h, and then recompile by doing "make clean" and "make".

The regexpr.{c,h} files are included because MacOS X Server does not include the old BSD re_comp and re_exec regular expression functions. Darwin has these in the libcompat library, but that's kind of big to include just for two functions (thanks to Ken Case <kc@omnigroup.com> for pointing out libcompat). I dug up regexpr.{c,h} from the NeXTSTEP MiscKit.

FORTUNES:
--------

I have pre-built the index (.dat) files for all the fortune files in the datfiles directory. If you want to change the fortune lists or do ROT-13 encoding on the offensive fortunes, then you can use strfile to do this.



Share and Enjoy!

Chris Saldanha <csaldanh@acm.org>
http://www.computeractive.com/~csaldanh/
