]> git.pld-linux.org Git - packages/courier-imap.git/blob - courier-imap.spec
- release: 6
[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.12
10 Release:        6
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:         %{name}-authmysql.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_postgresql:--without-authpgsql} \
162         %{?_without_ldap:--without-authldap}
163
164 %{__make}
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \
169         $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon}
170
171 %{__make} install DESTDIR=$RPM_BUILD_ROOT
172
173 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
174 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3
175 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon
176
177 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap
178 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3
179
180 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap
181 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3
182 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon
183
184 rm -rf  $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \
185         $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert}
186
187 mv -f imap/README README.imap
188 mv -f maildir/README.maildirquota.txt README.maildirquota
189
190 install authlib/authdaemonrc            $RPM_BUILD_ROOT%{_sysconfdir}
191 install authlib/authldaprc              $RPM_BUILD_ROOT%{_sysconfdir}
192 install authlib/authmysqlrc             $RPM_BUILD_ROOT%{_sysconfdir}
193 install authlib/authpgsqlrc             $RPM_BUILD_ROOT%{_sysconfdir}
194
195 mv -f $RPM_BUILD_ROOT%{_datadir}/*db \
196         $RPM_BUILD_ROOT%{_sbindir}
197 mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \
198         $RPM_BUILD_ROOT%{_sbindir}
199
200 imap/html2man.pl tcpd/couriertls.html > $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
201
202 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8
203 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8
204 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8
205 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8
206 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8
207 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8
208 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8
209 echo ".so authlib.8"    >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8
210 %{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8}
211 %{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8}
212 %{!?_without_ldap:echo ".so authlib.8"  >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8}
213 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8
214 echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8
215
216 gzip -9nf README* imap/BUGS AUTHORS COPYING
217
218 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
219
220 %clean
221 rm -rf $RPM_BUILD_ROOT
222
223 %post
224 /sbin/chkconfig --add courier-imap
225
226 if [ -f /var/lock/subsys/courier-imap ]; then
227         /etc/rc.d/init.d/courier-imap restart >&2
228 else
229         echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon."
230 fi
231
232 %preun
233 if [ "$1" = "0" ]; then
234         if [ -f /var/lock/subsys/courier-imap ]; then
235                 /etc/rc.d/init.d/courier-imap stop >&2
236         fi
237         /sbin/chkconfig --del courier-imap
238 fi
239
240 %post common
241 /sbin/chkconfig --add authdaemon
242
243 if [ -f /var/lock/subsys/authdaemon ]; then
244         /etc/rc.d/init.d/authdaemon restart >&2
245 else
246         echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
247 fi
248
249 %preun common
250 if [ "$1" = "0" ]; then
251         if [ -f /var/lock/subsys/authdaemon ]; then
252                 /etc/rc.d/init.d/authdaemon stop >&2
253         fi
254
255         /sbin/chkconfig --del authdaemon
256 fi
257
258 %post pop3
259 /sbin/chkconfig --add courier-imap-pop3
260
261 if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
262         /etc/rc.d/init.d/courier-imap-pop3 restart >&2
263 else
264         echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon."
265 fi
266
267 %preun pop3
268 if [ "$1" = "0" ]; then
269         if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
270                 /etc/rc.d/init.d/courier-imap-pop3 stop >&2
271         fi
272         /sbin/chkconfig --del courier-imap-pop3
273 fi
274
275 %post authldap
276 METHOD=plain
277 . /etc/sysconfig/authdaemon
278 if [ "$METHOD" = "ldap" ]; then
279         if [ -f /var/lock/subsys/authdaemon ]; then
280                 /etc/rc.d/init.d/authdaemon stop >&2
281         else
282                 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
283         fi
284 fi
285
286 %preun authldap
287 METHOD=plain
288 . /etc/sysconfig/authdaemon
289 if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then
290         if [ -f /var/lock/subsys/authdaemon ]; then
291                 /etc/rc.d/init.d/authdaemon stop >&2
292         fi
293 fi
294
295 %post authmysql
296 METHOD=plain
297 . /etc/sysconfig/authdaemon
298 if [ "$METHOD" = "mysql" ]; then
299         if [ -f /var/lock/subsys/authdaemon ]; then
300                 /etc/rc.d/init.d/authdaemon stop >&2
301         else
302                 echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon."
303         fi
304 fi
305
306 %preun authmysql
307 METHOD=plain
308 . /etc/sysconfig/authdaemon
309 if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then
310         if [ -f /var/lock/subsys/authdaemon ]; then
311                 /etc/rc.d/init.d/authdaemon stop >&2
312         fi
313 fi
314
315 %files
316 %defattr(644,root,root,755)
317 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
318 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
319 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap
320 %attr(754,root,root) /etc/rc.d/init.d/courier-imap
321 %{_sysconfdir}/imapd.cnf
322 %attr(755,root,root) %{_bindir}/imapd
323 %attr(755,root,root) %{_sbindir}/imaplogin
324 %attr(755,root,root) %{_sbindir}/mkimapdcert
325 %{_mandir}/man8/imapd*
326
327 %files common
328 %defattr(644,root,root,755)
329 %doc *.gz imap/*.gz
330 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon
331 %attr(754,root,root) /etc/rc.d/init.d/authdaemon
332 %attr(700,root,root) /var/lib/authdaemon
333 %attr(750,root,root) %dir %{_sysconfdir}
334 %dir %{_libexecdir}
335 %dir %{_libexecdir}/authlib
336 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc
337 %{_sysconfdir}/quotawarnmsg.example
338 %attr(755,root,root) %{_bindir}/couriertls
339 %attr(755,root,root) %{_libexecdir}/authlib/authdaemon
340 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain
341 %attr(755,root,root) %{_libexecdir}/couriertcpd
342 %attr(755,root,root) %{_libexecdir}/logger
343 %attr(755,root,root) %{_libexecdir}/makedatprog
344 %{_mandir}/man8/auth[cdpsuv]*
345 %{_mandir}/man8/authlib*
346 %{_mandir}/man8/couriert*
347 %{_mandir}/man8/mk*
348
349 %files userdb
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_sbindir}/makeuserdb
352 %attr(755,root,root) %{_sbindir}/pw2userdb
353 %attr(755,root,root) %{_sbindir}/userdb
354 %attr(755,root,root) %{_sbindir}/userdbpw
355 %attr(755,root,root) %{_sbindir}/vchkpw2userdb
356 %{_mandir}/man8/makeuserdb*
357 %{_mandir}/man8/userdb*
358 %{_mandir}/man8/*pw2userdb*
359
360 %files deliverquota
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libexecdir}/deliverquota
363 %{_mandir}/man8/deliverquota*
364
365 %files maildirmake
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/maildirmake
368 %{_mandir}/man1/maildirmake*
369
370 %files pop3
371 %defattr(644,root,root,755)
372 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
373 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3
374 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3
375 %attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3
376 %attr(755,root,root) %{_bindir}/pop3d
377 %attr(755,root,root) %{_sbindir}/mkpop3dcert
378 %attr(755,root,root) %{_sbindir}/pop3login
379 %{_sysconfdir}/pop3d.cnf
380
381 %if %{?_without_ldap:0}%{!?_without_ldap:1}
382 %files authldap
383 %defattr(644,root,root,755)
384 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
385 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap
386 %{_mandir}/man8/authldap*
387 %endif
388
389 %if %{?_without_mysql:0}%{!?_without_mysql:1}
390 %files authmysql
391 %defattr(644,root,root,755)
392 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
393 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql
394 %{_mandir}/man8/authmysql*
395 %endif
396
397 %if %{?_without_pgsql:0}%{!?_without_pgsql:1}
398 %files authpgsql
399 %defattr(644,root,root,755)
400 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
401 %attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql
402 %{_mandir}/man8/authpgsql*
403 %endif
This page took 0.055649 seconds and 4 git commands to generate.