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