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