%define module forwards %define name horde-%{module} %define version 2.2.1 %define release 3mdk Name: %{name} Version: %{version} Release: %{release} Summary: The Horde forwards management application License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/%{module}/%{module}-%{version}.tar.bz2 Source2: %{module}-horde.conf.bz2 URL: http://www.horde.org/%{module}/ Requires: horde >= 3.0 BuildArch: noarch BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Forwards is a Horde module for setting user e-mail forwards with support for several popular mailers. While it has been released and is in production use at many sites, it is also still under development in an effort to expand and improve the module. Right now, Forwards provides fairly complete support for setting .forward style forwards on sendmail or courier mail based systems via an FTP transport. It now also supports for mdaemon, and qmail and exim sql based systems. Forwards is part of a suite of account management modules for Horde consisting of Accounts, Forwards, Passwd, and Vacation. %prep %setup -q -n %{module}-%{version} # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build %install rm -rf $RPM_BUILD_ROOT # horde configuration install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/horde/registry.d bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/horde/registry.d/%{module}.php # remove .htaccess files find . -name .htaccess -exec rm -f {} \; # install files install -d -m 755 $RPM_BUILD_ROOT%{_var}/www/horde/%{module} install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/horde/%{module} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/horde cp -pR *.php $RPM_BUILD_ROOT%{_var}/www/horde/%{module} cp -pR graphics $RPM_BUILD_ROOT%{_var}/www/horde/%{module} cp -pR lib $RPM_BUILD_ROOT%{_datadir}/horde/%{module} cp -pR locale $RPM_BUILD_ROOT%{_datadir}/horde/%{module} cp -pR templates $RPM_BUILD_ROOT%{_datadir}/horde/%{module} cp -pR config $RPM_BUILD_ROOT%{_sysconfdir}/horde/%{module} # use symlinks to recreate original structure pushd $RPM_BUILD_ROOT%{_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 # activate configuration files for file in $RPM_BUILD_ROOT%{_sysconfdir}/horde/%{module}/*.dist; do mv $file ${file%.dist} done %clean rm -rf $RPM_BUILD_ROOT %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 * Fri Feb 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.2.1-3mdk - spec file cleanups, remove the ADVX-build stuff - strip away annoying ^M * Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.1-2mdk - top-level is now %{_var}/www/horde/%{module} - config is now in %{_sysconfdir}/horde/%{module} - other non-accessible files are now in %{_datadir}/horde/%{module} - no more apache configuration - rpmbuildupdate aware - spec cleanup * Sat Sep 04 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.2.1-1mdk - first mdk release