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