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