1 |
%define oname %{name}-%{version}-dep |
2 |
|
3 |
Name: roundcubemail |
4 |
Version: 0.9.3 |
5 |
Release: %mkrel 1 |
6 |
Summary: A PHP-based webmail server |
7 |
Group: System/Servers |
8 |
License: GPLv3 |
9 |
# Use the -dep tarballs. These use system copies of the PHP stuff |
10 |
# rather than including them, which is better for our purposes. |
11 |
# - AdamW 2007/07 |
12 |
URL: http://www.roundcube.net/ |
13 |
Source0: http://downloads.sourceforge.net/%{name}/%{oname}.tar.gz |
14 |
Epoch: 1 |
15 |
#BuildRequires: apache-devel pcre-devel rpm-helper |
16 |
Requires: apache-mod_php |
17 |
Requires: php-gd |
18 |
Requires: php-gettext |
19 |
Requires: php-iconv |
20 |
Requires: php-mbstring |
21 |
Requires: php-mcrypt |
22 |
Requires: php-openssl |
23 |
Requires: php-session |
24 |
Requires: php-pdo_mysql |
25 |
Requires: php-pear-Auth_SASL |
26 |
Requires: php-pear-Mail_Mime |
27 |
Requires: php-pear-Net_SMTP |
28 |
Requires: php-pear-Net_LDAP2 |
29 |
Requires: php-pear-MDB2 |
30 |
Requires: php-pear-Net_IDNA2 |
31 |
# The installer suggests the use of these, but they're not |
32 |
# required - AdamW 2011/01 |
33 |
Suggests: php-fileinfo |
34 |
Suggests: php-intl |
35 |
# Most people will probably use mysql, but you can use sqlite or |
36 |
# pgsql, so not a hard require - AdamW 2008/10 |
37 |
Suggests: php-pear-MDB2_Driver_mysql |
38 |
BuildArch: noarch |
39 |
|
40 |
%description |
41 |
RoundCube Webmail is a browser-based multilingual IMAP client with an |
42 |
application-like user interface. It provides full functionality you |
43 |
expect from an e-mail client, including MIME support, address book, |
44 |
folder manipulation, message searching and spell checking. RoundCube |
45 |
Webmail is written in PHP and requires a MySQL or PostgreSQL database. |
46 |
The user interface is fully skinnable using XHTML and CSS 2. |
47 |
|
48 |
%prep |
49 |
%setup -q -n %{oname} |
50 |
|
51 |
%build |
52 |
|
53 |
%install |
54 |
# tell it that we're moving the configuration files |
55 |
for i in installer/index.php program/include/iniset.php; do \ |
56 |
sed -i \ |
57 |
-e "s,INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" \ |
58 |
$i; \ |
59 |
done |
60 |
# use systemwide log dir and temp dir |
61 |
sed -i \ |
62 |
-e 's,logs/,%{_logdir}/%{name}/,g' \ |
63 |
-e 's,temp/,/tmp/,g' \ |
64 |
config/main.inc.php.dist |
65 |
mkdir -p %{buildroot}%{_datadir}/%{name} |
66 |
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
67 |
mkdir -p %{buildroot}%{_logdir}/%{name} |
68 |
cp -a config/db.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/db.inc.php |
69 |
cp -a config/main.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/main.inc.php |
70 |
rm -rf config |
71 |
rm -rf temp |
72 |
rm -rf logs |
73 |
cp -a * %{buildroot}%{_datadir}/%{name} |
74 |
|
75 |
pushd %{buildroot}%{_datadir}/%{name} |
76 |
rm -f CHANGELOG INSTALL UPGRADING LICENSE README |
77 |
popd |
78 |
|
79 |
mkdir -p %{buildroot}%{_webappconfdir} |
80 |
cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF |
81 |
Alias /%{name} %{_datadir}/%{name} |
82 |
|
83 |
<Directory %{_datadir}/%{name}> |
84 |
AllowOverride All |
85 |
Require all granted |
86 |
</Directory> |
87 |
|
88 |
<Directory %{_datadir}/%{name}/SQL> |
89 |
AllowOverride All |
90 |
Require all granted |
91 |
</Directory> |
92 |
|
93 |
php_value suhosin.session.encrypt Off |
94 |
EOF |
95 |
|
96 |
cat > README.urpmi <<EOF |
97 |
Mageia RPM specific notes |
98 |
|
99 |
setup |
100 |
----- |
101 |
The setup used here differs from a standard installation in the following |
102 |
ways: |
103 |
* Logs are stored to /var/log/roundcubemail |
104 |
* Temporary files are placed in /tmp |
105 |
* Configuration files (main.inc.php and db.inc.php) are placed in |
106 |
%{_sysconfdir}/roundcubemail |
107 |
|
108 |
configuration/upgrade |
109 |
------- |
110 |
Use the GUI to do the configuration/upgrade: |
111 |
RoundCube provides an installer which can help you to do all |
112 |
the installation/upgrade. The feature is disabled by default for |
113 |
security reasons but you can enable it in 'main.inc.php' by |
114 |
setting the 'enable_installer' variable to 'true'. |
115 |
Once done, browse http://server/roundcubemail/installer |
116 |
|
117 |
Use the CLI to do the configuration/upgrade: |
118 |
You will need to edit %{_sysconfdir}/roundcubemail/main.inc.php and |
119 |
%{_sysconfdir}/roundcubemail/db.inc.php appropriately for your site before you |
120 |
can use Roundcube. You must at least configure an appropriate mail |
121 |
server and port in main.inc.php, and change the |
122 |
$rcmail_config['des_key'] setting. In db.inc.php you must configure |
123 |
an appropriate database location and user; in the most simple |
124 |
configuration, you would create a new user and database both named |
125 |
'roundcubemail' on a MySQL server running on the same machine, give |
126 |
the roundcubemail user full read/write access to the roundcubemail |
127 |
database, and set db.inc.php appropriately. |
128 |
|
129 |
Information: |
130 |
- you can drop all of the tables and use the '*.initial.sql' file |
131 |
to fully recreate the database. |
132 |
- If any database change is needed, go to %{_datadir}/roundcubemail/SQL |
133 |
and use '*.update.sql' where '*' is your database backend type. |
134 |
EOF |
135 |
|
136 |
%files |
137 |
%doc CHANGELOG LICENSE README.md SQL UPGRADING |
138 |
%{_datadir}/%{name} |
139 |
%dir %{_sysconfdir}/%{name} |
140 |
%attr(740,apache,apache)%{_logdir}/%{name} |
141 |
%attr(640,root,apache)%config(noreplace) %{_sysconfdir}/%{name}/db.inc.php |
142 |
%config(noreplace) %{_sysconfdir}/%{name}/main.inc.php |
143 |
%config(noreplace) %{_webappconfdir}/%{name}.conf |