%define oname %{name}-%{version}-dep Name: roundcubemail Version: 0.8.6 Release: %mkrel 1 Summary: A PHP-based webmail server Group: System/Servers License: GPLv3 # Use the -dep tarballs. These use system copies of the PHP stuff # rather than including them, which is better for our purposes. # - AdamW 2007/07 URL: http://www.roundcube.net/ Source0: http://downloads.sourceforge.net/%{name}/%{oname}.tar.gz Patch0: roundcubemail-0.8.1-strict.patch Epoch: 1 #BuildRequires: apache-devel pcre-devel rpm-helper Requires: apache-mod_php Requires: php-gd Requires: php-gettext Requires: php-iconv Requires: php-mbstring Requires: php-mcrypt Requires: php-openssl Requires: php-session Requires: php-pdo_mysql Requires: php-pear-Auth_SASL Requires: php-pear-Mail_Mime Requires: php-pear-Net_SMTP Requires: php-pear-Net_LDAP2 Requires: php-pear-MDB2 Requires: php-pear-Net_IDNA2 # The installer suggests the use of these, but they're not # required - AdamW 2011/01 Suggests: php-fileinfo Suggests: php-intl # Most people will probably use mysql, but you can use sqlite or # pgsql, so not a hard require - AdamW 2008/10 Suggests: php-pear-MDB2_Driver_mysql BuildArch: noarch %description RoundCube Webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking. RoundCube Webmail is written in PHP and requires a MySQL or PostgreSQL database. The user interface is fully skinnable using XHTML and CSS 2. %prep %setup -q -n %{oname} %apply_patches %build %install # tell it that we're moving the configuration files for i in installer/index.php program/include/iniset.php; do \ sed -i \ -e "s,INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" \ $i; \ done # use systemwide log dir and temp dir sed -i \ -e 's,logs/,%{_logdir}/%{name}/,g' \ -e 's,temp/,/tmp/,g' \ config/main.inc.php.dist mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_sysconfdir}/%{name} mkdir -p %{buildroot}%{_logdir}/%{name} cp -a config/db.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/db.inc.php cp -a config/main.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/main.inc.php rm -rf config rm -rf temp rm -rf logs cp -a * %{buildroot}%{_datadir}/%{name} pushd %{buildroot}%{_datadir}/%{name} rm -f CHANGELOG INSTALL UPGRADING LICENSE README popd mkdir -p %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf < AllowOverride All Require all granted AllowOverride All Require all granted php_value suhosin.session.encrypt Off EOF cat > README.urpmi <