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