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