Compiling EasyPush
This article discusses how to compile and install EasyPush from source code.
EasyPush dependencies
This section lists out what you need to have installed and running on your machine to build EasyPush from source code and run it.
Package dependencies
To compile
- GCC version 4.0 .
- GNU Make 3.8 .
Compile time dependecies
- OpenLDAP version 2.3.6 or newer.
- Installed at /var/easypush/ldap
- libc6
- libcrypt
- libcrypto
- libdl
- libm
- libconfuse
- libssl
- libresolv.so.2
Run-time dependencies
- runit
- [www.samba.org/ Samba] alongwith mkntpwd (smbldap tool)
- daemontools
- uschedule
- NSCD
- Courier (IMAP & POP3) (with optional SSL support)
- Fetchmail
- qmail-LDAP
- ntpdate (for synchronizing time with internet NTP servers)
- Mairix 0.17 (email index and search tool)
- [www.squirrelmail.org SquirrelMail] Webmail Application.
- mdadm (for RAID management)
- Any CGI supporting Web-server: Xitami and Apache are preferred
NOTE: Easypush itself will be able to install and will not stop working if some of the above mentioned dependencies are not met (except for a CGI-supporting web-server). However, obviously, the respective features in easypush will get disabled (or have no effect or throw up errors) if any dependent software it expects to find doesn't exist.
Service dependencies
EasyPush, during run time, assumes a few services to be running and to behave in a certain way. The /var/service/ directory on a deepOfix system contains symbolic links which point to all the service directories on the system. Those service directories which have a directory called "easypush" inside them, will be visible and manageable as services inside EasyPush, the rest will not show up in the interface. These services are controlled by a runit helper program called runsv. When services are under control of runsv, they can be in the following states:
- up - running, default state up.
- down - service permanently stopped, default state down.
- finish - service has run and finished it's job.
Apart from these three, there are other states like "down, want up" which signify something not working properly.
All these states are used by EasyPush to get information about services. EasyPush sends signals which runsv understands to these services to control their state. Therefore, runit and runsv have to be working properly, alongwith services like ldap, apache2, xitami, and all the email-related services, at the very least.
Directory Structure
Create the directories where all the easypush files will be installed into:
# cd /var/easypush # mkdir bin cgi css error etc include js lib log tmpl
The compile order
The FLATE Library
* FLATE is a library used in cgi applications to deal with html files organized as templates. Its goal is to avoid any html code in the application, and thus, effectively separate the CGI and the HTML parts of the application. All changes to the html pages produced are made through functions, able to deal with complex tables and zones. Thus it's much easier to maintain the html code, as a programmer can take care of the application code, and an html designer can do changes to the html code without asking the programmer to change his code.
Compile the flate library:
cd to the flate subdirectory within the directory where you have extracted the easypush source:
$ cd ~/messaging/trunk/libs/libflate-<version> $ make
libtai
* libtai is a library for storing and manipulating dates and times. It supports two time scales: (1) TAI64, covering a few hundred billion years with 1-second precision; (2) TAI64NA, covering the same period with 1-attosecond precision. Both scales are defined in terms of TAI, the current international real time standard.
Compile the libtai library:
$ cd ~/messaging/trunk/libs/libtai $ make
Next, we need to compile and install the Easypush-specific libraries.
EasyPush libraries
$ cd ~/messaging/trunk/libs/ $ make clean $ make
Installing the libraries
Then, as root:
# make install
Compiling EasyPush CGIs
$ cd ~/messaging/trunk/cgi $ make
Installing the CGIs
Then, as root:
# make install