]> git.pld-linux.org Git - packages/dovecot.git/blobdiff - dovecot.spec
- 1.0.2
[packages/dovecot.git] / dovecot.spec
index b1f0628be2a11fcb67b0e33674e3b7b84e327e64..f3d9fe9f40817d23ff04ba4daa87b94e8f178524 100644 (file)
@@ -1,33 +1,51 @@
 #
 # Conditional build:
-# _without_ldap                - without LDAP auth
-# _without_pgsql       - without PostgreSQL auth
-# _without_sasl                - without SASL auth
+%bcond_without ldap    # without LDAP auth
+%bcond_without mysql   # without MySQL auth
+%bcond_without pgsql   # without PostgreSQL auth
+%bcond_without sqlite  # without SQLite3 auth
+%bcond_without sasl    # without SASL auth
 #
 Summary:       IMAP and POP3 server written with security primarily in mind
-Summary(pl):   Serwer IMAP i POP3 pisany g³ównie z my¶l± o bezpieczeñstwie
+Summary(pl.UTF-8):     Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
 Name:          dovecot
-Version:       0.99.10.4
-Release:       3
-License:       LGPL v2.1
+Version:       1.0.2
+Release:       1
+License:       LGPL v2.1 and MIT
 Group:         Networking/Daemons
-Source0:       http://dovecot.procontrol.fi/%{name}-%{version}.tar.gz
-# Source0-md5: 81eda7985e99d28acd6d286aa0e13e07
+Source0:       http://dovecot.org/releases/%{name}-%{version}.tar.gz
+# Source0-md5: 769f0dd2750e7de521de3396999a09e5
 Source1:       %{name}.pamd
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
 Patch0:                %{name}-config.patch
-URL:           http://dovecot.procontrol.fi/
+#Patch1:               %{name}-branch.diff
+Patch2:                %{name}-dspam-plugin.patch
+URL:           http://dovecot.org/
 BuildRequires: autoconf
 BuildRequires: automake
-%{!?_without_sasl:BuildRequires:       cyrus-sasl-devel >= 2.0}
+%{?with_sasl:BuildRequires:    cyrus-sasl-devel >= 2.0}
+BuildRequires: krb5-devel
+BuildRequires: gettext-devel
 BuildRequires: libtool
