openbsd-ports/productivity/davical/pkg
..
DESCR
PLIST
README
UNMESSAGE

$OpenBSD: README,v 1.2 2012/03/07 08:38:44 ajacoutot Exp $

+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------

Database Setup
==============
DAViCal needs two PostgreSQL users, one for administrative access and
one for daily use. Assuming you have an administrative account named
`postgres', you can create the users and davical database like this:

createuser -U postgres --pwprompt --no-superuser --no-createdb \
	--no-createrole davical_dba
createuser -U postgres --pwprompt --no-superuser --no-createdb \
	--no-createrole davical_app
createdb -U postgres -E UTF8 -T template0 -O davical_dba davical
createlang -U postgres plpgsql davical

Let's fill the database using the newly created dba user:

psql -U davical_dba -f ${TRUEPREFIX}/awl/dba/awl-tables.sql davical
psql -U davical_dba -f ${TRUEPREFIX}/awl/dba/schema-management.sql davical
psql -U davical_dba -f ${TINSTDIR}/dba/davical.sql davical

Run the administrative script to set permissions for the application DB
user on the database. This script should be used when upgrading DAViCal
too, so that the DB schema is consistent.

${TINSTDIR}/dba/update-davical-database --dbname davical \
	--appuser davical_app --nopatch --owner davical_dba \
	--dbpass "$davical_dba_password"

Finally, insert basic roles/users into the db:

psql -U davical_dba -f ${TINSTDIR}/dba/base-data.sql davical

Default temporary admin password is 'nimda', stored in database as
'**nimda', you can change it to 'temppass' with

psql -U davical_dba -c \
"UPDATE usr SET password = '**temppass' WHERE user_no = 1;" davical

This is only for initial setup, and it should be changed through the
web interface (which will crypt the new password) once logged in.


DAViCal Configuration
=====================

The DAViCal configuration resides in
${TINSTDIR}/config/config.php and is a regular PHP file which
sets (or overrides) some specific variables. You should only need to
set pg_connect value to configure database access.

Apache Configuration
====================

With Apache, AllowOverride settings are required on the ${TINSTDIR}
directory. You can configure this as follows:

# ln -s ../modules.sample/davical.conf \
        ${TRUEPREFIX}/conf/modules
# /etc/rc.d/httpd restart

Then point your browser at:
    http://<hostname>/davical/
and you should get a message telling you to configure DAViCal.

Client Setup
============

More information is available at http://wiki.davical.org/w/CalDAV_Clients.