-# TODO
-# - new unpackaged files:
-# /usr/bin/sieve-filter
-#%{_mandir}/man1/sieve-filter.1.gz
-# - fix mess with dovecot libraries (symlinks in package that shouldn't be here)
-
+#
+%bcond_without tests
+#
%define dovecot_series 2.2
-%define pigeonhole_version 0.4.16
+%define pigeonhole_version 0.4.21
Summary: Sieve plugin for dovecot
Summary(pl.UTF-8): Wtyczka Sieve i Managesieve dla dovecota
Name: dovecot-pigeonhole
Version: %{dovecot_series}_%{pigeonhole_version}
-Release: 1
+Release: 3
License: LGPL
Group: Daemons
-Source0: http://pigeonhole.dovecot.org/releases/%{dovecot_series}/dovecot-%{dovecot_series}-pigeonhole-%{pigeonhole_version}.tar.gz
-# Source0-md5: e03eed707b39cffc4b2a82867de45d9c
-URL: http://www.dovecot.org/
+Source0: https://pigeonhole.dovecot.org/releases/%{dovecot_series}/dovecot-%{dovecot_series}-pigeonhole-%{pigeonhole_version}.tar.gz
+# Source0-md5: 890edce51f256e04f55685f8aa74ca0b
+URL: http://pigeonhole.dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
-BuildRequires: dovecot-devel >= 1:2.2.21
+BuildRequires: dovecot-devel >= 1:2.2.9-2
BuildRequires: flex
BuildRequires: libtool
%requires_eq_to dovecot dovecot-devel
Group: Daemons
%description -n dovecot-managesieve
+Manage Sieve daemon for dovecot.
+
%description -n dovecot-managesieve -l pl.UTF-8
-Tn pakiet zawiera demona Manage Sieve dla dovecot.
+Ten pakiet zawiera demona Manage Sieve dla dovecot.
%prep
%setup -q -n dovecot-%{dovecot_series}-pigeonhole-%{pigeonhole_version}
%build
%configure \
+ VALGRIND=no \
--with-dovecot=%{_libdir}/dovecot \
--with-managesieve=yes \
- --enable-header-install=yes \
--prefix=%{_libdir}/dovecot
%{__make}
+%{?with_tests:%{__make} -j1 check}
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
find $RPM_BUILD_ROOT%{_libdir}/dovecot/ -name '*.la' | xargs rm -f
find $RPM_BUILD_ROOT%{_libdir}/dovecot/ -name '*.a' | xargs rm -f
-# ??? - why are these in this package?
-ln -s dovecot/libdovecot-login.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libdovecot-login.so.0
-ln -s dovecot/libdovecot.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libdovecot.so.0
-
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
%clean
%defattr(644,root,root,755)
%doc doc/example-config/conf.d/90-sieve.conf
%doc doc/extensions
-%attr(755,root,root) %{_bindir}/sieve-filter
%attr(755,root,root) %{_bindir}/sieve-test
+%attr(755,root,root) %{_bindir}/sieve-filter
%attr(755,root,root) %{_bindir}/sievec
%attr(755,root,root) %{_bindir}/sieve-dump
%attr(755,root,root) %{_libdir}/dovecot/plugins/lib90_sieve_plugin.so
-%attr(755,root,root) %{_libdir}/dovecot/plugins/lib95_imap_sieve_plugin.so
%attr(755,root,root) %{_libdir}/dovecot/libdovecot-sieve.so*
+%attr(755,root,root) %{_libdir}/dovecot/plugins/lib95_imap_sieve_plugin.so
%attr(755,root,root) %{_libdir}/dovecot/plugins/doveadm/lib10_doveadm_sieve_plugin.so
-%dir %{_libdir}/dovecot/plugins/sieve
%dir %{_libdir}/dovecot/plugins/settings
%attr(755,root,root) %{_libdir}/dovecot/plugins/settings/libpigeonhole_settings.so
+%dir %{_libdir}/dovecot/plugins/sieve
%attr(755,root,root) %{_libdir}/dovecot/plugins/sieve/lib90_sieve_extprograms_plugin.so
%attr(755,root,root) %{_libdir}/dovecot/plugins/sieve/lib90_sieve_imapsieve_plugin.so
-# ??? - why is this in this package?
-%attr(755,root,root) %{_libdir}/libdovecot.so.0
-
%{_mandir}/man1/doveadm-sieve.1*
%{_mandir}/man1/sieve-test.1*
+%{_mandir}/man1/sieve-filter.1*
%{_mandir}/man1/sievec.1*
%{_mandir}/man1/sieved.1*
-%{_mandir}/man1/sieve-filter.1*
%{_mandir}/man1/sieve-dump.1*
%{_mandir}/man7/pigeonhole.7*
%files devel
%defattr(644,root,root,755)
+%{_aclocaldir}/dovecot-pigeonhole.m4
%dir %{_includedir}/dovecot/sieve
%{_includedir}/dovecot/sieve/*.h
%doc doc/example-config/conf.d/20-managesieve.conf
%attr(755,root,root) %{_libexecdir}/dovecot/managesieve
%attr(755,root,root) %{_libexecdir}/dovecot/managesieve-login
-
-%attr(755,root,root) %{_libdir}/libdovecot-login.so.0
-
-%dir %{_libdir}/dovecot/plugins/settings/
%{_libdir}/dovecot/plugins/settings/libmanagesieve_login_settings.so
%{_libdir}/dovecot/plugins/settings/libmanagesieve_settings.so