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