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