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