From ecedc2bfebd668b167af8230f3740bd40715e5cb Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Wed, 16 May 2012 17:05:57 -0300
Subject: [PATCH] Added env-PATH and more mimetypes to cloudooo.conf.in

env-PATH is required for use imagemagick, ffmpeg from the instance itself,
and also important to make the tests works.
---
 .../generic_cloudooo/template/cloudooo.cfg.in | 27 ++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in b/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
index 156f7e4ae..eb20ecdba 100644
--- a/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
+++ b/slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
@@ -32,6 +32,9 @@ limit_memory_used = 3000
 application_hostname = %(ip)s
 # OpenOffice Port
 openoffice_port = %(openoffice_port)s
+
+# PATH is required for imagemagick and others conversors
+env-PATH = %(PATH)s
 # LD_LIBRARY_PATH passed to OpenOffice
 env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
 env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s
@@ -41,12 +44,30 @@ env-FONTCONFIG_FILE = %(FONTCONFIG_FILE)s
 # It is used to select the handler that will be used in conversion.
 # Priority matters, first match take precedence on next lines.
 mimetype_registry =
-  application/pdf * pdf
   application/vnd.oasis.opendocument* * ooo
   application/vnd.sun.xml* * ooo
-  text/* * ooo
-  image/* image/* imagemagick
+  application/pdf text/* pdf
+  application/pdf * ooo
   video/* * ffmpeg
+  audio/* * ffmpeg
+  application/x-shockwave-flash * ffmpeg
+  application/ogg * ffmpeg
+  application/ogv * ffmpeg
+  image/png image/jpeg imagemagick
+  image/png * ooo
+  image/* image/* imagemagick
+  text/* * ooo
+  application/zip * ooo
+  application/msword * ooo
+  application/vnd* * ooo
+  application/x-vnd* * ooo
+  application/postscript * ooo
+  application/wmf * ooo
+  application/csv * ooo
+  application/x-openoffice-gdimetafile * ooo
+  application/x-emf * ooo
+  application/emf * ooo
+  application/octet* * ooo
   * application/vnd.oasis.opendocument* ooo
 
 [server:main]
-- 
2.30.9