ht://Dig Copyright © 1995-2002 The ht://Dig Group
Please see the file COPYING for
license information.
This document will attempt to show the steps needed to build
and install the ht://Dig system.
The main sections are:
The distribution of ht://Dig is in the form of a gzipped tar file. The name of the file will be something like htdig-3.1.0.tar.gz. To extract, you can use either the GNU tar command as follows:
% tar xzf tarfile.tar.gz
If you do not have GNU tar, you can do the following:
% gunzip -c tarfile.tar.gz | tar xf -
In either case, a new directory will be created under which the distribution will be extracted. The directory it creates will be htdig- followed by the version number.
Once the distribution has been extracted, change to the newly
created directory.
In this directory you will need execute the configure program:
% ./configure
This program will attempt to determine what your particular system can and can't do.
The configure program may produce some warnings about libguile and guile. Ignore those warnings since they do not affect the ht://Dig program at all.
After this, you may wish to edit the file CONFIG. There are several values which you need to change in this file. Note that more recent versions of ht://Dig (after 3.1.0b2) will allow you to use
./configure --prefix=and
--exec-prefix=to set the DEST and BIN_DIR variables automatically. As of the full 3.1.0 release, configure also supports setting the other directories in CONFIG using the flags --with-cgi-bin-dir=DIR, --with-image-dir=DIR and --with-search-dir=DIR.
The configure program will have created Makefiles in all the important directories. It is important to note that the Makefiles created assume that you use a make program that knows how to deal with
include filename
Some make programs do not allow this or have a different syntax for including. In this case, you should probably obtain GNU make.
At this point you can optionally add dependency information to all the make files with the command
% make depend
This only needs to be done if you are going to change any of the sources to ht://Dig.
Now build the complete system with
% make
(Sit back and relax for a while...)
If the compilation failed with the error that it cannot find libht.a, the most likely problem is that your system does not have libstdc++ installed. Please check the system requirements for details on this.
Everything should have built at this point. To install the software, you need to execute
% make install
This will perform several tasks. It will first attempt to create the directories that you specified in the CONFIG file. It will then copy the following programs to the BIN_DIR directory you specified in the CONFIG file:
It will also copy the htsearch program to your CGIBIN_DIR directory.
After this, several files will be customized and installed. Here is a list of the files that get installed:
- CONFIG_DIR/htdig.conf
- A minimal config file which can be used to create a search database for http://www.htdig.org
- SEARCH_FORM
- A sample HTML document that contains a search form.
- COMMON_DIR/footer.html
- A sample HTML document that can be used as the search results footer.
- COMMON_DIR/header.html
- A sample HTML document that can be used as the search results header.
- COMMON_DIR/nomatch.html
- A sample HTML document that can be used if nothing was found.
- COMMON_DIR/syntax.html
- A sample HTML document that will be displayed if the user entered an illegal boolean expression. found.
- COMMON_DIR/english.0
- Default list of words with affixes that is used by htfuzzy.
- COMMON_DIR/english.aff
- Default affix rule database that is used by htfuzzy.
- IMAGE_DIR/star.gif
- The default star image that is used to rank matches.
- IMAGE_DIR/star_blank.gif
- The default placeholder image that is the same size as the star, but is blank. This is used to align the results in the short listing.
- IMAGE_DIR/htdig.gif
- The nifty ht://Dig logo.
- IMAGE_DIR/button*.gif
- Sample images used to show the search result pages.
- BIN_DIR/rundig
- A sample shell script which will create a database.
Note that these files will never replace any existing files that may already be installed.
It is also important to note that these files are mostly examples. As they stand, they will work, but you probably want to modify them to reflect your needs.
After the installation, you will be ready to test out everything. You can use the rundig script to make a test database of the online documentation at http://www.htdig.org/
The only thing left to do is to modify the htdig.conf config file which was placed in CONFIG_DIR/htdig.conf. The Configuration manual has the details on how what attributes are needed. Then, you'll be ready to begin running ht://Dig.