Minimum requirements
====================

 - GNU make ('gmake' on BSD systems)
 - gcc 2.95 or newer

Quick install
=============

 These instructions are tested on Red Hat Linux 7.1 and OpenBSD 3.0.

 - become the superuser

$ su -
[type your root password here]

 - create a group "zipcheck". This is the group ID for the 
   temporary files during the archive validity checking. 

# groupadd zipcheck

 - create a new user "zipcheck" that has "zipcheck" as its primary
   group ID and an invalid shell:

# useradd -g zipcheck -s /bin/false zipcheck

 - create a new user "bbsadmin". You will need this account when
   performing administrative tasks on your board. This user should
   have "bbs" as group and "/home/bbs" as home directory. It should
   also have "zipcheck" in its supplementary group. The password
   should be known only by you.

# groupadd bbs
# useradd -d /home/bbs -m -G zipcheck -g bbs -s /bin/sh bbsadmin
# passwd bbsadmin
[type any password here]

 - create another user "bbs" with a group "bbs" and a home directory
   "/home/bbs". Remember to set the password as well. You may want
   to choose a complex one for a while and remove the password when
   your board is ready to handle users. This user needs to have 
   "zipcheck" in its supplementary group as well.

# useradd -d /home/bbs -G zipcheck -g bbs -s /bin/sh bbs 
# passwd bbs
[type any password here]

 - make sure that "/home/bbs" is owned by "bbsadmin" and has
   permissions 750:

# chown bbsadmin:bbs /home/bbs
# chmod 750 /home/bbs

 - now log in as "bbsadmin", create directory "src" and change
   to it:

$ mkdir src
$ cd src

 - extract the distribution packet:

$ tar xzvf /somewhere/daydream-2.14.6.tar.gz

 - create a directory "build" and change to it:

$ mkdir build
$ cd build

 - this way your source tree stays clean of object files. 
   run "configure":

$ ../daydream-2.14.6/configure

 - build and install the software:

$ make
$ make install

 - change to home directory and compile the configuration file.
   If you are using "daydream.cfg" from previous setup, remember
   to read "docs/README.archivers".

$ cd ~
$ bin/ddcfg daydream.cfg

 - now become the superuser again and execute the script that
   armors the installation, that is, makes the permissions
   and ownerships of files and directories somewhat safer.

$ su -
[type your root password here]
# /home/bbs/bin/secure.sh

 - review the log produced by the script to ensure there were
   no errors:

# cat ~/daydream-secure.log

 - make DayDream's login script a valid shell by adding the
   following line to "/etc/shells":

/home/bbs/ddlogin

 - change the login shell of "bbs" to "/home/bbs/ddlogin":

# usermod -s /home/bbs/ddlogin bbs

 - you have to setup the safety wrapper for archivers. First,
   change the ownership of "/home/bbs/bin/runas" to "zipcheck":

# chown zipcheck /home/bbs/bin/runas

 - then, turn on the setuid bit:

# chmod u+s /home/bbs/bin/runas

 - to setup telnet nodes, read 'docs/README.telnet'. 


Updating the existing installation
==================================

 - "tar xzvf daydream-2.14.6.tar.gz"
 - "cd daydream-2.14.6"
 - "configure". DayDream installs itself to /home/bbs by default. If your
   board resides in an another directory, use the --prefix -switch when
   running configure.
 - "make"
 - "make install-exec". This installs executables only. Sometimes if
   the required files seem not to install, use "make install". While
   this will overwrite data files as well, not only executables change
   between releases.
 - perform the copy & paste operations described above.
 - have a look at docs/UPDATING. 
 - you're done.


Troubleshooting
===============

 - Python support, or to be exact, its installation is quite experimental.
   If you do not have Python development headers, it will not be built and
   there is nothing to worry about installation.
   
   However, if you have these headers, Python support will be built and 
   you will need superuser permissions for installation procedure, as the
   resulting Python module is installed to the standard Python module path.
   
   You may want not to build Python support at all - this can be achieved
   by specifying the "--without-python" switch when running "configure".

 - By default, DayDream uses /tmp/dd as its temporary directory. Debian
   GNU/Linux users may want to use a different directory for this purpose
   and it is possible to change the directory by invoking configure with 
   the "--with-tempdir" option.
