A simple web-toolbox.
Fetching latest commit…
Cannot retrieve the latest commit at this time
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, GNATcoll, Florist, XML/Ada and PostgreSQL. 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 * Setting up rotating log files and handling basic log file management * Loading configuration files * Handling the most common static content types (HTML, PNG, ICO and so on) * Easy Atom RSS feed generation * Connecting to one or more PostgreSQL databases * Switching to an un-privileged user. * Start/stop as a "regular" daemon using an rc script. 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 email@example.com -------------------- -- Dependencies -- -------------------- Yolk depends on 6 things out of the box. All of these are required: 1. An Ada 2005 compiler 2. AWS (required version >= 2.10.0) 3. GNATcoll (required version >= 1.4) 4. Florist (required version >= florist-gpl-2011) 5. XML/Ada (required version >= 4.1) 6. PostgreSQL (compile GNATcoll with PostgreSQL support) 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 ADA_PROJECT_PATH environment variable, 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: PATH=$PATH:/usr/gnat/bin export PATH And this to .bash_profile: if [ -f ~/.bashrc ]; then . ~/.bashrc; fi 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-gtk \ --disable-pygtk \ --with-python \ --with-postgresql You should of course adjust the above configuration options to fit your needs, just make sure PostgreSQL support is enabled. $ 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: prefix=/usr/gnat/bin/.. DEFAULT_LIBRARY_TYPE=static DEFAULT_TARGET=native ENABLE_SHARED=true ZLIB=true XMLADA=true ASIS=false IPv6=false SOCKET=openssl LDAP=false DEBUG=false CJOBS=2 DEMOS=false TARGET=native Finally run $ make build $ make build_doc $ make install 5. Add /usr/gnat/bin to your PATH environment variable. 6. Add /usr/gnat/lib/gnat to your GPR_PROJECT_PATH and ADA_PROJECT_PATH environment variables. 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: /usr/gnat/lib/gnat/aws.gpr /usr/gnat/lib/gnat/xmlada.gpr /usr/gnat/lib/gnat/florist.gpr /usr/gnat/lib/gnat/gnatcoll_postgresql.gpr My GPR_PROJECT_PATH / ADA_PROJECT_PATH environment variables hence contains this: /usr/gnat/lib/gnat If your distribution provides pre-made packages for all of this, you should probably use those instead. ------------------ -- References -- ------------------  Ada Web Server http://libre.adacore.com/libre/tools/aws/ Git: git clone --recursive http://forge.open-do.org/anonscm/git/aws/aws.git  GNAT Component Collection http://libre.adacore.com/libre/tools/gnat-component-collection/ SVN: svn co http://svn.eu.adacore.com/anonsvn/Dev/trunk/gps/gnatlib/  Florist http://libre.adacore.com/libre/download2 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.  XML/Ada http://libre.adacore.com/libre/tools/xmlada/ SVN: svn co http://svn.eu.adacore.com/anonsvn/Dev/trunk/xmlada/  PostgreSQL http://www.postgresql.org/  I personally use the GNAT GPL compiler from AdaCore, but there's a good chance the latest GCC Ada compiler will work just fine. http://libre.adacore.com/libre/