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