diff --git a/roundcubemail-httpd.conf b/roundcubemail-httpd.conf
index d7a2376..34699d6 100644
--- a/roundcubemail-httpd.conf
+++ b/roundcubemail-httpd.conf
@@ -9,6 +9,7 @@
+ Alias /roundcube "__ROUNDCUBEPATH__/public_html"
Alias /roundcubemail "__ROUNDCUBEPATH__/public_html"
@@ -37,53 +38,11 @@ AddType text/x-component .htc
- php_flag display_errors Off
- php_flag log_errors On
- #php_value error_log logs/errors
-
- php_value upload_max_filesize 5M
- php_value post_max_size 6M
- php_value memory_limit 64M
-
- php_flag register_globals Off
- php_flag zlib.output_compression Off
- php_flag magic_quotes_gpc Off
- php_flag magic_quotes_runtime Off
- php_flag suhosin.session.encrypt Off
-
- #php_value session.cookie_path /
- #php_value session.hash_function sha256
- php_flag session.auto_start Off
- php_value session.gc_maxlifetime 21600
- php_value session.gc_divisor 500
- php_value session.gc_probability 1
- # http://bugs.php.net/bug.php?id=30766
- php_value mbstring.func_overload 0
+ Include @apache_sysconfdir@/conf.d/@name@.inc
- php_flag display_errors Off
- php_flag log_errors On
- #php_value error_log logs/errors
-
- php_value upload_max_filesize 5M
- php_value post_max_size 6M
- php_value memory_limit 64M
-
- php_flag register_globals Off
- php_flag zlib.output_compression Off
- php_flag magic_quotes_gpc Off
- php_flag magic_quotes_runtime Off
- php_flag suhosin.session.encrypt Off
-
- #php_value session.cookie_path /
- #php_value session.hash_function sha256
- php_flag session.auto_start Off
- php_value session.gc_maxlifetime 21600
- php_value session.gc_divisor 500
- php_value session.gc_probability 1
- # http://bugs.php.net/bug.php?id=30766
- php_value mbstring.func_overload 0
+ Include @apache_sysconfdir@/conf.d/@name@.inc
diff --git a/roundcubemail-httpd.inc b/roundcubemail-httpd.inc
new file mode 100644
index 0000000..7e9b5ed
--- /dev/null
+++ b/roundcubemail-httpd.inc
@@ -0,0 +1,22 @@
+php_admin_flag display_errors off
+php_admin_flag log_errors on
+#php_admin_value error_log logs/errors
+
+php_admin_flag magic_quotes_gpc off
+php_admin_flag magic_quotes_runtime off
+php_admin_flag register_globals off
+php_admin_flag suhosin.session.encrypt off
+php_admin_flag zlib.output_compression off
+
+php_admin_value upload_max_filesize 5M
+php_admin_value post_max_size 6M
+php_admin_value memory_limit 64M
+
+php_admin_flag session.auto_start off
+#php_admin_value session.cookie_path /
+#php_admin_value session.hash_function sha256
+php_admin_value session.gc_maxlifetime 21600
+php_admin_value session.gc_divisor 500
+php_admin_value session.gc_probability 1
+# http://bugs.php.net/bug.php?id=30766
+php_admin_value mbstring.func_overload 0
diff --git a/roundcubemail.changes b/roundcubemail.changes
index 7951b21..249285f 100644
--- a/roundcubemail.changes
+++ b/roundcubemail.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Fri Jul 3 18:43:00 UTC 2020 - chris@computersalat.de
+
+- add http.inc file
+ * include one file for php5/php7 admin flags/values
+
-------------------------------------------------------------------
Sun Jun 7 14:27:25 UTC 2020 - Michael Ströder
diff --git a/roundcubemail.spec b/roundcubemail.spec
index 654cc0a..9574259 100644
--- a/roundcubemail.spec
+++ b/roundcubemail.spec
@@ -28,13 +28,14 @@ Summary: A browser-based multilingual IMAP client
License: GPL-3.0-or-later AND GPL-2.0-only AND BSD-3-Clause
Group: Productivity/Networking/Email/Clients
URL: https://www.roundcube.net/
-Source0: https://github.com/roundcube/roundcubemail/releases/download/%{version}/%{name}-%{version}-complete.tar.gz
+Source0: https://github.com/roundcube/%{name}/releases/download/%{version}/%{name}-%{version}-complete.tar.gz
Source1: %{name}-rpmlintrc
Source2: %{name}-httpd.conf
+Source3: %{name}-httpd.inc
Source4: README.openSUSE
Source5: %{name}.logrotate
Source6: https://roundcube.net/download/pubkey.asc#/%{name}.keyring
-Source7: https://github.com/roundcube/roundcubemail/releases/download/%{version}/%{name}-%{version}-complete.tar.gz.asc
+Source7: https://github.com/roundcube/%{name}/releases/download/%{version}/%{name}-%{version}-complete.tar.gz.asc
Source8: robots.txt
# PATCH-FIX-OPENSUSE roundcubemail-1.1-beta-config_dir.patch -- use the general config directory /etc
Patch0: %{name}-%{version}-config_dir.patch
@@ -169,8 +170,12 @@ for file in _styles.less _variables.less ; do
done
# install httpd.conf file and adapt the configuration
-install -d -m 0755 %{buildroot}/%{apache_sysconfdir}/conf.d
-sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" %{SOURCE2} > %{buildroot}%{apache_sysconfdir}/conf.d/roundcubemail.conf
+install -D -m0644 %{SOURCE3} %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.inc
+# fix paths in http config
+sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" \
+ -e "s,@apache_sysconfdir@,%{apache_sysconfdir},g" \
+ -e "s,@name@,%{name},g" \
+%{SOURCE2} > %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf
# install docs
install -d -m 0755 %{buildroot}/%{_defaultdocdir}/%{name}
@@ -323,7 +328,8 @@ exit 0
%config %{roundcubeconfigpath}/config.inc.php.sample
%config %{roundcubeconfigpath}/defaults.inc.php
%config %{roundcubeconfigpath}/mimetypes.php
-%config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf
+%config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf
+%config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.inc
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{roundcubeconfigpath}/skins/elastic/styles/_styles.less
%config(noreplace) %{roundcubeconfigpath}/skins/elastic/styles/_variables.less