]> git.pld-linux.org Git - packages/courier-imap.git/blob - courier-imap.spec
a3a2884fc7c43fc57ed38bbf1da09376c61c79df
[packages/courier-imap.git] / courier-imap.spec
1 #
2 # Conditional build:    
3 # _without_ldap - without LDAP support
4 # _without_mysql - without MySQL support
5 # _without_postgresql - without PostgreSQL support
6 Summary:        Courier-IMAP server
7 Summary(pl):    Serwer Courier-IMAP
8 Name:           courier-imap
9 Version:        1.3.13
10 Release:        10
11 License:        GPL
12 Group:          Networking/Daemons
13 Group(de):      Netzwerkwesen/Server
14 Group(pl):      Sieciowe/Serwery
15 Source0:        http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz
16 Source1:        %{name}.init
17 Source2:        %{name}-pop3.init
18 Source3:        %{name}-authdaemon.init
19 Source4:        %{name}.pamd
20 Source5:        %{name}-pop3.pamd
21 Source6:        %{name}.sysconfig
22 Source7:        %{name}-pop3.sysconfig
23 Source8:        %{name}-authdaemon.sysconfig
24 Patch0:         ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery.patch
25 URL:            http://www.inter7.com/courierimap/
26 %{!?_without_postgresql:BuildRequires:  postgresql-devel}
27 %{!?_without_mysql:BuildRequires:       mysql-devel}
28 %{!?_without_ldap:BuildRequires:        openldap-devel}
29 BuildRequires:  gdbm-devel
30 BuildRequires:  libstdc++-devel
31 BuildRequires:  openssl-devel
32 Provides:       imapdaemon
33 Prereq:         %{name}-common = %{version}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Obsoletes:      imapdaemon
36
37 %define         _libexecdir     /usr/lib/courier-imap
38 %define         _sysconfdir     /etc/courier-imap
39
40 %description
41 Courier-IMAP is an IMAP server for Maildir mailboxes.
42
43 %description -l pl
44 Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
45
46 %package common
47 Summary:        Common files for imap and pop daemons
48 Summary(pl):    Pliki wspólne dla serwerów imap i pop
49 Group:          Networking/Daemons
50 Group(de):      Netzwerkwesen/Server
51 Group(pl):      Sieciowe/Serwery
52 Prereq:         rc-scripts
53 Prereq:         /sbin/chkconfig
54 Requires:       %{name}-maildirmake
55 Requires:       %{name}-deliverquota
56 Requires:       %{name}-userdb
57
58 %description common
59 Common files for imap and pop daemons.
60
61 %description common -l pl
62 Pliki wspólne dla serwerów imap i pop.
63
64 %package userdb
65 Summary:        Commands used to create the /etc/userdb.dat
66 Group:          Networking/Daemons
67 Group(de):      Netzwerkwesen/Server
68 Group(pl):      Sieciowe/Serwery
69
70 %description userdb
71 Commands used to create the /etc/userdb.dat
72
73 %package deliverquota
74 Summary:        Deliver to a maildir with a quota
75 Group:          Networking/Daemons
76 Group(de):      Netzwerkwesen/Server
77 Group(pl):      Sieciowe/Serwery
78
79 %description deliverquota
80 deliverquota is a temporary hack to implement E-mail delivery to a
81 maildir with a software-imposed quota.
82
83 %package maildirmake
84 Summary:        Tool for making mail folders in Maildir format.
85 Group:          Networking/Daemons
86 Group(de):      Netzwerkwesen/Server
87 Group(pl):      Sieciowe/Serwery
88 Conflicts:      qmail-maildirmake
89
90 %description maildirmake
91 Maildirmake is a tool for making mail folders in Maildir format.
92
93 %package pop3
94 Summary:        Courier-IMAP POP3 Server
95 Summary(pl):    Serwer Courier-IMAP POP3
96 Group:          Networking/Daemons
97 Group(de):      Netzwerkwesen/Server
98 Group(pl):      Sieciowe/Serwery
99 Prereq:         %{name}-common = %{version}
100 Provides:       pop3daemon
101 Obsoletes:      pop3daemon
102
103 %description pop3
104 Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
105
106 %description pop3 -l pl
107 Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
108
109 %package authldap
110 Summary:        LDAP authentication daemon for Courier IMAP
111 Summary(pl):    Demon autentykacji LDAP do Courier IMAP
112 Group:          Networking/Daemons
113 Group(de):      Netzwerkwesen/Server
114 Group(pl):      Sieciowe/Serwery
115 Prereq:         %{name}-common = %{version}
116
117 %description authldap
118 This package provides LDAP authentication for Courier IMAP.
119
120 %description authldap -l pl
121 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP.
122
123 %package authmysql
124 Summary:        MySQL authentication daemon for Courier IMAP
125 Summary(pl):    Demon autentykacji MySQL do Courier IMAP
126 Group:          Networking/Daemons
127 Group(de):      Netzwerkwesen/Server
128 Group(pl):      Sieciowe/Serwery
129 Prereq:         %{name}-common = %{version}
130
131 %description authmysql
132 This package provides MySQL authentication for Courier IMAP.
133
134 %description authmysql -l pl
135 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP.
136
137 %package authpgsql
138 Summary:        PostgreSQL authentication daemon for Courier IMAP
139 Summary(pl):    Demon autentykacji PostgreSQL do Courier IMAP
140 Group:          Networking/Daemons
141 Group(de):      Netzwerkwesen/Server
142 Group(pl):      Sieciowe/Serwery
143 Prereq:         %{name}-common = %{version}
144
145 %description authpgsql
146 This package provides PostgreSQL authentication for Courier IMAP.
147
148 %description authpgsql -l pl
149 Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier IMAP.
150
151 %prep
152 %setup -q
153 %patch0 -p1
154
155 %build
156 %configure2_13 \
157         --enable-unicode \
158         --with-authchangepwdir=/var/tmp \
159         --with-authdaemonvar=/var/lib/authdaemon \
160         %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \
161         %{?_without_mysql:--without-authmysql} \
162         %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \
163         %{?_without_postgresql:--without-authpgsql} \
164         %{?_without_ldap:--without-authldap}
165
166 %{__make}
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
171         $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
172
173 %{__make} install DESTDIR=$RPM_BUILD_ROOT
174
175 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
176 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
177 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
178
179 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
180 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
181
182 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
183 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
184 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
185
186 rm -rf  $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
187         $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
188
189 mv -f authlib/README.authmysql.html README.authmysql.html
190 mv -f authlib/README.ldap README.ldap
191 mv -f authlib/README.myownquery README.myownquery
192 mv -f imap/README README.imap
193 mv -f maildir/README.maildirquota.txt README.maildirquota
194
195 install authlib/authdaemonrc            $RPM_BUILD_ROOT%{_sysconfdir}
196 install authlib/authldaprc              $RPM_BUILD_ROOT%{_sysconfdir}
197 install authlib/authmysqlrc             $RPM_BUILD_ROOT%{_sysconfdir}
198 install authlib/authpgsqlrc             $RPM_BUILD_ROOT%{_sysconfdir}
199
200 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
201         $RPM_BUILD_ROOT%{_sbindir}
202 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
203         $RPM_BUILD_ROOT%{_sbindir}
204
205 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
206
207 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
208 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
209 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
210 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
211 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
212 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
213 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
214 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
215 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
216 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
217 %{!?_without_ldap:echo ".so authlib.8"  >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
218 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
219 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
220
221 gzip -9nf README* imap/BUGS AUTHORS COPYING
222
223 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %post
229 /sbin/chkconfig --add courier-imap
230
231 if [ -f /var/lock/subsys/courier-imap ]; then
232         /etc/rc.d/init.d/courier-imap restart >&2
233 else
234         echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
235 fi
236
237 %preun
238 if [ "$1" = "0" ]; then
239         if [ -f /var/lock/subsys/courier-imap ]; then
240                 /etc/rc.d/init.d/courier-imap stop >&2
241         fi
242         /sbin/chkconfig --del courier-imap
243 fi
244
245 %post common
246 /sbin/chkconfig --add authdaemon
247
248 if [ -f /var/lock/subsys/authdaemon ]; then
249         /etc/rc.d/init.d/authdaemon restart >&2
250 else
251         echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
252 fi
253
254 %preun common
255 if [ "$1" = "0" ]; then
256         if [ -f /var/lock/subsys/authdaemon ]; then
257                 /etc/rc.d/init.d/authdaemon stop >&2
258         fi
259
260         /sbin/chkconfig --del authdaemon
261 fi
262
263 %post pop3
264 /sbin/chkconfig --add courier-imap-pop3
265
266 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
267         /etc/rc.d/init.d/courier-imap-pop3 restart >&2
268 else
269         echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
270 fi
271
272 %preun pop3
273 if [ "$1" = "0" ]; then
274         if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
275                 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
276         fi
277         /sbin/chkconfig --del courier-imap-pop3
278 fi
279
280 %post authldap
281 METHOD=plain
282 . /etc/sysconfig/authdaemon
283 if [ "$METHOD" = "ldap" ]; then
284         if [ -f /var/lock/subsys/authdaemon ]; then
285                 /etc/rc.d/init.d/authdaemon restart >&2
286         else
287                 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
288         fi
289 fi
290
291 %preun authldap
292 METHOD=plain
293 . /etc/sysconfig/authdaemon
294 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
295         if [ -f /var/lock/subsys/authdaemon ]; then
296                 /etc/rc.d/init.d/authdaemon stop >&2
297         fi
298 fi
299
300 %post authmysql
301 METHOD=plain
302 . /etc/sysconfig/authdaemon
303 if [ "$METHOD" = "mysql" ]; then
304         if [ -f /var/lock/subsys/authdaemon ]; then
305                 /etc/rc.d/init.d/authdaemon restart >&2
306         else
307                 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
308         fi
309 fi
310
311 %preun authmysql
312 METHOD=plain
313 . /etc/sysconfig/authdaemon
314 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
315         if [ -f /var/lock/subsys/authdaemon ]; then
316                 /etc/rc.d/init.d/authdaemon stop >&2
317         fi
318 fi
319
320 %files
321 %defattr(644,root,root,755)
322 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
323 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
324 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
325 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
326 %{_sysconfdir}/imapd.cnf
327 %attr(755,root,root) %{_bindir}/imapd
328 %attr(755,root,root) %{_sbindir}/imaplogin
329 %attr(755,root,root) %{_sbindir}/mkimapdcert
330 %{_mandir}/man8/imapd*
331
332 %files common
333 %defattr(644,root,root,755)
334 %doc *.gz imap/*.gz
335 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
336 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
337 %attr(700,root,root) /var/lib/authdaemon
338 %attr(750,root,root) %dir %{_sysconfdir}
339 %dir %{_libexecdir}
340 %dir %{_libexecdir}/authlib
341 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
342 %{_sysconfdir}/quotawarnmsg.example
343 %attr(755,root,root) %{_bindir}/couriertls
344 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
345 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
346 %attr(755,root,root) %{_libexecdir}/couriertcpd
347 %attr(755,root,root) %{_libexecdir}/logger
348 %attr(755,root,root) %{_libexecdir}/makedatprog
349 %{_mandir}/man8/auth[cdpsuv]*
350 %{_mandir}/man8/authlib*
351 %{_mandir}/man8/couriert*
352 %{_mandir}/man8/mk*
353
354 %files userdb
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_sbindir}/makeuserdb
357 %attr(755,root,root) %{_sbindir}/pw2userdb
358 %attr(755,root,root) %{_sbindir}/userdb
359 %attr(755,root,root) %{_sbindir}/userdbpw
360 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
361 %{_mandir}/man8/makeuserdb*
362 %{_mandir}/man8/userdb*
363 %{_mandir}/man8/*pw2userdb*
364
365 %files deliverquota
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libexecdir}/deliverquota
368 %{_mandir}/man8/deliverquota*
369
370 %files maildirmake
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_bindir}/maildirmake
373 %{_mandir}/man1/maildirmake*
374
375 %files pop3
376 %defattr(644,root,root,755)
377 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
378 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
379 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
380 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
381 %attr(755,root,root) %{_bindir}/pop3d
382 %attr(755,root,root) %{_sbindir}/mkpop3dcert
383 %attr(755,root,root) %{_sbindir}/pop3login
384 %{_sysconfdir}/pop3d.cnf
385
386 %if %{?_without_ldap:0}%{!?_without_ldap:1}
387 %files authldap
388 %defattr(644,root,root,755)
389 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
390 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
391 %{_mandir}/man8/authldap*
392 %endif
393
394 %if %{?_without_mysql:0}%{!?_without_mysql:1}
395 %files authmysql
396 %defattr(644,root,root,755)
397 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
398 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
399 %{_mandir}/man8/authmysql*
400 %endif
401
402 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
403 %files authpgsql
404 %defattr(644,root,root,755)
405 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
406 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
407 %{_mandir}/man8/authpgsql*
408 %endif
This page took 0.070834 seconds and 2 git commands to generate.