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