]> git.pld-linux.org Git - packages/dovecot.git/blob - dovecot.spec
Release 3 (by relup.sh)
[packages/dovecot.git] / dovecot.spec
1 #
2 # Conditional build:
3 %bcond_without  gssapi  # without GSSAPI support
4 %bcond_without  ldap    # without LDAP auth
5 %bcond_without  mysql   # without MySQL auth
6 %bcond_without  pgsql   # without PostgreSQL auth
7 %bcond_without  sqlite  # without SQLite3 auth
8 %bcond_without  sasl    # without SASL auth
9 %bcond_without  tests   # tests
10
11 Summary:        IMAP and POP3 server written with security primarily in mind
12 Summary(pl.UTF-8):      Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
13 Name:           dovecot
14 Version:        2.2.33.2
15 Release:        1
16 Epoch:          1
17 License:        MIT (libraries), LGPL v2.1 (the rest)
18 Group:          Networking/Daemons
19 Source0:        http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
20 # Source0-md5:  85c3e903870aee914be93889a6ea98ea
21 Source1:        %{name}.pamd
22 Source2:        %{name}.init
23 Source3:        %{name}.sysconfig
24 Source4:        %{name}.tmpfiles
25 Patch0:         %{name}-config.patch
26 Patch1:         %{name}-rpath.patch
27
28 Patch3:         %{name}-disableSSLv3.patch
29 URL:            http://dovecot.org/
30 BuildRequires:  autoconf
31 BuildRequires:  automake
32 BuildRequires:  bzip2-devel
33 BuildRequires:  clucene-core-devel >= 2.3.3.4
34 BuildRequires:  curl-devel
35 %{?with_sasl:BuildRequires:     cyrus-sasl-devel >= 2.0}
36 BuildRequires:  expat-devel
37 BuildRequires:  gettext-tools
38 %{?with_gssapi:BuildRequires:   heimdal-devel}
39 BuildRequires:  libapparmor-devel
40 BuildRequires:  libcap-devel
41 BuildRequires:  libicu-devel
42 BuildRequires:  libstemmer-devel
43 BuildRequires:  libexttextcat-devel
44 BuildRequires:  libtool
45 BuildRequires:  lz4-devel
46 %{?with_mysql:BuildRequires:    mysql-devel}
47 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.3}
48 BuildRequires:  openssl-devel >= 0.9.7d
49 BuildRequires:  pam-devel
50 BuildRequires:  pkgconfig
51 %{?with_pgsql:BuildRequires:    postgresql-devel}
52 BuildRequires:  rpmbuild(macros) >= 1.647
53 BuildRequires:  sed >= 4.0
54 %{?with_sqlite:BuildRequires:   sqlite3-devel}
55 BuildRequires:  xz-devel
56 BuildRequires:  zlib-devel
57 Requires(post,preun):   /sbin/chkconfig
58 Requires(postun):       /usr/sbin/groupdel
59 Requires(postun):       /usr/sbin/userdel
60 Requires(pre):  /bin/id
61 Requires(pre):  /usr/bin/getgid
62 Requires(pre):  /usr/sbin/groupadd
63 Requires(pre):  /usr/sbin/useradd
64 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
65 Requires:       pam >= 0.79.0
66 Provides:       group(dovecot)
67 Provides:       imapdaemon
68 Provides:       pop3daemon
69 Provides:       user(dovecot)
70 # heimdal-daemons in PLD contained only "popper" (kerberized POP3 daemon)
71 %{?with_gssapi:Obsoletes:       heimdal-daemons}
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 %define         no_install_post_check_so        1
75
76 %description
77 Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
78 written with security primarily in mind. Although it's written with C,
79 it uses several coding techniques to avoid most of the common
80 pitfalls.
81
82 Dovecot can work with standard mbox and maildir formats and it's fully
83 compatible with UW-IMAP and Courier IMAP servers as well as mail
84 clients accessing the mailboxes directly. It's also planned to support
85 storing mails in SQL databases.
86
87 Dovecot is easy to set up and doesn't require special maintenance.
88 Only thing you need is to get the authentication working properly - if
89 your users are in /etc/passwd there's hardly anything you have to do.
90
91 Dovecot should be pretty fast, mostly because of index files that
92 Dovecot maintains; instead of having to scan through all the data in
93 mailbox, Dovecot can get most of the wanted information from index
94 with little effort.
95
96 Status:
97 - should be quite ready for use with normal IMAP clients
98 - complete IMAP4rev1 and POP3 support
99 - supports THREAD, SORT and IDLE extensions, required by many IMAP
100   webmails
101 - complete TLS/SSL support
102 - IPv6 ready
103 - shared mailboxes aren't yet supported
104 - Maildir++ quota is supported, bad hard filesystem quota can be
105   problematic
106
107 %description -l pl.UTF-8
108 Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
109 pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
110 używa kilku technik kodowania zapobiegających większości popularnych
111 pułapek.
112
113 Dovecot może działać ze standardowymi formatami mbox i maildir, jest
114 całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
115 klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
116 Planowana jest także obsługa przechowywania listów w bazach SQL.
117
118 Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
119 nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
120 jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
121 zmieniać.
122
123 Dovecot powinien być w miarę szybki, głównie z powodu plików
124 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
125 wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
126 większość potrzebnych informacji z indeksu.
127
128 Stan:
129 - powinien być gotowy do użycia ze zwykłymi klientami IMAP
130 - pełna obsługa IMAP4rev1 i POP3
131 - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
132   webmaili IMAP
133 - obsługa IPv6
134 - pełna obsługa TLS/SSL
135 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
136   plików może być problematyczna
137
138 %package libs
139 Summary:        Dovecot shared libraries
140 Summary(pl.UTF-8):      Współdzielone biblioteki Dovecota
141 Group:          Development/Libraries
142
143 %description libs
144 Dovecot shared libraries.
145
146 %description libs -l pl.UTF-8
147 Współdzielone biblioteki Dovecota.
148
149 %package devel
150 Summary:        Development package for Dovecot plugins
151 Summary(pl.UTF-8):      Pakiet programistyczny do tworzenia wtyczek dla Dovecota
152 Group:          Development/Libraries
153 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
154
155 %description devel
156 Development package for Dovecot plugins.
157
158 %description devel -l pl.UTF-8
159 Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
160
161 %prep
162 %setup -q
163 %patch0 -p1
164 %patch1 -p1
165
166 %patch3 -p1
167
168 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
169
170 %build
171 touch config.rpath
172 %{__libtoolize}
173 %{__aclocal} -I . -I m4
174 %{__autoconf}
175 %{__autoheader}
176 %{__automake}
177 %configure \
178         ac_cv_prog_VALGRIND=no \
179         CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer -D_LINUX_QUOTA_VERSION=2" \
180         --disable-static \
181         %{?debug:--enable-debug} \
182         %{?with_ldap:--with-ldap=yes} \
183         %{?with_mysql:--with-mysql} \
184         %{?with_pgsql:--with-pgsql} \
185         %{?with_sqlite:--with-sqlite} \
186         %{?with_gssapi:--with-gssapi=plugin} \
187         --with-lucene \
188         --with-stemmer \
189         --with-solr \
190         --with-sql=plugin \
191         --with-pam \
192         --with-zlib \
193         --with-bzlib \
194         --with-libcap \
195         --with-ssl=openssl \
196         --with-moduledir=%{_libdir}/%{name}/plugins \
197         --with-ssldir=/var/lib/openssl \
198         --sysconfdir=%{_sysconfdir} \
199         --with-systemdsystemunitdir=%{systemdunitdir}
200
201 %{__make}
202
203 %{?with_tests:%{__make} check}
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
208         $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
209         $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
210
211 %{__make} install \
212         DESTDIR=$RPM_BUILD_ROOT
213
214 mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
215
216 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
217 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
218 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
219 install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
220
221 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
222
223 find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
224
225 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
226 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
227
228 %clean
229 rm -rf $RPM_BUILD_ROOT
230
231 %pre
232 %groupadd -g 172 dovecot
233 %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
234 %groupadd -g 254 dovenull
235 %useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
236
237 %post
238 /sbin/chkconfig --add dovecot
239 %service dovecot restart
240 %systemd_post dovecot.socket dovecot.service
241
242 %preun
243 if [ "$1" = "0" ]; then
244         %service dovecot stop
245         /sbin/chkconfig --del dovecot
246 fi
247 %systemd_preun dovecot.service dovecot.socket
248
249 %postun
250 if [ "$1" = "0" ]; then
251         %userremove dovecot
252         %groupremove dovecot
253         %userremove dovenull
254         %groupremove dovenull
255 fi
256 %systemd_reload
257
258 %post   libs -p /sbin/ldconfig
259 %postun libs -p /sbin/ldconfig
260
261 %triggerin -- pam
262 # restart devocot if pam is upgraded
263 # (dovecot is linked with old libpam but tries to open modules linked with new libpam)
264 if [ "$2" != 1 ]; then
265         %service -q dovecot restart
266 fi
267
268 %triggerpostun -- dovecot < 1:2.0.0
269 # upgrading dovecot < 1.1
270 echo "Configuration change default_mail_env -> mail_location"
271 %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
272 # upgrading dovecot < 2.0
273 i=0
274 for a in /etc/dovecot/dovecot-db-example.conf \
275         /etc/dovecot/dovecot-dict-sql-example.conf \
276         /etc/dovecot/dovecot-ldap-example.conf \
277         /etc/dovecot/dovecot-sql-example.conf \
278         /etc/dovecot/dovecot.conf; do
279         if [ -f "$a" ]; then
280                 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
281                 i=1
282                 echo "Trying to migrate $a config file to dovecot 2."
283                 cp -a "$a" "$a-1.2.org"
284                 :> "$a.log"
285                 chmod 600 "$a.log"
286                 # convert config and prefix stderr lines with #
287                 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
288         fi
289 done
290 if [ "$i" -eq 1 ]; then
291         echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
292 fi
293
294 %triggerpostun -- %{name} < 1:2.2.4-2
295 %systemd_trigger dovecot.service dovecot.socket
296
297 %files
298 %defattr(644,root,root,755)
299 # COPYING contains some notes, not actual LGPL text
300 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
301 %attr(755,root,root) %{_bindir}/doveadm
302 %attr(755,root,root) %{_bindir}/doveconf
303 %attr(755,root,root) %{_bindir}/dsync
304 %attr(755,root,root) %{_sbindir}/%{name}
305 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
306 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
307 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
308 %attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
310 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
311 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
312 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
314 %attr(754,root,root) /etc/rc.d/init.d/%{name}
315 %attr(755,root,root) %{_libdir}/%{name}/aggregator
316 %attr(755,root,root) %{_libdir}/%{name}/anvil
317 %attr(755,root,root) %{_libdir}/%{name}/auth
318 %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
319 %attr(755,root,root) %{_libdir}/%{name}/config
320 %attr(755,root,root) %{_libdir}/%{name}/decode2text.sh
321 %attr(755,root,root) %{_libdir}/%{name}/deliver
322 %attr(755,root,root) %{_libdir}/%{name}/dict
323 %attr(755,root,root) %{_libdir}/%{name}/director
324 %attr(755,root,root) %{_libdir}/%{name}/dns-client
325 %attr(755,root,root) %{_libdir}/%{name}/doveadm-server
326 %attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
327 %attr(755,root,root) %{_libdir}/%{name}/gdbhelper
328 %attr(755,root,root) %{_libdir}/%{name}/imap
329 %attr(755,root,root) %{_libdir}/%{name}/imap-hibernate
330 %attr(755,root,root) %{_libdir}/%{name}/imap-login
331 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth
332 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-login
333 %attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-worker
334 %attr(755,root,root) %{_libdir}/%{name}/indexer
335 %attr(755,root,root) %{_libdir}/%{name}/indexer-worker
336 %attr(755,root,root) %{_libdir}/%{name}/ipc
337 %attr(755,root,root) %{_libdir}/%{name}/libdcrypt_openssl.so
338 %attr(755,root,root) %{_libdir}/%{name}/lmtp
339 %attr(755,root,root) %{_libdir}/%{name}/log
340 %attr(755,root,root) %{_libdir}/%{name}/maildirlock
341 %attr(755,root,root) %{_libdir}/%{name}/pop3
342 %attr(755,root,root) %{_libdir}/%{name}/pop3-login
343 %attr(755,root,root) %{_libdir}/%{name}/quota-status
344 %attr(755,root,root) %{_libdir}/%{name}/rawlog
345 %attr(755,root,root) %{_libdir}/%{name}/replicator
346 %attr(755,root,root) %{_libdir}/%{name}/script
347 %attr(755,root,root) %{_libdir}/%{name}/script-login
348 %attr(755,root,root) %{_libdir}/%{name}/ssl-params
349 %attr(755,root,root) %{_libdir}/%{name}/stats
350 %attr(755,root,root) %{_libdir}/%{name}/xml2text
351 %dir %{_libdir}/%{name}/plugins
352 %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
353 %dir %{_libdir}/%{name}/plugins/auth
354 %attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
355 %dir %{_libdir}/%{name}/plugins/dict
356 %attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
357 %dir %{_libdir}/%{name}/plugins/doveadm
358 %attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
359 %dir %{_libdir}/%{name}/plugins/stats
360 %attr(755,root,root) %{_libdir}/%{name}/plugins/stats/*.so
361 %{_datadir}/dovecot
362 %{systemdunitdir}/dovecot.service
363 %{systemdunitdir}/dovecot.socket
364 /usr/lib/tmpfiles.d/%{name}.conf
365 %dir /var/lib/dovecot
366 %dir /var/run/dovecot
367 %attr(750,root,dovenull) %dir /var/run/dovecot/login
368
369 %{_mandir}/man1/deliver.1*
370 %{_mandir}/man1/dove*.1*
371 %{_mandir}/man1/dsync.1*
372 %{_mandir}/man7/doveadm-search-query.7*
373
374 %files libs
375 %defattr(644,root,root,755)
376 %dir %{_libdir}/%{name}
377
378 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
379 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
380 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
381 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0.0.0
382 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
383 %{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0.0.0}
384 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
385 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
386 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
387 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
388 # directory. This is why the following files are not %ghost
389 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
390 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
391 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
392 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0
393 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
394 %{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0}
395 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
396 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
397 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0
398
399 %files devel
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
402 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
403 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
404 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so
405 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
406 %{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so}
407 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
408 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
409 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
410 %{_libdir}/%{name}/%{name}-config
411 %{_includedir}/%{name}
412 %{_aclocaldir}/dovecot.m4
This page took 0.16015 seconds and 3 git commands to generate.