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