summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO181
-rw-r--r--PKGBUILD558
-rwxr-xr-xcompress-static34
-rw-r--r--kopano-webapp-files.ini2
-rw-r--r--kopano-webapp-mdm.ini1
-rw-r--r--kopano-webapp-smime.ini2
-rw-r--r--kopano-webapp-spellchecker.ini1
-rw-r--r--kopano-webapp.conf34
-rw-r--r--kopano-webapp.ini3
-rw-r--r--kopano-webapp.install22
-rw-r--r--nginx-location.conf45
-rw-r--r--nginx-ssl.example.conf56
-rw-r--r--php-fpm.example.conf6
13 files changed, 945 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8757c47147e7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,181 @@
+pkgbase = kopano-webapp
+ pkgdesc = WebApp for Kopano
+ pkgver = 3.4.12
+ pkgrel = 1
+ url = http://www.kopano.com/
+ arch = any
+ groups = zarafa
+ groups = kopano
+ groups = zarafa-webapp-plugins
+ license = AGPL3
+ makedepends = apache-ant
+ makedepends = gettext
+ makedepends = libxml2
+ makedepends = git
+ depends = php
+ depends = nginx
+ depends = php-fpm
+ replaces = zarafa-webapp
+ replaces = zarafa-webapp-contactfax
+ replaces = zarafa-webapp-folderwidgets
+ replaces = zarafa-webapp-gmaps
+ replaces = zarafa-webapp-pimfolder
+ replaces = zarafa-webapp-quickitems
+ replaces = zarafa-webapp-titlecounter
+ replaces = zarafa-webapp-webappmanual
+ replaces = zarafa-webapp-zdeveloper
+ replaces = zarafa-webapp-files
+ replaces = zarafa-webapp-filepreview
+ replaces = zarafa-webapp-smime
+ source = git+https://stash.kopano.io/scm/kw/kopano-webapp.git#tag=v3.4.12
+ source = nginx-location.conf
+ source = nginx-ssl.example.conf
+ source = php-fpm.example.conf
+ source = kopano-webapp.conf
+ source = kopano-webapp.ini
+ source = kopano-webapp.install
+ source = compress-static
+ source = kopano-webapp-files::git+https://stash.kopano.io/scm/kwa/files.git#tag=v2.1.2-final
+ source = kopano-webapp-filesbackendOwncloud::git+https://stash.kopano.io/scm/kwa/files-owncloud-backend.git#tag=v2.0.0
+ source = kopano-webapp-filesbackendSMB::git+https://stash.kopano.io/scm/kwa/files-smb-backend.git#tag=v2.0.0
+ source = kopano-webapp-files.ini
+ source = kopano-webapp-filepreviewer::git+https://stash.kopano.io/scm/kwa/filepreviewer.git#tag=v2.0.0
+ source = kopano-webapp-smime::git+https://stash.kopano.io/scm/kwa/smime.git#tag=v2.2.0-beta.2
+ source = kopano-webapp-smime.ini
+ source = kopano-webapp-desktopnotifications::git+https://stash.kopano.io/scm/kwa/desktopnotifications.git#tag=v2.0.1
+ source = kopano-webapp-intranet::git+https://stash.kopano.io/scm/kwa/intranet.git
+ source = kopano-webapp-mdm::git+https://stash.kopano.io/scm/kwa/mobile-device-management.git#tag=v2.1.0-beta.3
+ source = kopano-webapp-spellchecker::git+https://stash.kopano.io/scm/kwa/spellchecker.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker.ini
+ source = kopano-webapp-spellchecker-languagepack-german-at::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-at.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-german-ch::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-ch.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-german-de::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-de.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-english-gb::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-en-gb.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-english-us::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-en-us.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-spanish::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-es-es.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-french::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-fr-fr.git#tag=v2.0.0
+ source = kopano-webapp-spellchecker-languagepack-italian-it::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-italian-it.git
+ source = kopano-webapp-spellchecker-languagepack-dutch::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-nl.git#tag=v2.0.0
+ source = kopano-webapp-passwd::git+https://github.com/mpietruschka/kopano-webapp-passwd.git#tag=v1.4.1
+ source = kopano-webapp-fetchmail::git+https://github.com/mpietruschka/kopano-webapp-fetchmail.git#tag=1.2
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = kopano-webapp
+ install = kopano-webapp.install
+ replaces = zarafa-webapp
+ backup = etc/webapps/kopano-webapp/debug.php
+ backup = etc/webapps/kopano-webapp/config.php
+ backup = etc/webapps/kopano-webapp/nginx-location.conf
+ backup = etc/php/conf.d/kopano-webapp.ini
+ backup = etc/php/fpm.d/kopano-webapp.conf
+
+pkgname = kopano-webapp-contactfax
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-folderwidgets
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-gmaps
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-pimfolder
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-quickitems
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-titlecounter
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-webappmanual
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-zdeveloper
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-files
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-filepreviewer
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-smime
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-desktopnotifications
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-intranet
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-mdm
+ depends = kopano-webapp
+ depends = z-push
+
+pkgname = kopano-webapp-spellchecker
+ depends = kopano-webapp
+ depends = php-enchant
+
+pkgname = kopano-webapp-spellchecker-languagepack-german-at
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-german-ch
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-german-de
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-english-gb
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-english-us
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-spanish
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-french
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-italian-it
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-spellchecker-languagepack-dutch
+ depends = kopano-webapp-spellchecker
+
+pkgname = kopano-webapp-passwd
+ depends = kopano-webapp
+
+pkgname = kopano-webapp-fetchmail
+ depends = kopano-webapp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fdf2dfa9c21e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,558 @@
+# Maintainer: MartiMcFly <martimcfly [at] autorisation.de>
+# Contributor: Archist archist@die-optimisten.net
+
+# according to https://wiki.archlinux.org/index.php/Web_application_package_guidelines
+pkgname=(
+ 'kopano-webapp'
+ 'kopano-webapp-contactfax'
+ 'kopano-webapp-folderwidgets'
+ 'kopano-webapp-gmaps'
+ 'kopano-webapp-pimfolder'
+ 'kopano-webapp-quickitems'
+ 'kopano-webapp-titlecounter'
+ 'kopano-webapp-webappmanual'
+ 'kopano-webapp-zdeveloper'
+
+ # STANDALONE PLUGINS
+
+ 'kopano-webapp-files'
+# 'kopano-webapp-filesbackendOwncloud'
+# 'kopano-webapp-filesbackendSMB'
+ 'kopano-webapp-filepreviewer'
+ 'kopano-webapp-smime'
+ 'kopano-webapp-desktopnotifications'
+ 'kopano-webapp-intranet'
+ 'kopano-webapp-mdm'
+ 'kopano-webapp-spellchecker'
+ 'kopano-webapp-spellchecker-languagepack-german-at'
+ 'kopano-webapp-spellchecker-languagepack-german-ch'
+ 'kopano-webapp-spellchecker-languagepack-german-de'
+ 'kopano-webapp-spellchecker-languagepack-english-gb'
+ 'kopano-webapp-spellchecker-languagepack-english-us'
+ 'kopano-webapp-spellchecker-languagepack-spanish'
+ 'kopano-webapp-spellchecker-languagepack-french'
+ 'kopano-webapp-spellchecker-languagepack-italian-it'
+ 'kopano-webapp-spellchecker-languagepack-dutch'
+ 'kopano-webapp-passwd'
+ 'kopano-webapp-fetchmail'
+ )
+
+replaces=(
+ 'zarafa-webapp'
+ 'zarafa-webapp-contactfax'
+ 'zarafa-webapp-folderwidgets'
+ 'zarafa-webapp-gmaps'
+ 'zarafa-webapp-pimfolder'
+ 'zarafa-webapp-quickitems'
+ 'zarafa-webapp-titlecounter'
+ 'zarafa-webapp-webappmanual'
+ 'zarafa-webapp-zdeveloper'
+
+ 'zarafa-webapp-files'
+ 'zarafa-webapp-filepreview'
+ 'zarafa-webapp-smime'
+ )
+
+groups=(
+ 'zarafa'
+ 'kopano'
+ 'zarafa-webapp-plugins'
+ )
+
+# All versions have to be this way => x.x.x
+#
+pkgver=3.4.12
+pkgrel=1
+
+# Tag doesn't work with arch versioning
+_pkgverfiles="2.1.2"
+_pkgverfiles_tag="2.1.2-final"
+###
+_pkgverfilesowncloudbackend="2.0.0"
+_pkgverfilessmbbackend="2.0.0"
+_pkgverfilepreviewer="2.0.0"
+# Tag doesn't work with arch versioning
+_pkgversmime="2.2.0"
+_pkgversmime_tag="2.2.0-beta.2"
+###
+_pkgverdesktopnotifications="2.0.1"
+_pkgverintranet="1.0.0"
+# Tag doesn't work with arch versioning
+_pkgvermobiledevicemanagement="2.1.0"
+_pkgvermobiledevicemanagement_tag="2.1.0-beta.3"
+###
+_pkgverspellchecker="2.0.0"
+_pkgverpasswd="1.4.1"
+_pkgverfetchmail="1.2"
+
+
+pkgdesc='WebApp for Kopano'
+arch=('any')
+url='http://www.kopano.com/'
+license=('AGPL3')
+depends=(
+ 'php'
+ 'nginx'
+ 'php-fpm'
+ )
+
+makedepends=(
+ 'apache-ant'
+ 'gettext'
+ 'libxml2'
+ 'git'
+ )
+
+source=("git+https://stash.kopano.io/scm/kw/kopano-webapp.git#tag=v${pkgver}"
+ "nginx-location.conf"
+ "nginx-ssl.example.conf"
+ "php-fpm.example.conf"
+ "kopano-webapp.conf"
+ "kopano-webapp.ini"
+ "kopano-webapp.install"
+ "compress-static"
+
+ # STANDALONE PLUGINS
+
+ "kopano-webapp-files::git+https://stash.kopano.io/scm/kwa/files.git#tag=v$_pkgverfiles_tag"
+ "kopano-webapp-filesbackendOwncloud::git+https://stash.kopano.io/scm/kwa/files-owncloud-backend.git#tag=v$_pkgverfilesowncloudbackend"
+ "kopano-webapp-filesbackendSMB::git+https://stash.kopano.io/scm/kwa/files-smb-backend.git#tag=v$_pkgverfilessmbbackend"
+ "kopano-webapp-files.ini"
+ "kopano-webapp-filepreviewer::git+https://stash.kopano.io/scm/kwa/filepreviewer.git#tag=v$_pkgverfilepreviewer"
+ "kopano-webapp-smime::git+https://stash.kopano.io/scm/kwa/smime.git#tag=v$_pkgversmime_tag"
+ "kopano-webapp-smime.ini"
+ "kopano-webapp-desktopnotifications::git+https://stash.kopano.io/scm/kwa/desktopnotifications.git#tag=v$_pkgverdesktopnotifications"
+ "kopano-webapp-intranet::git+https://stash.kopano.io/scm/kwa/intranet.git" # No Tags #tag=$_pkgverintranet"
+ "kopano-webapp-mdm::git+https://stash.kopano.io/scm/kwa/mobile-device-management.git#tag=v$_pkgvermobiledevicemanagement_tag"
+ "kopano-webapp-spellchecker::git+https://stash.kopano.io/scm/kwa/spellchecker.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker.ini"
+ "kopano-webapp-spellchecker-languagepack-german-at::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-at.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-german-ch::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-ch.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-german-de::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-de-de.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-english-gb::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-en-gb.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-english-us::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-en-us.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-spanish::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-es-es.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-french::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-fr-fr.git#tag=v$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-italian-it::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-italian-it.git" # No Tags #tag=$_pkgverspellchecker"
+ "kopano-webapp-spellchecker-languagepack-dutch::git+https://stash.kopano.io/scm/kwa/spellchecker-languagepack-nl.git#tag=v$_pkgverspellchecker"
+# "kopano-webapp-passwd::git+https://github.com/apio-sys/kopano-webapp-passwd.git#tag=v$_pkgverpasswd"
+ "kopano-webapp-passwd::git+https://github.com/mpietruschka/kopano-webapp-passwd.git#tag=v$_pkgverpasswd"
+# "kopano-webapp-fetchmail::git+https://github.com/olia-dev/kopano-webapp-fetchmail#tag=$_pkgverfetchmail"
+ "kopano-webapp-fetchmail::git+https://github.com/mpietruschka/kopano-webapp-fetchmail.git#tag=$_pkgverfetchmail"
+ )
+
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+
+ # STANDALONE PLUGINS
+
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
+
+build() {
+ # create translations, compress javascript-files
+ cd ${srcdir}/kopano-webapp
+ ant deploy
+ ant deploy-plugins
+
+ # antdeploy-plugins leads to errors
+ # execution one by one
+ cd ${srcdir}
+ for f in kopano-webapp-*; do
+ if [ -d "$f" ];
+ then
+ ## Standalone plugins seem not ment to be compiled
+ #dest="kopano-webapp/deploy/plugins/${f//kopano-webapp-/}"
+ #mv $f $dest
+
+ dest="kopano-webapp/plugins/${f//kopano-webapp-/}"
+ mv $f $dest
+ cd $dest
+ ant deploy -Droot-folder="$(pwd)/../../" -Dtarget-folder="$(pwd)/../../deploy/plugins"
+ cd ${srcdir}
+ fi
+ done
+}
+
+package_kopano-webapp() {
+ cd ${srcdir}/kopano-webapp/deploy
+
+ # application
+ install="${pkgname}.install"
+ replaces=('zarafa-webapp')
+
+ mkdir -p ${pkgdir}/usr/share/webapps/${pkgname}/
+ cp -r * ${pkgdir}/usr/share/webapps/${pkgname}/
+ cp ${srcdir}/kopano-webapp/.htaccess ${pkgdir}/usr/share/webapps/${pkgname}/
+
+ rm -R ${pkgdir}/usr/share/webapps/${pkgname}/plugins/*
+ rm ${pkgdir}/usr/share/webapps/${pkgname}/kopano-webapp.conf
+ rm ${pkgdir}/usr/share/webapps/${pkgname}/config.php.dist
+ rm ${pkgdir}/usr/share/webapps/${pkgname}/debug.php.dist
+
+ # set version
+ echo "${pkgver}" > ${pkgdir}/usr/share/webapps/${pkgname}/version
+
+ ## precompress for nginx
+ ${srcdir}/compress-static ${pkgdir}/usr/share/webapps/${pkgname}
+
+
+ # config
+ backup=("etc/webapps/${pkgname}/debug.php"
+ "etc/webapps/${pkgname}/config.php"
+ "etc/webapps/${pkgname}/nginx-location.conf"
+ "etc/php/conf.d/${pkgname}.ini"
+ "etc/php/fpm.d/${pkgname}.conf")
+
+ mkdir -p ${pkgdir}/etc/webapps/${pkgname}
+
+ ## config examples
+ cp ${srcdir}/php-fpm.example.conf ${pkgdir}/etc/webapps/${pkgname}/
+ cp ${srcdir}/nginx-ssl.example.conf ${pkgdir}/etc/webapps/${pkgname}/
+ cp ${srcdir}/nginx-location.conf ${pkgdir}/etc/webapps/${pkgname}/
+ cp kopano-webapp.conf ${pkgdir}/etc/webapps/${pkgname}/apache.example.conf
+
+ ## config mains
+ cp config.php.dist ${pkgdir}/etc/webapps/${pkgname}/config.example.php
+ cp debug.php.dist ${pkgdir}/etc/webapps/${pkgname}/debug.example.php
+ sed -i -e 's|\(\"DEBUG_LOADER\", \).*$|\1LOAD_RELEASE);|' ${pkgdir}/etc/webapps/${pkgname}/debug.example.php
+
+ ln -s /etc/webapps/${pkgname}/config.php ${pkgdir}/usr/share/webapps/${pkgname}/config.php
+
+ ## php
+ mkdir -p ${pkgdir}/etc/php/conf.d
+ cp ${srcdir}/${pkgname}.ini ${pkgdir}/etc/php/conf.d
+
+ ## php-fpm
+ mkdir -p ${pkgdir}/etc/php/fpm.d
+ cp ${srcdir}/${pkgname}.conf ${pkgdir}/etc/php/fpm.d
+
+ # /var/lib
+ installdir http:http 0700 0600 ${pkgdir}/var/lib/${pkgname}
+ installdir http:http 0700 0600 ${pkgdir}/var/lib/${pkgname}/plugins
+
+ # /var/logs
+ installdir http:http 0700 0600 ${pkgdir}/var/log/${pkgname}
+ touch ${pkgdir}/var/log/${pkgname}/debug.txt
+ ln -s /var/log/${pkgname}/debug.txt ${pkgdir}/usr/share/webapps/${pkgname}/debug.txt
+}
+
+package_kopano-webapp-contactfax() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+
+package_kopano-webapp-folderwidgets() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-gmaps() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-pimfolder() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-quickitems() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-titlecounter() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-webappmanual() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-zdeveloper() {
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+
+# STANDALONE PLUGINS
+#
+# Avoid wrong version by assigning version to each plugin
+#
+
+package_kopano-webapp-files() {
+ pkgver="$_pkgverfiles"
+ depends=('kopano-webapp')
+
+ pluginname="${pkgname//kopano-webapp-/}"
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname
+
+ ## perform settings
+ sed -i -e "s|\(PLUGIN_FILESBROWSER_LOGLEVEL', \)\(.*\)\();$\)|\1'ERROR'\3|" config.php
+ sed -i -e "s|\(PLUGIN_FILES_CACHE_DIR', \)\(.*\)\();$\)|\1'/var/lib/kopano-webapp/plugins/files'\3|" config.php
+
+ package_plugin
+}
+
+package_kopano-webapp-filesbackendOwncloud() {
+ pkgver="$_pkgverfilesowncloudbackend"
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-filesbackendSMB() {
+ pkgver="$_pkgverfilessmbbackend"
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-filepreviewer() {
+ pkgver="$_pkgverfilepreviewer"
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+
+package_kopano-webapp-smime() {
+ pkgver="$_pkgversmime"
+ depends=('kopano-webapp')
+
+ pluginname="${pkgname//kopano-webapp-/}"
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname
+
+ ## perform settings
+ sed -i -e "s/\(PLUGIN_SMIME_CIPHER', \)\(.*\)\();$\)/\1OPENSSL_CIPHER_AES_256_CBC\3/" config.php
+# sed -i -e "s/\(PLUGIN_SMIME_CACERTS', \)\(.*\)\();$\)/\1\\'/etc/ssl/certs\\'\3/" config.php
+
+ package_plugin
+}
+
+package_kopano-webapp-desktopnotifications() {
+ pkgver="$_pkgverdesktopnotifications"
+ depends=('kopano-webapp')
+
+ pluginname="${pkgname//kopano-webapp-/}"
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname
+
+ ## perform settings
+ sed -i -e "s/\(PLUGIN_DESKTOPNOTIFICATION_USER_DEFAULT_ENABLE', \)\(.*\)\();$\)/\1true\3/" config.php
+
+ package_plugin
+}
+
+package_kopano-webapp-intranet() {
+ pkgver="$_pkgverintranet"
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+package_kopano-webapp-mdm() {
+ pkgver="$_pkgvermobiledevicemanagement"
+ depends=('kopano-webapp'
+ 'z-push')
+
+ pluginname="${pkgname//kopano-webapp-/}"
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname
+
+ ## perform settings
+ sed -i -e "s/\(PLUGIN_MDM_USER_DEFAULT_ENABLE_MDM', \)\(.*\)\();$\)/\1true\3/" config.php
+ sed -i -e "s/\(PLUGIN_MDM_SERVER', \)\(.*\)\();$\)/\1'127.0.0.1:81'\3/" config.php
+ sed -i -e "s/\(PLUGIN_MDM_SERVER_SSL', \)\(.*\)\();$\)/\1false\3/" config.php
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp'
+ 'php-enchant')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-german-at() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-german-ch() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-german-de() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-english-gb() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-english-us() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-spanish() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-french() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-italian-it() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-spellchecker-languagepack-dutch() {
+ pkgver="$_pkgverspellchecker"
+ depends=('kopano-webapp-spellchecker')
+
+ package_plugin
+}
+
+package_kopano-webapp-passwd() {
+ pkgver="$_pkgverpasswd"
+ depends=('kopano-webapp')
+
+ pluginname="${pkgname//kopano-webapp-/}"
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname
+
+ ## perform settings
+ sed -i -e "s/\(PLUGIN_PASSWD_USER_DEFAULT_ENABLE', \)\(.*\)\();$\)/\1true\3/" config.php
+
+ package_plugin
+}
+
+package_kopano-webapp-fetchmail() {
+ pkgver="$_pkgverfetchmail"
+ depends=('kopano-webapp')
+ package_plugin
+}
+
+# FUNCTIONS
+
+package_plugin() {
+ pluginname=${pkgname//kopano-webapp-/}
+
+ ## override pluginname
+ #if [[ ! -z "$1" ]];
+ #then
+ # pluginname="$1"
+ #fi
+
+ cd ${srcdir}/kopano-webapp/deploy/plugins/$pluginname/
+
+ groups=('kopano'
+ 'kopano-webapp-plugins')
+
+ # /usr/share
+ mkdir -p ${pkgdir}/usr/share/webapps/kopano-webapp/plugins/${pluginname}/
+ cp -R * ${pkgdir}/usr/share/webapps/kopano-webapp/plugins/${pluginname}/
+ rm -f ${pkgdir}/usr/share/webapps/kopano-webapp/plugins/${pluginname}/config.php
+ ${srcdir}/compress-static ${pkgdir}/usr/share/webapps/kopano-webapp/plugins/${pluginname}/
+
+ # /var/lib
+ installdir http:http 0700 0600 ${pkgdir}/var/lib/kopano-webapp/plugins/${pluginname}
+
+ # /etc
+ if [[ -e "config.php" ]];
+ then
+ backup=("etc/webapps/kopano-webapp/plugins/${pluginname}/config.php")
+
+ ## perform settings
+ # convert windows line break to unix: http://stackoverflow.com/questions/11680815/removing-windows-newlines-on-linux-sed-vs-awk
+ sed -i -e $'s/\r//' config.php
+
+ mkdir -p ${pkgdir}/etc/webapps/kopano-webapp/plugins/${pluginname}/
+
+ ## config mains
+ cp config.php ${pkgdir}/etc/webapps/kopano-webapp/plugins/${pluginname}/config.php
+ ln -s /etc/webapps/kopano-webapp/plugins/${pluginname}/config.php ${pkgdir}/usr/share/webapps/kopano-webapp/plugins/${pluginname}/config.php
+
+ ## config examples
+ cp ${pkgdir}/etc/webapps/kopano-webapp/plugins/${pluginname}/config.php ${pkgdir}/etc/webapps/kopano-webapp/plugins/${pluginname}/config.example.php
+ fi
+
+ if [[ -e "${srcdir}/${pkgname}.ini" ]];
+ then
+ ## php
+ mkdir -p ${pkgdir}/etc/php/conf.d
+ cp ${srcdir}/${pkgname}.ini ${pkgdir}/etc/php/conf.d
+ fi
+
+ if [[ -e "${srcdir}/${pkgname}.install" ]];
+ then
+ ${pkgname}.install
+ else
+ install=""
+ fi
+}
+
+installdir() {
+ local owner="$1"
+ local moddir="$2"
+ local modfile="$3"
+ local directory="$4"
+
+ mkdir -p "$directory"
+ find $directory -exec chown "$owner" {} \;
+ find $directory -type f -exec chmod "$modfile" {} \;
+ find $directory -type d -exec chmod "$moddir" {} \;
+}
+
diff --git a/compress-static b/compress-static
new file mode 100755
index 000000000000..1dda2f4699b8
--- /dev/null
+++ b/compress-static
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+LOCATION=$1
+FILES="htm|css|html|js"
+
+process() {
+ FILE="$1"
+
+ if [ -f "$FILE".gz ]
+ then
+ FILE_ORIG=$(stat -c %Y "$FILE")
+ FILE_GZIP=$(stat -c %Y "$FILE".gz)
+ if [ $FILE_ORIG -gt $FILE_GZIP ]
+ then
+ rm "$FILE".gz
+ gzip -k -9 "$FILE"
+ if [ "$DEBUG" == 1 ]
+ then
+ echo "Deleted old .gz and created new one at: $FILE.gz"
+ sleep $SLEEP_DELAY
+ fi
+ else
+ if [ "$DEBUG" == 1 ]
+ then
+ echo "Skipping - Already up to date: $FILE.gz"
+ fi
+ fi
+ else
+ gzip -k -9 "$FILE"
+ echo "Created new: $FILE.gz"
+ fi
+}
+export -f process
+find $LOCATION -type f -regextype posix-extended -regex '.*\.('$FILES')' -exec /bin/bash -c 'process "{}"' \; \ No newline at end of file
diff --git a/kopano-webapp-files.ini b/kopano-webapp-files.ini
new file mode 100644
index 000000000000..ce3e3152daf4
--- /dev/null
+++ b/kopano-webapp-files.ini
@@ -0,0 +1,2 @@
+extension=curl
+#extension=memcached \ No newline at end of file
diff --git a/kopano-webapp-mdm.ini b/kopano-webapp-mdm.ini
new file mode 100644
index 000000000000..53fc2c0b37c6
--- /dev/null
+++ b/kopano-webapp-mdm.ini
@@ -0,0 +1 @@
+extension=soap \ No newline at end of file
diff --git a/kopano-webapp-smime.ini b/kopano-webapp-smime.ini
new file mode 100644
index 000000000000..c51a0ae1744d
--- /dev/null
+++ b/kopano-webapp-smime.ini
@@ -0,0 +1,2 @@
+extension=bcmath
+extension=curl
diff --git a/kopano-webapp-spellchecker.ini b/kopano-webapp-spellchecker.ini
new file mode 100644
index 000000000000..217330966f85
--- /dev/null
+++ b/kopano-webapp-spellchecker.ini
@@ -0,0 +1 @@
+extension=enchant \ No newline at end of file
diff --git a/kopano-webapp.conf b/kopano-webapp.conf
new file mode 100644
index 000000000000..1c1606e9502e
--- /dev/null
+++ b/kopano-webapp.conf
@@ -0,0 +1,34 @@
+[kopano-webapp]
+listen = /run/php-fpm/kopano-webapp.sock
+listen.owner = http
+listen.group = http
+listen.mode = 0666
+
+
+user = http
+group = http
+
+; 5 kopano-webapp users
+pm = ondemand
+pm.max_children = 15
+pm.max_requests = 500
+
+env[HOSTNAME] = $HOSTNAME
+env[PATH] = /usr/local/bin:/usr/bin:/bin
+env[TMP] = /tmp
+env[TMPDIR] = /tmp
+env[TEMP] = /tmp
+env[HOME] = /home
+
+php_flag[short_open_tag] = on
+php_flag[register_globals] = off
+php_flag[magic_quotes_gpc] = off
+php_flag[magic_quotes_runtime] = off
+
+; The maximum POST limit. To upload large files, this value must be larger than upload_max_filesize.
+php_admin_value[upload_max_filesize] = 30M
+php_admin_value[post_max_size] = 31M
+
+php_admin_value[open_basedir] = ${open_basedir}:/usr/share/webapps/kopano-webapp:/etc/webapps/kopano-webapp:/var/lib/kopano-webapp:/var/log/kopano-webapp:/usr/share/php/mapi
+php_admin_value[date.timezone] = Europe/Berlin
+php_admin_value[session.save_path] = /var/lib/kopano-webapp/tmp
diff --git a/kopano-webapp.ini b/kopano-webapp.ini
new file mode 100644
index 000000000000..416feb281957
--- /dev/null
+++ b/kopano-webapp.ini
@@ -0,0 +1,3 @@
+extension=mapi
+extension=iconv
+extension=gettext \ No newline at end of file
diff --git a/kopano-webapp.install b/kopano-webapp.install
new file mode 100644
index 000000000000..08d47de1c5c9
--- /dev/null
+++ b/kopano-webapp.install
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# care about existing files
+function installdir() {
+ local owner="$1"
+ local moddir="$2"
+ local modfile="$3"
+ local directory="$4"
+
+ mkdir -p "$directory"
+ find $directory -exec chown "$owner" {} \;
+ find $directory -type f -exec chmod "$modfile" {} \;
+ find $directory -type d -exec chmod "$moddir" {} \;
+}
+
+post_install() {
+ cp -n /etc/webapps/kopano-webapp/config.example.php /etc/webapps/kopano-webapp/config.php
+ cp -n /etc/webapps/kopano-webapp/debug.example.php /etc/webapps/kopano-webapp/debug.php
+
+ installdir http:http 0700 0600 /var/log/kopano-webapp
+ installdir http:http 0700 0600 /var/lib/kopano-webapp
+} \ No newline at end of file
diff --git a/nginx-location.conf b/nginx-location.conf
new file mode 100644
index 000000000000..cbf440f79555
--- /dev/null
+++ b/nginx-location.conf
@@ -0,0 +1,45 @@
+ ###
+ ## In order to run this component you need to define a server-context in.
+ ## /etc/nginx/nginx.conf:
+ ##
+ ## http {
+ ## server {
+ ## listen 80;
+ ## include ${PATH_TO_THIS_LOCATION_FILE};
+ ## }
+ ## }
+ ##
+ ## Or include this file in your existing server-context.
+ ##
+ location /kopano-webapp {
+ root /usr/share/webapps;
+ index index.php;
+
+ gzip_static on;
+ gzip_vary on;
+
+ ## [WARNING] The following header states that the browser should only communicate
+ ## with your server over a secure connection for the next 24 months.
+ add_header Strict-Transport-Security max-age=63072000;
+ add_header X-Frame-Options SAMEORIGIN;
+ add_header X-Content-Type-Options nosniff;
+
+ # HIDDEN FILES AND FOLDERS
+ rewrite ^(.*)\/\.(.*)$ @404 break;
+
+ ## Increase this if you want to upload large attachments
+ client_max_body_size 20m;
+
+ # Pass PHP scripts to PHP-FPM
+ location ~* \.php$ {
+ if (!-f $request_filename) {
+ return 404;
+ }
+
+ fastcgi_index index.php;
+ fastcgi_pass unix:/run/php-fpm/kopano-webapp.sock;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param SCRIPT_NAME $fastcgi_script_name;
+ }
+ } \ No newline at end of file
diff --git a/nginx-ssl.example.conf b/nginx-ssl.example.conf
new file mode 100644
index 000000000000..aba9f0c5f266
--- /dev/null
+++ b/nginx-ssl.example.conf
@@ -0,0 +1,56 @@
+
+ server {
+ # server_name YOUR_SERVER_FQDN; ## uncomment replace this with something like www.example.com
+ listen 443;
+
+ server_tokens off; ## Don't show the nginx version number, a security best practice
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+
+ ## Strong SSL Security
+ ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html & https://cipherli.st/
+ ##
+ ## Generate a strong SSL-Certificate and DHE parameter:
+ ## openssl genrsa -out /etc/ssl/private/kopano.key 4096
+ ## openssl req -new -sha512 -key /etc/ssl/private/kopano.key -out /tmp/kopano.csr
+ ## openssl x509 -req -days 3650 -in /tmp/kopano.csr -signkey /etc/ssl/private/kopano.key -out /etc/ssl/private/kopano.crt
+ ## openssl dhparam -out /etc/ssl/private/kopano.dh 4096
+ ## chmod go-rwx /etc/ssl/private/kopano.*;
+ ## chmod u+rw /etc/ssl/private/kopano.*
+ ## chown root:root /etc/ssl/private/kopano.*
+ ##
+ ssl on;
+ ssl_certificate_key /etc/ssl/private/kopano.key;
+ ssl_certificate /etc/ssl/private/kopano.crt;
+ ssl_dhparam /etc/ssl/private/kopano.dh;
+
+ ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
+ ## The recommended cipher suite for backwards compatibility (IE6/WinXP):
+ ssl_ciphers 'AES256+EECDH:AES256+EDH:!aNULL';
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_prefer_server_ciphers on;
+ ssl_session_cache shared:SSL:50m;
+ ssl_session_timeout 5m;
+
+ ## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL.
+ ## Replace with your ssl_trusted_certificate. For more info see:
+ ## - https://medium.com/devops-programming/4445f4862461
+ ## - https://www.ruby-forum.com/topic/4419319
+ ## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
+ ## - https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html
+ ## - http://freiburg79.de/ocsp-stapling-mit-nginx/
+ # ssl_stapling on;
+ # ssl_stapling_verify on;
+ # ssl_stapling_file /etc/ssl/private/de-autorisation-m.ocsp;
+ # resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired
+ # resolver_timeout 5s;
+
+ # HIDDEN FILES AND FOLDERS
+ rewrite ^(.*)\/\.(.*)$ @404 break;
+
+ location = @404 {
+ return 404;
+ }
+
+ include ${PATH_TO_ATTACHED_LOCATION_FILE};
+ } \ No newline at end of file
diff --git a/php-fpm.example.conf b/php-fpm.example.conf
new file mode 100644
index 000000000000..1dcbc0fcf1f6
--- /dev/null
+++ b/php-fpm.example.conf
@@ -0,0 +1,6 @@
+include = /etc/php/fpm.d/*.conf
+
+[global]
+pid = /run/php-fpm/php-fpm.pid
+error_log = syslog
+log_level = notice \ No newline at end of file