]> git.pld-linux.org Git - packages/dovecot.git/blame - dovecot.spec
- make it build with current th
[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
16ab6a6e 23Source4: %{name}.tmpfiles
8d47df47 24Patch0: %{name}-config.patch
16ab6a6e 25Patch1: %{name}-build.patch
027cb77c 26URL: http://dovecot.org/
0928494a
JB
27BuildRequires: autoconf
28BuildRequires: automake
d9e4e4b3 29BuildRequires: bzip2-devel
f4230487 30%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
b7e03084 31BuildRequires: gettext-devel
1ab66923 32%{?with_gssapi:BuildRequires: heimdal-devel}
d9e4e4b3 33BuildRequires: libcap-devel
0928494a 34BuildRequires: libtool
f4230487 35%{?with_mysql:BuildRequires: mysql-devel}
2e75e92c 36%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
6ceb4d17 37BuildRequires: openssl-devel >= 0.9.7d
6865becd 38BuildRequires: pam-devel
b7e03084 39BuildRequires: pkgconfig
f4230487 40%{?with_pgsql:BuildRequires: postgresql-devel}
930a78ad 41BuildRequires: sed >= 4.0
a0260ad9 42%{?with_sqlite:BuildRequires: sqlite3-devel}
d9e4e4b3 43BuildRequires: zlib-devel
8d47df47 44Requires(post,preun): /sbin/chkconfig
c1df1ed1
KK
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
50c4e802 51Requires: pam >= 0.79.0
c1df1ed1 52Provides: group(dovecot)
8d47df47 53Provides: imapdaemon
660b9616 54Provides: user(dovecot)
b8f6d56a
JB
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
8d47df47
TO
74mailbox, Dovecot can get most of the wanted information from index
75with little effort.
b8f6d56a
JB
76
77Status:
ddfebb5d 78- should be quite ready for use with normal IMAP clients
3fcc147b
KK
79- complete IMAP4rev1 and POP3 support
80- supports THREAD, SORT and IDLE extensions, required by many IMAP
81 webmails
82- complete TLS/SSL support
ddfebb5d 83- IPv6 ready
84- shared mailboxes aren't yet supported
3fcc147b
KK
85- Maildir++ quota is supported, bad hard filesystem quota can be
86 problematic
b8f6d56a 87
db6f7644
JR
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.
0928494a 93
db6f7644
JR
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.
0928494a 98
db6f7644
JR
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ć.
0928494a 103
db6f7644 104Dovecot powinien być w miarę szybki, głównie z powodu plików
0928494a 105indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
db6f7644
JR
106wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
107większość potrzebnych informacji z indeksu.
0928494a
JB
108
109Stan:
db6f7644
JR
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
3fcc147b 113 webmaili IMAP
db6f7644
JR
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
0928494a 118
ee9bfb11 119%package devel
d3be9b82
JB
120Summary: Development package for dovecot plugins
121Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla dovecota
1f7b33f9 122Group: Development/Libraries
e208bc1e 123# doesn't require base
ee9bfb11
JS
124
125%description devel
d3be9b82
JB
126Development package for dovecot plugins.
127
128%description devel -l pl.UTF-8
129Pakiet programistyczny do tworzenia wtyczek dla dovecota.
ee9bfb11 130
b8f6d56a
JB
131%prep
132%setup -q
8d47df47 133%patch0 -p1
16ab6a6e 134%patch1 -p1
77217d94 135
3fcc147b 136%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
b8f6d56a
JB
137
138%build
06cf0ac5 139touch config.rpath
b8f6d56a
JB
140%{__libtoolize}
141%{__aclocal}
142%{__autoconf}
143%{__autoheader}
144%{__automake}
6865becd 145%configure \
ba932ed4 146 --disable-static \
6865becd 147 %{?debug:--enable-debug} \
ba932ed4 148 --enable-header-install \
3082a74f 149 %{?with_ldap:--with-ldap=yes} \
f4230487
JB
150 %{?with_mysql:--with-mysql} \
151 %{?with_pgsql:--with-pgsql} \
a0260ad9 152 %{?with_sqlite:--with-sqlite} \
a3e1a654 153 %{?with_gssapi:--with-gssapi} \
d9e4e4b3
AM
154 --with-zlib \
155 --with-bzlib \
156 --with-libcap \
6865becd 157 --with-ssl=openssl \
d9e4e4b3 158 --with-ssldir=/var/lib/openssl \
c19c6ee3 159 --sysconfdir=/etc/%{name}
b8f6d56a
JB
160
161%{__make}
162
163%install
164rm -rf $RPM_BUILD_ROOT
16ab6a6e
AM
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}
b8f6d56a
JB
168
169%{__make} install \
442c32c1 170 moduledir=%{_libdir}/%{name}/plugins \
b8f6d56a
JB
171 DESTDIR=$RPM_BUILD_ROOT
172
c19c6ee3 173mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
b8f6d56a 174
8d47df47
TO
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}
16ab6a6e 178install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
8d47df47
TO
179
180touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
181
f3c52879 182rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la
ee9bfb11 183
ba932ed4 184# devel
0d45eb1b 185for folder in deliver imap lib lib-dict lib-imap lib-mail lib-storage; do
edd42453
AG
186 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder
187 install -p -m644 src/$folder/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder/
188done
0d45eb1b 189for dir in lib lib-auth lib-charset lib-dict lib-imap lib-index lib-mail lib-storage; do
400f2756
AM
190 for file in $(find src/$dir -name '*.a'); do
191 install -D -m644 $file $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/$file
192 done
ee9bfb11 193done
7034c8c5 194mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
1f7b33f9 195
4830c316 196rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
1f7b33f9 197
b8f6d56a
JB
198%clean
199rm -rf $RPM_BUILD_ROOT
200
c1df1ed1
KK
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
8d47df47
TO
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
c1df1ed1
KK
221%postun
222if [ "$1" = "0" ]; then
223 %userremove dovecot
224 %groupremove dovecot
225fi
226
fdaf3880
PG
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
b8f6d56a
JB
231%files
232%defattr(644,root,root,755)
233# COPYING contains some notes, not actual LGPL text
caf88cd1 234%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
8d47df47 235%attr(755,root,root) %{_sbindir}/%{name}
442c32c1 236%attr(755,root,root) %{_sbindir}/%{name}pw
15872051 237%attr(751,root,root) %dir %{_sysconfdir}/%{name}
c19c6ee3 238%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
3d6a238e 239%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf
f3c52879 240%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-dict-sql-example.conf
bc671450
AG
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
c5c6a170 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}
8d47df47 246%attr(754,root,root) /etc/rc.d/init.d/%{name}
d3be9b82 247%dir %{_libdir}/%{name}
2c2eddaa 248%attr(755,root,root) %{_libdir}/%{name}/authtest
ee9bfb11
JS
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
d9e4e4b3 257%attr(755,root,root) %{_libdir}/%{name}/imap-utf7
edd42453
AG
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
ee9bfb11 261%attr(755,root,root) %{_libdir}/%{name}/logview
77ad1fc7 262%attr(755,root,root) %{_libdir}/%{name}/maildirlock
ee9bfb11
JS
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
d9e4e4b3 267%attr(755,root,root) %{_libdir}/%{name}/threadview
d3be9b82 268%dir %{_libdir}/%{name}/plugins
ee9bfb11 269%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
3082a74f 270#%dir %{_libdir}/%{name}/plugins/auth
271#%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so
ee9bfb11
JS
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
16ab6a6e 278%{systemdtmpfilesdir}/%{name}.conf
e7291b43 279%dir /var/lib/dovecot
c1df1ed1
KK
280%dir /var/run/dovecot
281%attr(750,root,dovecot) %dir /var/run/dovecot/login
ee9bfb11
JS
282
283%files devel
284%defattr(644,root,root,755)
ba932ed4 285%{_libdir}/%{name}-devel
ee9bfb11 286%{_includedir}/%{name}
This page took 0.115925 seconds and 4 git commands to generate.