3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 Summary: Courier-IMAP server
6 Summary(pl): Serwer Courier-IMAP
11 Group: Networking/Daemons
12 Group(de): Netzwerkwesen/Server
13 Group(pl): Sieciowe/Serwery
14 Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
16 Source2: %{name}-pop3.init
17 Source3: %{name}-authdaemon.init
19 Source5: %{name}-pop3.pamd
20 Source6: %{name}.sysconfig
21 Source7: %{name}-pop3.sysconfig
22 Source8: %{name}-authdaemon.sysconfig
23 URL: http://www.inter7.com/courierimap/
24 %{!?_without_mysql:BuildRequires: mysql-devel}
25 %{!?_without_ldap:BuildRequires: openldap-devel}
26 BuildRequires: gdbm-devel
27 BuildRequires: libstdc++-devel
30 Requires: %{name}-common = %{version}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _libexecdir /usr/lib/courier-imap
35 %define _sysconfdir /etc/courier-imap
38 Courier-IMAP is an IMAP server for Maildir mailboxes.
41 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
44 Summary: Common files for imap and pop daemons
45 Summary(pl): Pliki wspólne dla serwerów imap i pop
46 Group: Networking/Daemons
47 Group(de): Netzwerkwesen/Server
48 Group(pl): Sieciowe/Serwery
52 Common files for imap and pop daemons.
54 %description -l pl common
55 Pliki wspólne dla serwerów imap i pop.
58 Summary: Courier-IMAP POP3 Server
59 Summary(pl): Serwer Courier-IMAP POP3
60 Group: Networking/Daemons
61 Group(de): Netzwerkwesen/Server
62 Group(pl): Sieciowe/Serwery
63 Requires: %{name}-common = %{version}
69 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
71 %description -l pl pop3
72 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
75 Summary: LDAP authentication daemon for Courier IMAP
76 Summary(pl): Demon autentykacji LDAP do Courier IMAP
77 Group: Networking/Daemons
78 Group(de): Netzwerkwesen/Server
79 Group(pl): Sieciowe/Serwery
80 Prereq: %{name}-common = %{version}
83 This package provides LDAP authentication for Courier IMAP.
85 %description authldap -l pl
86 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
89 Summary: MySQL authentication daemon for Courier IMAP
90 Summary(pl): Demon autentykacji MySQL do Courier IMAP
91 Group: Networking/Daemons
92 Group(de): Netzwerkwesen/Server
93 Group(pl): Sieciowe/Serwery
94 Prereq: %{name}-common = %{version}
96 %description authmysql
97 This package provides MySQL authentication for Courier IMAP.
99 %description authmysql -l pl
100 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
107 --with-authdaemonvar=/var/lib/authdaemon \
108 %{!?_without_mysql:--with-mysql-libs=/usr/lib --with-mysql-includes=/usr/include/mysql} \
109 %{?_without_ldap:--without-authldap}
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
116 $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
118 %{__make} install DESTDIR=$RPM_BUILD_ROOT
120 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
121 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
122 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
124 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
125 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
127 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
128 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
129 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
131 rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
132 $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
134 mv -f imap/README README.imap
135 mv -f maildir/README.maildirquota.txt README.maildirquota
137 install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir}
138 install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir}
139 install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir}
141 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
142 $RPM_BUILD_ROOT%{_sbindir}
143 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
144 $RPM_BUILD_ROOT%{_sbindir}
146 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
147 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
148 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
149 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
150 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
151 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
152 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
153 echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
154 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
155 %{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
156 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
157 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
159 gzip -9nf README* imap/BUGS AUTHORS COPYING
161 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
164 rm -rf $RPM_BUILD_ROOT
167 /sbin/chkconfig --add courier-imap
169 if [ -f /var/lock/subsys/courier-imap ]; then
170 /etc/rc.d/init.d/courier-imap restart >&2
172 echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
176 if [ "$1" = "0" ]; then
177 if [ -f /var/lock/subsys/courier-imap ]; then
178 /etc/rc.d/init.d/courier-imap stop >&2
180 /sbin/chkconfig --del courier-imap
184 /sbin/chkconfig --add authdaemon
186 if [ -f /var/lock/subsys/authdaemon ]; then
187 /etc/rc.d/init.d/authdaemon restart >&2
189 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
193 if [ "$1" = "0" ]; then
194 if [ -f /var/lock/subsys/authdaemon ]; then
195 /etc/rc.d/init.d/authdaemon stop >&2
198 /sbin/chkconfig --del authdaemon
202 /sbin/chkconfig --add courier-imap-pop3
204 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
205 /etc/rc.d/init.d/courier-imap-pop3 restart >&2
207 echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
211 if [ "$1" = "0" ]; then
212 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
213 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
215 /sbin/chkconfig --del courier-imap
220 . /etc/sysconfig/authdaemon
221 if [ "$METHOD" = "ldap" ]; then
222 if [ -f /var/lock/subsys/authdaemon ]; then
223 /etc/rc.d/init.d/authdaemon stop >&2
225 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
231 . /etc/sysconfig/authdaemon
232 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
233 if [ -f /var/lock/subsys/authdaemon ]; then
234 /etc/rc.d/init.d/authdaemon stop >&2
240 . /etc/sysconfig/authdaemon
241 if [ "$METHOD" = "mysql" ]; then
242 if [ -f /var/lock/subsys/authdaemon ]; then
243 /etc/rc.d/init.d/authdaemon stop >&2
245 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
251 . /etc/sysconfig/authdaemon
252 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
253 if [ -f /var/lock/subsys/authdaemon ]; then
254 /etc/rc.d/init.d/authdaemon stop >&2
259 %defattr(644,root,root,755)
260 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap
261 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
262 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
263 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
264 %{_sysconfdir}/imapd.cnf
265 %attr(755,root,root) %{_bindir}/imapd
266 %attr(755,root,root) %{_sbindir}/imaplogin
267 %attr(755,root,root) %{_sbindir}/mkimapdcert
268 %{_mandir}/man8/imapd*
271 %defattr(644,root,root,755)
273 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
274 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
275 %attr(700,root,root) /var/lib/authdaemon
276 %attr(750,root,root) %dir %{_sysconfdir}
278 %dir %{_libexecdir}/authlib
279 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
280 %{_sysconfdir}/quotawarnmsg.example
281 %attr(755,root,root) %{_bindir}/couriertls
282 %attr(755,root,root) %{_bindir}/maildirmake
283 %attr(755,root,root) %{_sbindir}/makeuserdb
284 %attr(755,root,root) %{_sbindir}/pw2userdb
285 %attr(755,root,root) %{_sbindir}/userdb
286 %attr(755,root,root) %{_sbindir}/userdbpw
287 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
288 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
289 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
290 %attr(755,root,root) %{_libexecdir}/couriertcpd
291 %attr(755,root,root) %{_libexecdir}/deliverquota
292 %attr(755,root,root) %{_libexecdir}/logger
293 %attr(755,root,root) %{_libexecdir}/makedatprog
295 %{_mandir}/man8/auth[cdpsuv]*
296 %{_mandir}/man8/authlib*
297 %{_mandir}/man8/[cdmpuv]*
300 %defattr(644,root,root,755)
301 %attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/pop3
302 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
303 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
304 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
305 %attr(755,root,root) %{_bindir}/pop3d
306 %attr(755,root,root) %{_sbindir}/mkpop3dcert
307 %attr(755,root,root) %{_sbindir}/pop3login
308 %{_sysconfdir}/pop3d.cnf
310 %if %{?_without_ldap:0}%{!?_without_ldap:1}
312 %defattr(644,root,root,755)
313 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
314 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
315 %{_mandir}/man8/authldap*
318 %if %{?_without_mysql:0}%{!?_without_mysql:1}
320 %defattr(644,root,root,755)
321 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
322 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
323 %{_mandir}/man8/authmysql*