Generating:
    Run './generate' to generate build scripts
        (prints further usage instructions)

Required Packages:
    Packages required to build Greenstone are defined in the Greenstone package
    build scripts, however you will also need the necessary packages for
    building packages on your current distro.
    These are:
        Ubuntu: build-essential, debhelper
        Arch:   base-devel, <check this>
        Fedora: <fill out>

Building:
    Generated packages are found in ./build/<distro>/<package>
    To build a package, run 'make' in the package directory.
    If building a package requires other packages to be installed, they may be
    automatically installed, or if not they should be printed to the terminal.
    To build all packages, cd into ./build/<distro>/, and run
        for pkg in *; do test -d $pkg && pushd $pkg && make; popd; done
    I recommend only doing this if you know all the packages will build
    successfully.

Patches:
    To generate a patch:
        diff -aur package.pristine package.new > package.patch
    To apply a patch:
        patch -p0 -i package.patch
        where -p0 assumes the paths in the patch are valid in the current
        directory

    gs2build.patch
        Contains patches for the gs2build build process
        Disables building externals
    perl-util.patch
        Contains a patch to change the tmp folder for gs2build
        This is necessary because the original location of the tmp folder was
        in the gs2build folder, which contains executables, and as such should
        be read-only.
        Thus the tmp folder has been changed to /tmp/greenstone-build

Scripts:
    greenstone
        Sets up the environment for running greenstone-tools
    gli
        Runs greenstone to set up the environment, then runs GLI
    wvWare
        Removes itself from $PATH, then runs wvWare (which will be the system
        wvWare)

Inputs (see existing inputs for examples):
    distros
        Defines Linux distributions that can be built for.
        Sets the package manager, system paths, and the names of required
        packages on that distro.

    files
        Contains files used for building Greenstone (patches, scripts, config)

    managers
        Defines package managers that can be built for.
        Sets variables specific to the package manager, and any static files
        for a package definition.

    packages
        Defines a package.

    segments
        Parts of Makefiles.
        Concatenated together to form the Makefile for a package.

perllib:
    Contains perl modules for parsing inputs.
    Package folder contains package-specific functionality
    (for a package to work, it must be defined here as _<package>.pm)

Gotchas:
    derby.jar location
        Must be in the tomcat lib folder instead of the greenstone lib folder
        http://stackoverflow.com/questions/24963117/tomcat-realm-forms-login-always-fails

Issues:
    Debian package has lots of warnings
    Pacman package has lots of file ownership warnings when updating
        (because we chown the web directory)
        Maybe chown it back to root in a pre-update script?