1 Summary: WebMail package
2 Summary(pl.UTF-8): Poczta przez WWW
7 Group: Applications/Mail
8 Source0: http://downloads.sourceforge.net/nocc/%{name}-%{version}.tar.gz
9 # Source0-md5: 731c8ab05a6de5131383be0810fe76a2
10 Source1: %{name}.lighttpd
11 Patch0: %{name}-config.patch
12 Patch1: %{name}-pl.patch
13 URL: http://nocc.sourceforge.net/
14 BuildRequires: rpm-pythonprov
15 BuildRequires: rpmbuild(macros) >= 1.566
16 BuildRequires: sed >= 4.0
21 Requires: webserver(php) >= 4.1.0
23 Conflicts: apache-base < 2.4.0-1
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _webapp %{name}
28 %define _webapps /etc/webapps
29 %define _sysconfdir %{_webapps}/%{_webapp}
30 %define _appdir %{_datadir}/%{_webapp}
33 NOCC is a webmail client written in PHP. It provides webmail access to
34 IMAP and POP3 accounts.
36 %description -l pl.UTF-8
37 NOCC jest klientem poczty napisanym w PHP. Umożliwia dostęp do kont
38 pocztowych IMAP i POP3 przez WWW.
41 %setup -q -c %{name}-%{version}
47 cat > apache.conf <<'EOF'
48 Alias /%{name} %{_appdir}
49 <Directory %{_appdir}>
54 cat > httpd.conf <<'EOF'
55 Alias /%{name} %{_appdir}
56 <Directory %{_appdir}>
62 find -type d -name CVS | while read cvsdir; do
67 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_var}/lib/nocc}
70 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
71 install httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
72 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
74 install config/conf.php.dist config/conf.php
75 mv config $RPM_BUILD_ROOT%{_sysconfdir}/
76 cp -avR * $RPM_BUILD_ROOT%{_appdir}
78 ln -s %{_sysconfdir}/config $RPM_BUILD_ROOT%{_appdir}/
80 rm -rf $RPM_BUILD_ROOT%{_appdir}/docs
81 rm -f $RPM_BUILD_ROOT%{_appdir}/{COPYING,INSTALL,README,*.sh}
82 rm -rf $RPM_BUILD_ROOT%{_appdir}/debian
83 rm -f $RPM_BUILD_ROOT%{_appdir}/lang/*.sh
85 %triggerin -- apache1 < 1.3.37-3, apache1-base
86 %webapp_register apache %{_webapp}
88 %triggerun -- apache1 < 1.3.37-3, apache1-base
89 %webapp_unregister apache %{_webapp}
91 %triggerin -- apache-base
92 %webapp_register httpd %{_webapp}
94 %triggerun -- apache-base
95 %webapp_unregister httpd %{_webapp}
97 %triggerin -- lighttpd
98 %webapp_register lighttpd %{_webapp}
100 %triggerun -- lighttpd
101 %webapp_unregister lighttpd %{_webapp}
104 rm -rf $RPM_BUILD_ROOT
107 %defattr(644,root,root,755)
109 %dir %attr(750,root,http) %{_sysconfdir}
110 %dir %attr(750,root,http) %{_sysconfdir}/config
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
114 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config/*
115 %attr(770,root,http) %dir %{_var}/lib/nocc