%define oname %{name}-%{version}-dep Name: roundcubemail Version: 0.9.4 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 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 database: MariaDB, PostgreSQL and SQLite are known to work. The user interface is fully skinnable using XHTML and CSS 2. %prep %setup -q -n %{oname} # tell it that we're moving the configuration files for i in installer/index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php; do \ sed -i -e "s,INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" $i; sed -i -e "s,RCUBE_INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" $i; done # fixup paths to use the right paths and fix carriage returns sed -i 's,temp/,%{_tmppath},' config/main.inc.php.dist sed -i 's,config/,%{_sysconfdir}/%{name}/,' config/main.inc.php.dist sed -i 's,logs/,%{_logdir}/%{name}/,' config/main.inc.php.dist sed -i 's/\r//' SQL/mssql.initial.sql %build %install 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 cp -a * %{buildroot}%{_datadir}/%{name} 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 <