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