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