/[packages]/cauldron/roundcubemail/current/SPECS/roundcubemail.spec
ViewVC logotype

Contents of /cauldron/roundcubemail/current/SPECS/roundcubemail.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 547609 - (show annotations) (download)
Mon Oct 28 09:45:08 2013 UTC (7 years, 6 months ago) by oden
File size: 5461 byte(s)
- make it backportable

1 %define oname %{name}-%{version}-dep
2
3 Name: roundcubemail
4 Version: 0.9.5
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.
45 RoundCube Webmail is written in PHP and requires a database: MariaDB,
46 PostgreSQL and SQLite are known to work.
47 The user interface is fully skinnable using XHTML and CSS 2.
48
49 %prep
50 %setup -q -n %{oname}
51 # tell it that we're moving the configuration files
52 for i in installer/index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php; do \
53 sed -i -e "s,INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" $i;
54 sed -i -e "s,RCUBE_INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" $i;
55 done
56 # fixup paths to use the right paths and fix carriage returns
57 sed -i 's,temp/,%{_tmppath},' config/main.inc.php.dist
58 sed -i 's,config/,%{_sysconfdir}/%{name}/,' config/main.inc.php.dist
59 sed -i 's,logs/,%{_logdir}/%{name}/,' config/main.inc.php.dist
60 sed -i 's/\r//' SQL/mssql.initial.sql
61
62 %build
63
64 %install
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 cp -a * %{buildroot}%{_datadir}/%{name}
71
72 mkdir -p %{buildroot}%{_webappconfdir}
73 cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
74 Alias /%{name} %{_datadir}/%{name}
75
76 <Directory %{_datadir}/%{name}>
77 AllowOverride All
78 <IfModule mod_authz_core.c>
79 # Apache 2.4
80 <RequireAny>
81 Require all granted
82 </RequireAny>
83 </IfModule>
84 <IfModule !mod_authz_core.c>
85 # Apache 2.2
86 Order allow,deny
87 Allow from all
88 </IfModule>
89 </Directory>
90
91 <Directory %{_datadir}/%{name}/SQL>
92 AllowOverride All
93 <IfModule mod_authz_core.c>
94 # Apache 2.4
95 <RequireAny>
96 Require all granted
97 </RequireAny>
98 </IfModule>
99 <IfModule !mod_authz_core.c>
100 # Apache 2.2
101 Order allow,deny
102 Allow from all
103 </IfModule>
104 </Directory>
105
106 php_value suhosin.session.encrypt Off
107 EOF
108
109 cat > README.urpmi <<EOF
110 Mageia RPM specific notes
111
112 setup
113 -----
114 The setup used here differs from a standard installation in the following
115 ways:
116 * Logs are stored to /var/log/roundcubemail
117 * Temporary files are placed in /tmp
118 * Configuration files (main.inc.php and db.inc.php) are placed in
119 %{_sysconfdir}/roundcubemail
120
121 configuration/upgrade
122 -------
123 Use the GUI to do the configuration/upgrade:
124 RoundCube provides an installer which can help you to do all
125 the installation/upgrade. The feature is disabled by default for
126 security reasons but you can enable it in 'main.inc.php' by
127 setting the 'enable_installer' variable to 'true'.
128 Once done, browse http://server/roundcubemail/installer
129
130 Use the CLI to do the configuration/upgrade:
131 You will need to edit %{_sysconfdir}/roundcubemail/main.inc.php and
132 %{_sysconfdir}/roundcubemail/db.inc.php appropriately for your site before you
133 can use Roundcube. You must at least configure an appropriate mail
134 server and port in main.inc.php, and change the
135 $rcmail_config['des_key'] setting. In db.inc.php you must configure
136 an appropriate database location and user; in the most simple
137 configuration, you would create a new user and database both named
138 'roundcubemail' on a MySQL server running on the same machine, give
139 the roundcubemail user full read/write access to the roundcubemail
140 database, and set db.inc.php appropriately.
141
142 Information:
143 - you can drop all of the tables and use the '*.initial.sql' file
144 to fully recreate the database.
145 - If any database change is needed, go to %{_datadir}/roundcubemail/SQL
146 and use '*.update.sql' where '*' is your database backend type.
147 EOF
148
149 # clean up the buildroot
150 rm -rf %{buildroot}%{_datadir}/%{name}/{config,logs,temp}
151 rm -rf %{buildroot}%{_datadir}/%{name}/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING,SQL}
152
153 %files
154 %doc CHANGELOG INSTALL LICENSE README.md SQL UPGRADING
155 %{_datadir}/%{name}
156 %dir %{_sysconfdir}/%{name}
157 %attr(0740,root,apache)%{_logdir}/%{name}
158 %attr(0640,root,apache)%config(noreplace) %{_sysconfdir}/%{name}/db.inc.php
159 %attr(0640,root,apache)%config(noreplace) %{_sysconfdir}/%{name}/main.inc.php
160 %config(noreplace) %{_webappconfdir}/%{name}.conf

  ViewVC Help
Powered by ViewVC 1.1.28