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