]>
Commit | Line | Data |
---|---|---|
600b6f8b PG |
1 | # TODO: |
2 | # - prepare config for apache (don't install boundled .htaccess) | |
3 | # - prepare config for lighttp | |
4 | # - add logrotate file | |
5 | # - it has PEAR boundled inside - use system ones | |
6 | # - review patches: | |
7 | # http://sourceforge.net/forum/forum.php?forum_id=543557 | |
8 | # | |
9 | %define _beta beta | |
10 | Summary: RoundCube Webmail | |
11 | Name: roundcubemail | |
12 | Version: 0.1 | |
13 | Release: 0.%{_beta}.0.1 | |
14 | License: GPL v2 | |
15 | Group: Applications/WWW | |
16 | Source0: http://dl.sourceforge.net/roundcubemail/%{name}-%{version}%{_%{_beta}}.tar.gz | |
17 | # Source0-md5: cdbcdfd419c01a4c437327c625d28da5 | |
18 | Patch0: %{name}-config.patch | |
19 | URL: http://www.roundcube.net/ | |
20 | BuildRequires: rpmbuild(macros) >= 1.268 | |
21 | Requires: php-pcre | |
22 | Requires: webapps | |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define _webapps /etc/webapps | |
27 | %define _webapp %{name} | |
28 | %define _sysconfdir %{_webapps}/%{_webapp} | |
29 | %define _appdir %{_datadir}/%{_webapp} | |
30 | %define _appdatadir /var/lib/roundcube | |
31 | ||
32 | %description | |
33 | RoundCube Webmail is a browser-based multilingual IMAP client with an | |
34 | application-like user interface. It provides full functionality you | |
35 | expect from an e-mail client, including MIME support, address book, | |
36 | folder manipulation and message filters. RoundCube Webmail is written | |
37 | in PHP and requires the MySQL database. The user interface is fully | |
38 | skinnable using XHTML and CSS 2. | |
39 | ||
40 | %prep | |
41 | %setup -q -n %{name}-%{version}%{_%{_beta}} | |
42 | %patch0 -p1 | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT{%{_appdatadir},%{_sysconfdir},/var/log/roundcube} \ | |
47 | $RPM_BUILD_ROOT%{_appdir}/{config,program,skins} | |
48 | ||
49 | # Main application part: | |
50 | cp -R program/* $RPM_BUILD_ROOT%{_appdir}/program | |
51 | ||
52 | # Skins installation (maybe it should be as config??) | |
53 | cp -R skins/* $RPM_BUILD_ROOT%{_appdir}/skins | |
54 | ||
55 | ## Configuration: | |
56 | install config/db.inc.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/db.inc.php | |
57 | install config/main.inc.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/main.inc.php | |
58 | ln -sf %{_sysconfdir}/db.inc.php $RPM_BUILD_ROOT%{_appdir}/config/db.inc.php | |
59 | ln -sf %{_sysconfdir}/main.inc.php $RPM_BUILD_ROOT%{_appdir}/config/main.inc.php | |
60 | ||
61 | %triggerin -- apache1 | |
62 | %webapp_register apache %{_webapp} | |
63 | ||
64 | %triggerun -- apache1 | |
65 | %webapp_unregister apache %{_webapp} | |
66 | ||
67 | %triggerin -- apache < 2.2.0, apache-base | |
68 | %webapp_register httpd %{_webapp} | |
69 | ||
70 | %triggerun -- apache < 2.2.0, apache-base | |
71 | %webapp_unregister httpd %{_webapp} | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc CHANGELOG INSTALL README UPGRADING SQL | |
79 | %dir %attr(750,root,http) %{_sysconfdir} | |
80 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
81 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
82 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php | |
83 | %dir %{_appdir} | |
84 | %dir %{_appdir}/config | |
85 | %{_appdir}/config/*.php | |
86 | %dir %{_appdir}/program | |
87 | %{_appdir}/program/* | |
88 | %dir %{_appdir}/skins | |
89 | %{_appdir}/skins/default | |
90 | %dir %attr(770,root,http) /var/log/roundcube | |
91 | # %ghost logfile | |
92 | %dir %attr(770,root,http) %{_appdatadir} |