To znowu ja.
Dodałem łatkę managesieve (--with managesieve).
Prośba o sprawdzenie moich wypocin i wskazówki
co ew. zmienić czy poprawić. Zdaję sobie sprawę,
że cudo to to nie jest, ale zdaje się działać.
--
Pozdrawiam,
Paweł 'duddits' Długosz
:: http://dlugosz.eu ::
Index: dovecot.spec
===================================================================
RCS file: /cvsroot/SPECS/dovecot.spec,v
retrieving revision 1.95
diff -u -r1.95 dovecot.spec
--- dovecot.spec 2 Sep 2008 20:31:51 -0000 1.95
+++ dovecot.spec 4 Sep 2008 21:20:10 -0000
@@ -7,7 +7,15 @@
%bcond_without pgsql # without PostgreSQL auth
%bcond_without sqlite # without SQLite3 auth
%bcond_without sasl # without SASL auth
-#
+%bcond_with managesieve # with managesieve daemon
+
+# Managesieve daemon patch variables
+%define _ms managesieve
+%define mpver 1.1.2
+%define mpsubver 0.10.3
+%define _ds dovecot-sieve
+%define dsver 1.1.5
+
Summary: IMAP and POP3 server written with security primarily in mind
Summary(pl.UTF-8): Serwer IMAP i POP3 pisany gÅównie z myÅlÄ
o bezpieczeÅstwie
Name: dovecot
@@ -21,7 +29,10 @@
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
+Source4: http://www.rename-it.nl/%{name}/1.1/%{name}-1.1-%{_ms}-%{mpsubver}.tar.gz
+Source5: http://dovecot.org/releases/sieve/%{_ds}-%{dsver}.tar.gz
Patch0: %{name}-config.patch
+Patch1: http://www.rename-it.nl/%{name}/1.1/%{name}-%{mpver}-%{_ms}-%{mpsubver}.diff.gz
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -124,10 +135,30 @@
%description devel -l pl.UTF-8
Pakiet programistyczny do tworzenia wtyczek dla dovecota.
+%package managesieve
+Summary: Dovecot Managesieve daemon for sieve scripts
+Summary(pl.UTF-8): Demon Managesieve do obsÅugi skryptów sieve
+Group: Networking/Daemons
+Requires: %{name} >= %{version}
+Requires: %{_ds}
+
+%description managesieve
+The Sieve plugin for Dovecot's deliver LDA expects a user's Sieve script to reside somewhere in the user's directory (~/.dovecot.sieve by default). If the user is to be able to change his sieve script, he needs shell or FTP access to his home directory, which is not always desirable. This is especially applicable to mail servers with virtual users. As a solution, the ManageSieve protocol was proposed to manage sieve scripts on the server without the need for direct file system access by the users. Additionally, the Sieve scripts are compiled before they are installed, making sure that the uploaded script is valid. This prevents a user from inadvertently installing a broken Sieve script. The protocol specification still has a draft status, but it is already supported by quite a few (web)mail clients. Dovecot now supports ManageSieve by means of an external patch and package.
+
%prep
-%setup -q
+%setup -q -T -b 0
+
+%if %{with managesieve}
+%setup -q -b 4
+%setup -q -b 5
+%endif
+
%patch0 -p1
+%if %{with managesieve}
+%patch1 -p1
+%endif
+
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
%build
@@ -153,6 +184,19 @@
%{__make}
+%if %{with managesieve}
+cd ../%{_ds}-%{dsver}
+%configure \
+ --with-dovecot=../%{name}-%{version}
+%{__make}
+
+cd ../%{name}-1.1-%{_ms}-%{mpsubver}
+%configure \
+ --with-dovecot=../%{name}-%{version} \
+ --with-dovecot-sieve=../%{_ds}-%{dsver}
+%{__make}
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
@@ -169,6 +213,13 @@
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+%if %{with managesieve}
+cd ../%{name}-1.1-%{_ms}-%{mpsubver}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+cd ../%{name}-%{version}
+%endif
+
touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/imap}/*.la
@@ -219,12 +270,14 @@
%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/wiki/*.txt
+%{_datadir}/doc/%{name}/*
%attr(755,root,root) %{_sbindir}/%{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) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.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}
@@ -246,6 +299,10 @@
%attr(755,root,root) %{_libdir}/%{name}/pop3
%attr(755,root,root) %{_libdir}/%{name}/pop3-login
%attr(755,root,root) %{_libdir}/%{name}/rawlog
+%if %{with managesieve}
+%attr(755,root,root) %{_libdir}/%{name}/managesieve
+%attr(755,root,root) %{_libdir}/%{name}/managesieve-login
+%endif
%attr(755,root,root) %{_libdir}/%{name}/ssl-build-param
%dir %{_libdir}/%{name}/plugins
%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl