A simple web-toolbox.
Ada Other


Welcome to the Yolk Web Toolbox!

Contents of this README:

    1. Introduction
    2. Dependencies
    3. References

--  Introduction --

Yolk is an Ada based web-toolbox that sits on top of AWS[1], GNATcoll[2],
Florist[3] and XML/Ada[4]. You will also need to compile GNATcoll
with SQLite and/or PostgreSQL[5] support in order to try the Yolk demo. If you
don't want to muck about with the demo, and you have no need for PostgreSQL or
SQLite, then you can safely compile GNATcoll without support for these two

It is important to understand that Yolk itself does very little that cannot be
accomplished using plain AWS, GNATcoll, XML/Ada and Florist. It is, for lack of
a better term, a convenience. Some of things that Yolk offers are:

    * Sending emails from the application
    * Loading configuration files
    * Handling the most common static content types (HTML, PNG, ICO and so on)
    * Easy Atom RSS feed generation
    * Switching to an un-privileged user.
    * Start/stop as a "regular" daemon using an rc script.
    * Easy logging to syslogd.

Be sure to check out the Yolk demo application for a good example on how to make
use of Yolk.

I've only ever tested Yolk on Linux. I've no idea if it works on Windows or Mac,
and I've no current plans for trying my hand at those two platforms. If you'd
like to help make it work for Mac and/or Windows, feel free to contact me at


--  Dependencies  --

Yolk depends on 6 things out of the box. All of these are required:

    1. An Ada 2012 compiler[6]
    2. AWS (version >= 2012, commit 7df50cc4a0a72b53aee34e9c1e836de520f2145f)
    3. GNATcoll (version >= 2013, SVN revision 217516)
    4. Florist (version >= florist-gpl-2012)
    5. XML/Ada (version >= 4.3)
    6. PostgreSQL (compile GNATcoll with PostgreSQL/SQLite to try the Yolk demo)

Yolk might work with other versions of the above software, but those are the
versions I've tested it with.

The path to the AWS, GNATcoll, Florist and XML/Ada project files must be added
to the GPR_PROJECT_PATH and ADA_PROJECT_PATH environment variables, or else your
Yolk project wont compile.

My usual modus operandi for setting up these 6 things goes something like this:

    1.  Install PostgreSQL by whatever means is fitting for the OS.

    2.  Install GNAT GPL in its default location (/usr/gnat) and add /usr/gnat/bin
        to your PATH:

            $ PATH=$PATH:/usr/gnat/bin
            $ export PATH

        You might want to add this to .bashrc:

            export PATH

        And this to .bash_profile:

            if [ -f ~/.bashrc ]; then
                . ~/.bashrc;

        Add /usr/gnat/lib/gnat to your GPR_PROJECT_PATH and ADA_PROJECT_PATH
        environment variables.

        Of course depending on your system. Mine is Slackware. The important
        thing is to make sure /usr/gnat/bin is added to your PATH even after
        a reboot.

        This step is of course only necessary if you don't already have an Ada
        compiler installed.

    3.  Install GNATcoll in /usr/gnat:

            $ ./configure --prefix=/usr/gnat --disable-projects

        You should of course adjust the above configuration options to fit your
        needs, just make sure PostgreSQL and SQLite support is enabled, as both
        of these are used by the Yolk demo. You must also make sure that syslog
        support is compiled in, since all logging data is sent to syslog.

            $ make
            $ make install

    4.  Install Florist in /usr/gnat:

            $ ./configure --prefix=/usr/gnat
            $ make
            $ make install

    5.  Install XML/Ada in /usr/gnat:

            $ ./configure --prefix=/usr/gnat
            $ make all
            $ make docs
            $ make install

    6.  Install AWS in its default location. See makefile.conf for further
        information. After having run

            $ make setup

        be sure to check that makefile.setup contains the correct information.
        It should look something like this, of course depending on how much
        you've enabled in the makefile.conf file:


        Finally run

            $ make build
            $ make build_doc
            $ make install

Don't take the above for gospel. You should _always_ read all the accompanying
documentation for the software you're trying to install.

For reference, I can say that on my Slackware Linux system, I have the AWS,
XML/Ada, Florist and GNATcoll project files available in these directories:


My GPR_PROJECT_PATH / ADA_PROJECT_PATH environment variables hence contains


If your distribution provides pre-made packages for all of this, you should
probably use those instead.

--  References  --

[1] Ada Web Server
    Git: git clone --recursive http://forge.open-do.org/anonscm/git/aws/aws.git

[2] GNAT Component Collection
    SVN: svn co http://svn.eu.adacore.com/anonsvn/Dev/trunk/gps/gnatlib/

[3] Florist
    I've not been able to track down an VCS repository for Florist yet, so you're
    going to have to just download the latest official package.

[4] XML/Ada
    SVN: svn co http://svn.eu.adacore.com/anonsvn/Dev/trunk/xmlada/

[5] PostgreSQL

[6] I personally use the GNAT GPL compiler from AdaCore, but there's a good chance
    the latest GCC Ada compiler will work just fine.