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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 129149 - (hide annotations) (download)
Mon Jul 25 13:55:36 2011 UTC (12 years, 8 months ago) by dams
File size: 5262 byte(s)
imported package roundcubemail
1 dams 129149 %define rel 1
2     %define beta 0
3     %if %beta
4     %define release %mkrel 0.%beta.%rel
5     %define distname %name-%version-%beta-dep.tar.gz
6     %define dirname %name-%version-%beta-dep
7     %else
8     %define release %mkrel %rel
9     %define distname %name-%version-dep.tar.gz
10     %define dirname %name-%version-dep
11     %endif
12    
13     Name: roundcubemail
14     Version: 0.5.3
15     Release: %{release}
16     Summary: A PHP-based webmail server
17     Group: System/Servers
18     License: GPLv2
19     # Use the -dep tarballs. These use system copies of the PHP stuff
20     # rather than including them, which is better for our purposes.
21     # - AdamW 2007/07
22     URL: http://www.roundcube.net/
23     Source0: http://downloads.sourceforge.net/roundcubemail/%{distname}
24     Epoch: 1
25     #BuildRequires: apache-devel pcre-devel rpm-helper
26     Requires: apache-mod_php
27     Requires: php-gd
28     Requires: php-gettext
29     Requires: php-iconv
30     Requires: php-mbstring
31     Requires: php-mcrypt
32     Requires: php-openssl
33     Requires: php-pspell
34     Requires: php-session
35     Requires: php-pear-Auth_SASL
36     Requires: php-pear-Mail_Mime
37     Requires: php-pear-Net_SMTP
38     Requires: php-pear-Net_LDAP2
39     Requires: php-pear-MDB2
40     Requires: php-pear-Net_IDNA2
41     # The installer suggests the use of these, but they're not
42     # required - AdamW 2011/01
43     Suggests: php-fileinfo
44     Suggests: php-intl
45     # Most people will probably use mysql, but you can use sqlite or
46     # pgsql, so not a hard require - AdamW 2008/10
47     Suggests: php-pear-MDB2_Driver_mysql
48    
49     %if %mdkversion < 201010
50     Requires(post): rpm-helper
51     Requires(postun): rpm-helper
52     %endif
53     BuildArch: noarch
54     BuildRoot: %{_tmppath}/%{name}-%{version}
55    
56     %description
57     RoundCube Webmail is a browser-based multilingual IMAP client with an
58     application-like user interface. It provides full functionality you
59     expect from an e-mail client, including MIME support, address book,
60     folder manipulation, message searching and spell checking. RoundCube
61     Webmail is written in PHP and requires a MySQL or PostgreSQL database.
62     The user interface is fully skinnable using XHTML and CSS 2.
63    
64     %prep
65     %setup -q -n %{dirname}
66    
67     %build
68    
69     %install
70     rm -rf %{buildroot}
71     # tell it that we're moving the configuration files
72     for i in installer/index.php program/include/iniset.php; do \
73     sed -i \
74     -e "s,INSTALL_PATH . 'config','%{_sysconfdir}/%{name}',g" \
75     $i; \
76     done
77     # use systemwide log dir and temp dir
78     sed -i \
79     -e 's,logs/,%{_logdir}/%{name}/,g' \
80     -e 's,temp/,/tmp/,g' \
81     config/main.inc.php.dist
82     mkdir -p %{buildroot}%{_datadir}/%{name}
83     mkdir -p %{buildroot}%{_sysconfdir}/%{name}
84     mkdir -p %{buildroot}%{_logdir}/%{name}
85     cp -a config/db.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/db.inc.php
86     cp -a config/db.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/db.inc.php.dist
87     cp -a config/main.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/main.inc.php
88     cp -a config/main.inc.php.dist %{buildroot}%{_sysconfdir}/%{name}/main.inc.php.dist
89     rm -rf config
90     rm -rf temp
91     rm -rf logs
92     cp -a * %{buildroot}%{_datadir}/%{name}
93    
94     pushd %{buildroot}%{_datadir}/%{name}
95     rm -f CHANGELOG INSTALL UPGRADING LICENSE README
96     popd
97    
98    
99     cat <<EOF > README.urpmi
100    
101     This package conforms to the Mandriva web applications policy:
102     http://wiki.mandriva.com/Policies/Web_Applications
103    
104     It therefore differs from a standard installation in the following
105     ways:
106    
107     * Logs are stored to /var/log/roundcubemail
108     * Temporary files are placed in /tmp
109     * Configuration files (main.inc.php and db.inc.php) are placed in
110     /etc/roundcubemail
111    
112     You will need to edit /etc/roundcubemail/main.inc.php and
113     /etc/roundcubemail/db.inc.php appropriately for your site before you
114     can use Roundcube. You must at least configure an appropriate mail
115     server and port in main.inc.php, and change the
116     $rcmail_config['des_key'] setting. In db.inc.php you must configure
117     an appropriate database location and user; in the most simple
118     configuration, you would create a new user and database both named
119     'roundcubemail' on a MySQL server running on the same machine, give
120     the roundcubemail user full read/write access to the roundcubemail
121     database, and set db.inc.php appropriately. Roundcubemail ships with
122     an installer which can help you do all this, but it is disabled by
123     default for security reasons. You can enable it in main.inc.php by
124     setting the 'enable_installer' variable to 'true'. Then browse to
125     http://server/roundcubemail/installer to use the installer.
126     EOF
127    
128     mkdir -p %{buildroot}%{_webappconfdir}
129     cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF
130     Alias /%{name} %{_datadir}/%{name}
131    
132     <Directory %{_datadir}/%{name}>
133     Order allow,deny
134     Allow from all
135     </Directory>
136    
137     <Directory %{_datadir}/%{name}/SQL>
138     Order deny,allow
139     Deny from all
140     </Directory>
141    
142     php_value suhosin.session.encrypt Off
143     EOF
144    
145     %post
146     %if %mdkversion < 201010
147     %_post_webapp
148     %endif
149    
150     %postun
151     %if %mdkversion < 201010
152     %_postun_webapp
153     %endif
154    
155     %clean
156     rm -rf %{buildroot}
157    
158     %files
159     %defattr(-,root,root)
160     %doc CHANGELOG README README.urpmi UPGRADING
161     %{_datadir}/%{name}
162     %dir %{_sysconfdir}/%{name}
163     %{_logdir}/%{name}
164     # these store the default values, the installer refers to them
165     # no need to edit them so they're not tagged config - AdamW 2011/01
166     %{_sysconfdir}/%{name}/db.inc.php.dist
167     %{_sysconfdir}/%{name}/main.inc.php.dist
168     %config(noreplace) %{_sysconfdir}/%{name}/db.inc.php
169     %config(noreplace) %{_sysconfdir}/%{name}/main.inc.php
170     %config(noreplace) %{_webappconfdir}/%{name}.conf
171    
172    

  ViewVC Help
Powered by ViewVC 1.1.30