%define module ingo %define name horde-%{module} %define version 1.0.1 %define release 3mdk Name: %{name} Version: %{version} Release: %{release} Summary: The Horde email filter rules Manager License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/%{module}/%{module}-h3-%{version}.tar.bz2 Source1: %{module}-horde.conf.bz2 Patch0: %{module}-1.0-path.patch.bz2 URL: http://www.horde.org/%{module} Requires(post): rpm-helper Requires: horde >= 3.0 Requires: horde-imp >= 4.0 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version} %description Ingo is an email filter rules manager. Ingo currently supports the following filtering drivers: * Sieve (using timsieved) * procmail (using VFS FTP driver) * IMAP client-side filtering Ingo has replaced IMP's internal filtering code and is the default filtering agent in IMP H3 (4.0). %prep %setup -q -n %{module}-h3-%{version} %patch # fix encoding find . -type f | perl -ne 'chomp; print "$_\n" if -T $_' | xargs perl -pi -e 'tr/\r//d' %build %install rm -rf %{buildroot} # horde configuration install -d -m 755 %{buildroot}%{_sysconfdir}/horde/registry.d bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/horde/registry.d/%{module}.php # remove .htaccess files find . -name .htaccess -exec rm -f {} \; # install files install -d -m 755 %{buildroot}%{_var}/www/horde/%{module} install -d -m 755 %{buildroot}%{_datadir}/horde/%{module} install -d -m 755 %{buildroot}%{_sysconfdir}/horde cp -pR *.php %{buildroot}%{_var}/www/horde/%{module} cp -pR themes %{buildroot}%{_var}/www/horde/%{module} cp -pR lib %{buildroot}%{_datadir}/horde/%{module} cp -pR locale %{buildroot}%{_datadir}/horde/%{module} cp -pR scripts %{buildroot}%{_datadir}/horde/%{module} cp -pR templates %{buildroot}%{_datadir}/horde/%{module} cp -pR config %{buildroot}%{_sysconfdir}/horde/%{module} # use symlinks to recreate original structure pushd %{buildroot}%{_var}/www/horde/%{module} ln -s ../../../..%{_sysconfdir}/horde/%{module} config ln -s ../../../..%{_datadir}/horde/%{module}/lib . ln -s ../../../..%{_datadir}/horde/%{module}/locale . ln -s ../../../..%{_datadir}/horde/%{module}/templates . popd pushd %{buildroot}%{_datadir}/horde/%{module} ln -s ../../../..%{_sysconfdir}/horde/%{module} config popd # activate configuration files for file in %{buildroot}%{_sysconfdir}/horde/%{module}/*.dist; do mv $file ${file%.dist} done # fix script shellbang for file in `find %{buildroot}%{_datadir}/horde/%{module}/scripts`; do perl -pi -e 's|/usr/local/bin/php|/usr/bin/php|' $file done %clean rm -rf %{buildroot} %post if [ $1 = 1 ]; then # configuration %create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php apache apache 644 %create_ghostfile %{_sysconfdir}/horde/%{module}/conf.php.bak apache apache 644 fi %files %defattr(-,root,root) %doc LICENSE README docs %config(noreplace) %{_sysconfdir}/horde/registry.d/%{module}.php %config(noreplace) %{_sysconfdir}/horde/%{module} %{_datadir}/horde/%{module} %{_var}/www/horde/%{module} %changelog * Thu Jun 30 2005 Guillaume Rousse <guillomovitch@mandriva.org> 1.0.1-3mdk - better fix encoding - fix requires * Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-2mdk - spec file cleanups, remove the ADVX-build stuff - strip away annoying ^M * Thu Jan 27 2005 Guillaume Rousse <guillomovitch@mandrake.org> 1.0.1-1mdk - new version - no automatic config generation, incorrect default values - horde isn't a prereq - spec cleanup * Mon Jan 17 2005 Guillaume Rousse <guillomovitch@mandrake.org> 1.0-3mdk - fix inclusion path - fix configuration perms - generate configuration at postinstall - horde and rpm-helper are now a prereq * Sat Jan 15 2005 Guillaume Rousse <guillomovitch@mandrake.org> 1.0-2mdk - fix summary * Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 1.0-1mdk - first mdk release