blob: 2d05bf6a8af50e3e0d8e1f4514ab32cf78145bac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Maintainer: MartiMcFly martimcfly@autorisation.de
_pkgname=('delayeddelivery')
pkgname=("zarafa-webapp-${_pkgname}")
groups=('zarafa')
pkgver=1.0
pkgrel=39
pkgdesc='Delayeddelivery plugin for Zarafa Webapp'
arch=('any')
source=("https://download.zarafa.com/community/final/WebApp/2.1.2/fedora-22/zarafa-webapp-plugins-delayeddelivery-1.0-56.1.noarch.rpm"
"compress-static")
backup=("etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php")
license=('AGPL3')
depends=('zarafa-webapp'
'php<7'
'php-fpm<7')
md5sums=('538d405022102d8d00a899200a6a3369'
'd737d82dfab24adc516c001238a4119f')
package() {
# plugin
cd ${srcdir}/usr/share/zarafa-webapp/plugins/${_pkgname}
mkdir -p ${pkgdir}/usr/share/webapps/zarafa-webapp/plugins/${_pkgname}/
cp -R * ${pkgdir}/usr/share/webapps/zarafa-webapp/plugins/${_pkgname}/
rm -f ${pkgdir}/usr/share/webapps/zarafa-webapp/plugins/${_pkgname}/config.php
## precompress for nginx
${srcdir}/compress-static ${pkgdir}/usr/share/webapps/zarafa-webapp/plugins/${_pkgname}/
# config
cd ${srcdir}/etc/zarafa/webapp
mkdir -p ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/
## config mains
cp config-${_pkgname}.php ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php
ln -s /etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php ${pkgdir}/usr/share/webapps/zarafa-webapp/plugins/${_pkgname}/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//' ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php
sed -i -e "s/\(PLUGIN_DELAYEDDELIVERY_USER_DEFAULT_ENABLE', \)\(.*\)\();$\)/\1true\3/" ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php
## config examples
cp ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.php ${pkgdir}/etc/webapps/zarafa-webapp/plugins/${_pkgname}/config.example.php
}
|