summaryrefslogtreecommitdiffstats
path: root/roundcubemail.spec
diff options
context:
space:
mode:
Diffstat (limited to 'roundcubemail.spec')
-rw-r--r--roundcubemail.spec140
1 files changed, 77 insertions, 63 deletions
diff --git a/roundcubemail.spec b/roundcubemail.spec
index d0d3e56..0d9a599 100644
--- a/roundcubemail.spec
+++ b/roundcubemail.spec
@@ -8,6 +8,7 @@
# Please preserve changelog entries
#
+
%if 0%{?fedora} >= 21
# support for apache / nginx / php-fpm
%global with_phpfpm 1
@@ -19,8 +20,8 @@
%global roundcubedir %{_datadir}/roundcubemail
%global _logdir /var/log
Name: roundcubemail
-Version: 1.2.5
-Release: 2%{?dist}
+Version: 1.3.0
+Release: 1%{?dist}
Summary: Round Cube Webmail is a browser-based multilingual IMAP client
Group: Applications/System
@@ -37,15 +38,12 @@ Group: Applications/System
# http://www.tinymce.com/
License: GPLv3+ with exceptions and GPLv3+ and GPLv2 and LGPLv2+ and CC-BY-SA and (MIT or GPLv2)
URL: http://www.roundcube.net
-Source0: https://github.com/roundcube/roundcubemail/releases/download/%{version}%{?prever:-%{prever}}/roundcubemail-%{version}%{?prever:-%{prever}}.tar.gz
+Source0: https://github.com/roundcube/roundcubemail/releases/download/%{version}%{?prever:-%{prever}}/roundcubemail-%{version}%{?prever:-%{prever}}-complete.tar.gz
Source1: roundcubemail.httpd
Source3: roundcubemail.nginx
Source2: roundcubemail.logrotate
Source4: roundcubemail-README-rpm.txt
-# Elegantly handle removal of moxieplayer Flash binary in tinymce
-# media plugin (see "Drop precompiled flash" in %%prep)
-Patch0: roundcubemail-1.2.1-no_swf.patch
# Non-upstreamable: Adjusts config path to Fedora policy
Patch1: roundcubemail-1.2.1-confpath.patch
@@ -54,8 +52,11 @@ Patch1: roundcubemail-1.2.1-confpath.patch
# see https://github.com/roundcube/roundcubemail/pull/313
Patch2: roundcubemail-pr313.patch
+# Fix PHP 7 compatibility
+# see https://github.com/roundcube/roundcubemail/pull/5820
+Patch3: roundcubemail-pr5820.patch
+
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
%if %{with_phpfpm}
Requires: webserver
Requires: nginx-filesystem
@@ -69,6 +70,7 @@ Requires: php-curl
Requires: php-date
Requires: php-dom
Requires: php-fileinfo
+Requires: php-filter
Requires: php-gd
Requires: php-hash
Requires: php-iconv
@@ -78,7 +80,6 @@ Requires: php-ldap
Requires: php-mbstring
Requires: php-openssl
Requires: php-pcre
-Requires: php-posix
Requires: php-pdo
Requires: php-pspell
Requires: php-session
@@ -87,39 +88,38 @@ Requires: php-sockets
Requires: php-spl
Requires: php-xml
# From composer.json-dist, require
-# "php": ">=5.3.7",
+# "php": ">=5.4.0",
# "pear/pear-core-minimal": "~1.10.1",
+# "pear/net_socket": "~1.2.1",
+# "pear/auth_sasl": "~1.1.0",
+# "pear/net_idna2": "~0.2.0",
+# "pear/mail_mime": "~1.10.0",
+# "pear/net_smtp": "~1.7.1",
+# "pear/crypt_gpg": "~1.6.0",
+# "pear/net_sieve": "~1.4.0",
# "roundcube/plugin-installer": "~0.1.6",
-# "pear-pear.php.net/net_socket": "~1.0.12",
-# "pear-pear.php.net/auth_sasl": "~1.0.6",
-# "pear-pear.php.net/net_idna2": "~0.1.1",
-# "pear-pear.php.net/mail_mime": "~1.10.0",
-# "pear-pear.php.net/net_smtp": "~1.7.1",
-# "pear-pear.php.net/crypt_gpg": "~1.4.1",
-# "roundcube/net_sieve": "~1.5.0"
+# "endroid/qrcode": "~1.6.5"
# not available and doesn't make sense roundcube/plugin-installer
Requires: php-pear(PEAR) >= 1.10.1
-Requires: php-pear(Net_Socket) >= 1.0.12
-Requires: php-pear(Auth_SASL) >= 1.0.6
-Requires: php-pear(Net_IDNA2) >= 0.1.1
+Requires: php-pear(Net_Socket) >= 1.2.1
+Requires: php-pear(Auth_SASL) >= 1.1.0
+Requires: php-pear(Net_IDNA2) >= 0.2.0
Requires: php-pear(Mail_Mime) >= 1.10.0
Requires: php-pear(Net_SMTP) >= 1.7.1
-Requires: php-pear(Crypt_GPG) >= 1.4.2
-Requires: php-composer(roundcube/net_sieve) >= 1.5.0
+Requires: php-pear(Crypt_GPG) >= 1.6.0
+Requires: php-pear(Net_Sieve) >= 1.4.0
+Requires: php-composer(endroid/qrcode) < 2
+Requires: php-composer(endroid/qrcode) >= 1.6.5
# From composer.json-dist, suggest
-# "pear-pear.php.net/net_ldap2": "~2.2.0 required for connecting to LDAP address books",
-# "kolab/Net_LDAP3": "dev-master required for connecting to LDAP address books"
+# "pear/net_ldap2": "~2.2.0 required for connecting to LDAP",
+# "kolab/Net_LDAP3": "dev-master required for connecting to LDAP"
Requires: php-pear(Net_LDAP2) >= 2.2.0
Requires: php-composer(kolab/Net_LDAP3)
# mailcap for /etc/mime.types
Requires: mailcap
+# Autoloader
+Requires: php-composer(fedora/autoloader)
-# Optional deps
-# Spell check
-#Suggests: php-enchant
-# Caching
-#Suggests: php-apc
-#Suggests: php-memcache
# EXIF images
Requires: php-exif
# Upload progress (shock!)
@@ -127,10 +127,28 @@ Requires: php-exif
# ZIP download plugin
Requires: php-zip
+%if 0%{?fedora} >= 21
+# Optional deps
+# Spell check
+Suggests: php-enchant
+# Caching
+Suggests: php-apc
+Suggests: php-memcache
+Suggests: php-redis
# Gearman support
-#Optional: php-gearman
+Suggests: php-gearman
# PAM password support
#Optional: php-pam
+%endif
+
+# Bundled JS libraries
+# see https://github.com/roundcube/roundcubemail/blob/master/jsdeps.json
+Provides: bundled(js-jquery) = 3.2.1
+Provides: bundled(js-jstz) = 1.0.6
+Provides: bundled(js-publickey)
+Provides: bundled(js-tinymce) = 4.5.7
+Provides: bundled(js-openpgp) = 1.6.2
+Provides: bundled(js-codemirror) = 5.21.0
%description
@@ -146,25 +164,14 @@ CSS 2.
%prep
%setup -q -n roundcubemail-%{version}%{?prever:-%{prever}}
-%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# fix permissions and remove any .htaccess files
find . -type f -print | xargs chmod a-x
find . -name \.htaccess -print | xargs rm -f
-# Fix shebang
-chmod +x bin/*sh
-sed -e '/^#!/s:/usr/bin/env php:/usr/bin/php:' \
- -i bin/*sh
-
-# ??? - Jon, this could do with a comment; fixing carriage returns? (adamw)
-sed -i 's/\r//' SQL/mssql.initial.sql
-
-# Drop precompiled flash
-find . -type f -name '*.swf' -exec rm {} \; -print
-
# drop file from patch
find . -type f -name '*.orig' -exec rm {} \; -print
@@ -174,19 +181,19 @@ echo "CVE-2012-4230: removing tinymce bbcode plugin, check path if this fails."
test -d program/js/*mce/plugins/bbcode && rm -rf program/js/*mce/plugins/bbcode || exit 1
# Create simple autoloader for PEAR
-mkdir vendor
+rm -r vendor/*
cat << EOF | tee vendor/autoload.php
<?php
-spl_autoload_register(
- function (\$class) {
- if (strpos(\$class, '.') === false) {
- \$file = str_replace('_', '/', \$class).'.php';
- if (\$path = stream_resolve_include_path(\$file)) {
- require_once(\$path);
- }
- }
- }
-);
+/* Autoloader for php-phpmyadmin-sql-parser and its dependencies */
+require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
+
+# PEAR components
+\Fedora\Autoloader\Autoload::addPsr0('', '%{_datadir}/pear');
+
+# Composer components
+\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/Endroid/QrCode/autoload.php',
+]);
EOF
@@ -195,7 +202,6 @@ EOF
%install
-rm -rf %{buildroot}
install -d %{buildroot}%{roundcubedir}
cp -pr * %{buildroot}%{roundcubedir}
@@ -262,12 +268,7 @@ if [ -f %{_sysconfdir}/%{name}/main.inc.php ]; then
fi
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGELOG INSTALL README.md UPGRADING README-rpm.txt
@@ -296,6 +297,19 @@ rm -rf %{buildroot}
%changelog
+* Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+- open https://github.com/roundcube/roundcubemail/pull/5820 - PHP 7
+- add dependency on endroid/qrcode
+- raise dependency on Net_Socket 1.2.1
+- raise dependency on Auth_SASL 1.1.0
+- raise dependency on Net_IDNA2 0.2.0
+- raise dependency on Crypt_GPG 1.6.0
+- switch from roundcube/net_sieve to pear/Net_Sieve
+- switch to fedora/autoloader
+- add weak dependencies for optional components
+- use upstream complete archive for JS libraries
+
* Wed May 10 2017 Remi Collet <remi@remirepo.net> - 1.2.5-2
- rename README.rpm -> README-rpm.txt, fix #1449517
@@ -518,10 +532,10 @@ rm -rf %{buildroot}
* Wed Dec 14 2011 Adam Williamson <awilliam@redhat.com> - 0.7-1
- new upstream release
- drop all patches except confpath.patch:
- + html2text.patch and all CVE fixes were merged upstream
- + pg-mdb2.patch no longer necessary as all currently supported
- Fedora releases have a php-pear-MDB2-Driver-pgsql package new
- enough to work with this option
+ + html2text.patch and all CVE fixes were merged upstream
+ + pg-mdb2.patch no longer necessary as all currently supported
+ Fedora releases have a php-pear-MDB2-Driver-pgsql package new
+ enough to work with this option
* Fri Oct 07 2011 Jon Ciesla <limb@jcomserv.net> = 0.6-1
- New upstream.