-%{!?_without_ldap:BuildRequires:       openldap-devel}
+%{?with_mysql:BuildRequires:   mysql-devel}
+%{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pam-devel
-%{!?_without_pgsql:BuildRequires:      postgresql-devel}
+BuildRequires: pkgconfig
+%{?with_pgsql:BuildRequires:   postgresql-devel}
+BuildRequires: sed >= 4.0
+%{?with_sqlite:BuildRequires:  sqlite3-devel}
 Requires(post,preun):  /sbin/chkconfig
-Requires:      pam >= 0.77.3
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires:      pam >= 0.79.0
+Provides:      group(dovecot)
+Provides:      user(dovecot)
 Provides:      imapdaemon
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,55 +70,57 @@ mailbox, Dovecot can get most of the wanted information from index
 with little effort.
 
 Status:
- - should be quite ready for use with normal IMAP clients
- - complete IMAP4rev1 support
- - supports THREAD and SORT extensions, required by many IMAP webmails
- - complete TLS/SSL support, using either GNUTLS or OpenSSL
- - IPv6 ready
- - shared mailboxes aren't yet supported
- - Maildir++ quota isn't yet supported; hard filesystem quota can also
-   be problematic
- - mbox support isn't yet perfect - there's a few more or less
-   theoretical problems, but nothing too bad.
-
-%description -l pl
-Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
-pisany g³ównie z my¶l± o bezpieczeñstwie. Chocia¿ jest pisany w C,
-u¿ywa kilku technik kodowania zapobiegaj±cych wiêkszo¶ci popularnych
-pu³apek.
-
-Dovecot mo¿e dzia³aæ ze standardowymi formatami mbox i maildir, jest
-ca³kowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a tak¿e z
-klientami pocztowymi bezpo¶rednio dostaj±cymi siê do skrzynek.
-Planowana jest tak¿e obs³uga przechowywania listów w bazach SQL.
-
-Dovecot jest ³atwy do skonfigurowania i nie wymaga specjalnego
-nadzoru. Wystarczy tylko doprowadziæ do dzia³ania uwierzytelnianie -
-je¶li u¿ytkownicy s± w /etc/passwd, to w³a¶ciwie nie trzeba nic
-zmieniaæ.
-
-Dovecot powinien byæ w miarê szybki, g³ównie z powodu plików
+- should be quite ready for use with normal IMAP clients
+- complete IMAP4rev1 and POP3 support
+- supports THREAD, SORT and IDLE extensions, required by many IMAP
+  webmails
+- complete TLS/SSL support
+- IPv6 ready
+- shared mailboxes aren't yet supported
+- Maildir++ quota is supported, bad hard filesystem quota can be
+  problematic
+
+%description -l pl.UTF-8
+Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
+pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
+używa kilku technik kodowania zapobiegających większości popularnych
+pułapek.
+
+Dovecot może działać ze standardowymi formatami mbox i maildir, jest
+całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
+klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
+Planowana jest także obsługa przechowywania listów w bazach SQL.
+
+Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
+nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
+jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
+zmieniać.
+
+Dovecot powinien być w miarę szybki, głównie z powodu plików
 indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
-wszystkich danych w skrzynce, Dovecot mo¿e ma³ym kosztem uzyskaæ
-wiêkszo¶æ potrzebnych informacji z indeksu.
+wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
+większość potrzebnych informacji z indeksu.
 
 Stan:
- - powinien byæ gotowy do u¿ycia ze zwyk³ymi klientami IMAP
- - pe³na obs³uga IMAP4rev1
- - obs³uga rozszerzeñ THREAD i SORT, wymaganych przez wiele webmaili
-   IMAP
- - obs³uga IPv6
- - jeszcze nie ma wspó³dzielonych skrzynek
- - quota Maildir++ jeszcze nie jest obs³ugiwana; twarda quota na
-   systemach plików mo¿e sprawiaæ problemy
- - obs³uga mboksów jeszcze nie jest idealna - jest jeszcze kilka mniej
-   lub bardziej teoretycznych problemów, ale nic strasznego.
+- powinien być gotowy do użycia ze zwykłymi klientami IMAP
+- pełna obsługa IMAP4rev1 i POP3
+- obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
+  webmaili IMAP
+- obsługa IPv6
+- pełna obsługa TLS/SSL
+- quota Maildir++ jest obsługiwana, ale twarda quota na systemach
+  plików może być problematyczna
 
 %prep
 %setup -q
 %patch0 -p1
+#%patch1 -p1
+%patch2 -p1
+
+%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
 
 %build
+touch config.rpath
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
@@ -108,22 +128,29 @@ Stan:
 %{__automake}
 %configure \
        %{?debug:--enable-debug} \
-       %{!?_without_ldap:--with-ldap} \
-       %{!?_without_pgsql:--with-pgsql} \
-       %{!?_without_sasl:--with-cyrus-sasl2} \
+       %{?with_ldap:--with-ldap} \
+       %{?with_mysql:--with-mysql} \
+       %{?with_pgsql:--with-pgsql} \
+       %{?with_sasl:--with-cyrus-sasl2} \
+       %{?with_sqlite:--with-sqlite} \
+       --with-gssapi \
        --with-ssl=openssl \
-       --with-ssl-dir=/var/lib/openssl
+       --with-ssl-dir=/var/lib/openssl \
+       --sysconfdir=/etc/%{name}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
+install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
 
 %{__make} install \
+       moduledir=%{_libdir}/%{name}/plugins \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv -f $RPM_BUILD_ROOT%{_sysconfdir}/{dovecot-example.conf,dovecot.conf}
+mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
@@ -134,6 +161,10 @@ touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 172 dovecot
+%useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
+
 %post
 /sbin/chkconfig --add dovecot
 if [ -f /var/lock/subsys/dovecot ]; then
@@ -150,14 +181,25 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del dovecot
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %userremove dovecot
+       %groupremove dovecot
+fi
+
 %files
 %defattr(644,root,root,755)
 # COPYING contains some notes, not actual LGPL text
-%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f
+%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
 %attr(755,root,root) %{_sbindir}/%{name}
-%config(noreplace) %verify(not size mtime md5) /etc/%{name}.conf
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/%{name}
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
+%attr(755,root,root) %{_sbindir}/%{name}pw
+%attr(750,root,root) %dir %{_sysconfdir}/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(755,root,root) %{_libdir}/%{name}
+%dir /var/lib/dovecot
+%dir /var/run/dovecot
+%attr(750,root,dovecot) %dir /var/run/dovecot/login
This page took 0.139214 seconds and 4 git commands to generate.