]> git.pld-linux.org Git - packages/dovecot.git/blame_incremental - dovecot.spec
- make it build with current th
[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: 1.2.17
14Release: 2
15Epoch: 1
16License: MIT (libraries), LGPL v2.1 (the rest)
17Group: Networking/Daemons
18Source0: http://dovecot.org/releases/1.2/%{name}-%{version}.tar.gz
19# Source0-md5: a2c01cb0a9c54302d0870fdc3e6d2106
20Source1: %{name}.pamd
21Source2: %{name}.init
22Source3: %{name}.sysconfig
23Source4: %{name}.tmpfiles
24Patch0: %{name}-config.patch
25Patch1: %{name}-build.patch
26URL: http://dovecot.org/
27BuildRequires: autoconf
28BuildRequires: automake
29BuildRequires: bzip2-devel
30%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
31BuildRequires: gettext-devel
32%{?with_gssapi:BuildRequires: heimdal-devel}
33BuildRequires: libcap-devel
34BuildRequires: libtool
35%{?with_mysql:BuildRequires: mysql-devel}
36%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
37BuildRequires: openssl-devel >= 0.9.7d
38BuildRequires: pam-devel
39BuildRequires: pkgconfig
40%{?with_pgsql:BuildRequires: postgresql-devel}
41BuildRequires: sed >= 4.0
42%{?with_sqlite:BuildRequires: sqlite3-devel}
43BuildRequires: zlib-devel
44Requires(post,preun): /sbin/chkconfig
45Requires(postun): /usr/sbin/groupdel
46Requires(postun): /usr/sbin/userdel
47Requires(pre): /bin/id
48Requires(pre): /usr/bin/getgid
49Requires(pre): /usr/sbin/groupadd
50Requires(pre): /usr/sbin/useradd
51Requires: pam >= 0.79.0
52Provides: group(dovecot)
53Provides: imapdaemon
54Provides: user(dovecot)
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
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
74mailbox, Dovecot can get most of the wanted information from index
75with little effort.
76
77Status:
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
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.
93
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.
98
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ć.
103
104Dovecot powinien być w miarę szybki, głównie z powodu plików
105indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
106wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
107większość potrzebnych informacji z indeksu.
108
109Stan:
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
120Summary: Development package for dovecot plugins
121Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota
122Group: Development/Libraries
123# doesn't require base
124
125%description devel
126Development package for dovecot plugins.
127
128%description devel -l pl.UTF-8
129Pakiet programistyczny do tworzenia wtyczek dla dovecota.
130
131%prep
132%setup -q
133%patch0 -p1
134%patch1 -p1
135
136%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
137
138%build
139touch config.rpath
140%{__libtoolize}
141%{__aclocal}
142%{__autoconf}
143%{__autoheader}
144%{__automake}
145%configure \
146 --disable-static \
147 %{?debug:--enable-debug} \
148 --enable-header-install \
149 %{?with_ldap:--with-ldap=yes} \
150 %{?with_mysql:--with-mysql} \
151 %{?with_pgsql:--with-pgsql} \
152 %{?with_sqlite:--with-sqlite} \
153 %{?with_gssapi:--with-gssapi} \
154 --with-zlib \
155 --with-bzlib \
156 --with-libcap \
157 --with-ssl=openssl \
158 --with-ssldir=/var/lib/openssl \
159 --sysconfdir=/etc/%{name}
160
161%{__make}
162
163%install
164rm -rf $RPM_BUILD_ROOT
165install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
166 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
167 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
168
169%{__make} install \
170 moduledir=%{_libdir}/%{name}/plugins \
171 DESTDIR=$RPM_BUILD_ROOT
172
173mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
174
175install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
176install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
177install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
178install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
179
180touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
181
182rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la
183
184# devel
185for folder in deliver imap lib lib-dict lib-imap lib-mail lib-storage; do
186 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder
187 install -p -m644 src/$folder/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder/
188done
189for dir in lib lib-auth lib-charset lib-dict lib-imap lib-index lib-mail lib-storage; do
190 for file in $(find src/$dir -name '*.a'); do
191 install -D -m644 $file $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/$file
192 done
193done
194mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
195
196rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
197
198%clean
199rm -rf $RPM_BUILD_ROOT
200
201%pre
202%groupadd -g 172 dovecot
203%useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
204
205%post
206/sbin/chkconfig --add dovecot
207if [ -f /var/lock/subsys/dovecot ]; then
208 /etc/rc.d/init.d/dovecot restart >&2
209else
210 echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
211fi
212
213%preun
214if [ "$1" = "0" ]; then
215 if [ -f /var/lock/subsys/dovecot ]; then
216 /etc/rc.d/init.d/dovecot stop >&2
217 fi
218 /sbin/chkconfig --del dovecot
219fi
220
221%postun
222if [ "$1" = "0" ]; then
223 %userremove dovecot
224 %groupremove dovecot
225fi
226
227%triggerpostun -- dovecot < 1:1.1
228echo "Configuration change default_mail_env -> mail_location"
229%{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
230
231%files
232%defattr(644,root,root,755)
233# COPYING contains some notes, not actual LGPL text
234%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
235%attr(755,root,root) %{_sbindir}/%{name}
236%attr(755,root,root) %{_sbindir}/%{name}pw
237%attr(751,root,root) %dir %{_sysconfdir}/%{name}
238%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
239%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf
240%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-dict-sql-example.conf
241%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf
242%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf
243%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
244%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
245%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
246%attr(754,root,root) /etc/rc.d/init.d/%{name}
247%dir %{_libdir}/%{name}
248%attr(755,root,root) %{_libdir}/%{name}/authtest
249%attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
250%attr(755,root,root) %{_libdir}/%{name}/deliver
251%attr(755,root,root) %{_libdir}/%{name}/dict
252%attr(755,root,root) %{_libdir}/%{name}/dovecot-auth
253%attr(755,root,root) %{_libdir}/%{name}/gdbhelper
254%attr(755,root,root) %{_libdir}/%{name}/idxview
255%attr(755,root,root) %{_libdir}/%{name}/imap
256%attr(755,root,root) %{_libdir}/%{name}/imap-login
257%attr(755,root,root) %{_libdir}/%{name}/imap-utf7
258%attr(755,root,root) %{_libdir}/%{name}/convert-tool
259%attr(755,root,root) %{_libdir}/%{name}/expire-tool
260%attr(755,root,root) %{_libdir}/%{name}/listview
261%attr(755,root,root) %{_libdir}/%{name}/logview
262%attr(755,root,root) %{_libdir}/%{name}/maildirlock
263%attr(755,root,root) %{_libdir}/%{name}/pop3
264%attr(755,root,root) %{_libdir}/%{name}/pop3-login
265%attr(755,root,root) %{_libdir}/%{name}/rawlog
266%attr(755,root,root) %{_libdir}/%{name}/ssl-build-param
267%attr(755,root,root) %{_libdir}/%{name}/threadview
268%dir %{_libdir}/%{name}/plugins
269%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
270#%dir %{_libdir}/%{name}/plugins/auth
271#%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so
272%dir %{_libdir}/%{name}/plugins/imap
273%attr(755,root,root)%{_libdir}/%{name}/plugins/imap/*.so
274%dir %{_libdir}/%{name}/plugins/lda
275%attr(755,root,root) %{_libdir}/%{name}/plugins/lda/*.so
276%dir %{_libdir}/%{name}/plugins/pop3
277%attr(755,root,root) %{_libdir}/%{name}/plugins/pop3/*.so
278%{systemdtmpfilesdir}/%{name}.conf
279%dir /var/lib/dovecot
280%dir /var/run/dovecot
281%attr(750,root,dovecot) %dir /var/run/dovecot/login
282
283%files devel
284%defattr(644,root,root,755)
285%{_libdir}/%{name}-devel
286%{_includedir}/%{name}
This page took 0.037891 seconds and 4 git commands to generate.