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