Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > 4e9e21e72953fb8d1b5aa74d3231fd85 > files > 1

horde-ingo-1.1.1-3mdv2007.0.src.rpm

%define module	ingo
%define name	horde-%{module}
%define version	1.1.1
%define release	%mkrel 3

%define _requires_exceptions pear(Horde.*)

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
for file in `find . -type f`; do
    perl -pi -e 'BEGIN {exit unless -T $ARGV[0];} tr/\r//d;' $file
done

%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 js %{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
* Mon Sep 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-04 20:51:02 (59910)
- bump release

* Mon Sep 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-04 20:45:02 (59899)
- added missing javascript directory

* Mon Sep 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-04 16:14:35 (59828)
- Import horde-ingo


* Fri Aug 25 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.1.1-2mdv2007.0
- Rebuild

* Mon May 22 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.1.1-1mdk
- New release 1.1.1

* Tue Mar 07 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.1-1mdk
- new version

* Wed Jan 11 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.0.2-2mdk
- fix automatic dependencies

* Tue Dec 27 2005 Guillaume Rousse <guillomovitch@mandriva.org> 1.0.2-1mdk
- new version
- %%mkrel

* 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