aboutsummaryrefslogtreecommitdiffstats
path: root/main/roundcubemail
diff options
context:
space:
mode:
Diffstat (limited to 'main/roundcubemail')
-rw-r--r--main/roundcubemail/APKBUILD19
-rw-r--r--main/roundcubemail/fix-dirs.patch50
2 files changed, 61 insertions, 8 deletions
diff --git a/main/roundcubemail/APKBUILD b/main/roundcubemail/APKBUILD
index 8c9344f91d..062ff16fdc 100644
--- a/main/roundcubemail/APKBUILD
+++ b/main/roundcubemail/APKBUILD
@@ -1,21 +1,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=roundcubemail
pkgver=0.5.2
-pkgrel=1
+pkgrel=2
pkgdesc="A PHP web-based mail client"
url="http://www.roundcube.net"
arch="noarch"
license="GPL"
install="$pkgname.post-upgrade"
-depends="php php-imap php-xml php-json"
+depends="php php-imap php-xml php-json php-dom"
makedepends=""
subpackages="$pkgname-installer"
-source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+ fix-dirs.patch"
_src="$srcdir"/roundcubemail-$pkgver
prepare() {
cd "$_src"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
# fix permissions
find . -type f -print | xargs chmod a-x
@@ -28,10 +34,6 @@ prepare() {
-e 's|logs/|/var/log/roundcube/|' \
config/main.inc.php.dist || return 1
- sed -i -e 's|logs/|/var/log/roundcube/|' \
- -e 's|config/|/etc/roundcube/|' \
- program/include/main.inc || return 1
-
# cleanup
sed -i 's/\r//' SQL/mssql.initial.sql
rm -rf logs temp
@@ -61,4 +63,5 @@ installer() {
"$subpkgdir"/usr/share/webapps/roundcube
}
-md5sums="7451ee4b3fdc89300e37c6fa9cd0f7b7 roundcubemail-0.5.2.tar.gz"
+md5sums="7451ee4b3fdc89300e37c6fa9cd0f7b7 roundcubemail-0.5.2.tar.gz
+db71db7b5489ac2d0e8d80a0a8b993e0 fix-dirs.patch"
diff --git a/main/roundcubemail/fix-dirs.patch b/main/roundcubemail/fix-dirs.patch
new file mode 100644
index 0000000000..e6b8ea9954
--- /dev/null
+++ b/main/roundcubemail/fix-dirs.patch
@@ -0,0 +1,50 @@
+diff --git a/program/include/iniset.php b/program/include/iniset.php
+index 92a2d90..5f7c0ad 100755
+--- a/program/include/iniset.php
++++ b/program/include/iniset.php
+@@ -46,7 +46,7 @@ if (!defined('INSTALL_PATH')) {
+ }
+
+ if (!defined('RCMAIL_CONFIG_DIR')) {
+- define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config');
++ define('RCMAIL_CONFIG_DIR', '/etc/roundcube');
+ }
+
+ // make sure path_separator is defined
+diff --git a/program/include/main.inc b/program/include/main.inc
+index 9206a62..85f9459 100644
+--- a/program/include/main.inc
++++ b/program/include/main.inc
+@@ -1178,7 +1178,7 @@ function write_log($name, $line)
+
+ // log_driver == 'file' is assumed here
+ if (empty($CONFIG['log_dir']))
+- $CONFIG['log_dir'] = INSTALL_PATH.'logs';
++ $CONFIG['log_dir'] = '/var/log/roundcube';
+
+ // try to open specific log file for writing
+ $logfile = $CONFIG['log_dir'].'/'.$name;
+diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
+index 19e1be3..d362487 100644
+--- a/program/include/rcube_config.php
++++ b/program/include/rcube_config.php
+@@ -66,7 +66,7 @@ class rcube_config
+
+ // fix paths
+ $this->prop['log_dir'] = $this->prop['log_dir'] ? realpath(unslashify($this->prop['log_dir'])) : INSTALL_PATH . 'logs';
+- $this->prop['temp_dir'] = $this->prop['temp_dir'] ? realpath(unslashify($this->prop['temp_dir'])) : INSTALL_PATH . 'temp';
++ $this->prop['temp_dir'] = $this->prop['temp_dir'] ? realpath(unslashify($this->prop['temp_dir'])) : '/tmp';
+
+ // fix default imap folders encoding
+ foreach (array('drafts_mbox', 'junk_mbox', 'sent_mbox', 'trash_mbox') as $folder)
+--- ./installer/index.php.orig
++++ ./installer/index.php
+@@ -4,7 +4,7 @@
+ ini_set('display_errors', 1);
+
+ define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/');
+-define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config');
++define('RCMAIL_CONFIG_DIR', '/etc/roundcube');
+
+ $include_path = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR;
+ $include_path .= INSTALL_PATH . 'program' . PATH_SEPARATOR;