Below is a README template for use with ports that need further setup or
configuration to run on OpenBSD. Please keep an eye out for the following
details:
- maximum width of 72 characters per column;
- file must start with the RCS ID;
- no trailing spaces or newlines;
- rulers should be the length of the above string.


.....

zoneminder notes, needs expanding and fleshing out into readme below

After the installation you need to set up a relational database
using MariaDB or MySQL. This does not have to be on the same machine,
which is why the server is not a dependency of this port

XXX Maybe a flavor that depends on the -server port too?

Once you have the db server up and running, you need to load 
the ZoneMinder schema, add users and grant them permission;
run the mysql command as shown, first using '.' to source
a SQL script, then setting permissions.

mysql -u root -p
\. /usr/local/share/zoneminder/db/zm_create.sql
grant select,insert,update,delete on <database name>.* to '<database user>'@localhost identified by '<database password>'; 


- set database user/password in ${SYSCONFDIR}/zm/zm.conf and
${PREFIX-web}/zoneminder/api/app/Config/database.php
(check for other files with @ZM_DB_ HOST/USER/PASS/NAME).

- generate new random tokens:
${PREFIX-web}/zoneminder/api/app/Config/core.php
- @ZM_API_SALT@ should be 40 char alphanumeric
- @ZM_API_SEED@ should be (<= ?) 29 char numeric

- email settings in
${PREFIX-web}/zoneminder/api/app/Config/email.php ??

.....

apache config:

Alias /zm /var/www/zoneminder
<Directory "/var/www/zoneminder">
  php_flag register_globals off
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
  Require all granted
</Directory>


nginx configuration:

???

httpd configuration:

???



running:

# mkdir /var/run/zm
# chown www /var/run/zm
# sudo -u www zmpkg.pl start 

XXX zmpkg.pl should be replaced by a rc.d script, 
or called from one.

------------------------8<------------------------
$OpenBSD: README.template,v 1.4 2011/06/02 13:44:40 ajacoutot Exp $

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

Section name 1
==============
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non feugiat
mi. Donec lacinia pretium ligula, quis luctus nunc lobortis non. Nam
eget justo nunc.

Subsection name 1.1
-------------------
Nulla bibendum viverra eleifend. Fusce sagittis posuere eros. Sed rutrum
justo vel nulla pellentesque eget tempus nibh consequat. Nam adipiscing
vehicula quam et porttitor.

Subsection name 1.2
-------------------
Etiam vitae nisi id mauris egestas bibendum quis non neque. Phasellus et
tristique velit. Nulla vitae enim eros. In convallis aliquet magna, at
tincidunt odio aliquam vitae. Nulla suscipit porta vestibulum. Aliquam
at leo orci, nec aliquet orci.

Section name 2
==============
Proin mollis eros vel nibh consequat egestas. Quisque a massa augue.
Donec vel justo lacus. Nam consequat hendrerit tempus. Phasellus rhoncus
hendrerit purus, eu volutpat erat vulputate non.

Section name 3
==============
Phasellus ut ipsum nulla. Aliquam lacus ligula, vulputate dignissim
tristique eget, laoreet a risus. Mauris ullamcorper consectetur
accumsan.
------------------------8<------------------------
