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