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