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