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