%define module vacation %define name horde-%{module} %define version 2.2.1 %define release 3mdk Name: %{name} Version: %{version} Release: %{release} Summary: The Horde vacation management application License: GPL Group: System/Servers Source0: ftp://ftp.horde.org/pub/%{module}/%{module}-%{version}.tar.bz2 Source2: %{module}-horde.conf.bz2 Patch: %{module}-2.2.1.path.patch.bz2 URL: http://www.horde.org/%{module}/ Requires: horde >= 3.0 Requires: vacation BuildArch: noarch BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Vacation is a Horde module for managing user e-mail "vacation notices" or "auto-responders." It works via a local vacation program which must be installed and functioning on the server. It supports vacation programs using the .forward-style forwarding mechanism supported by several popular mailers, as well as qmail and sql based implementations. While it has been released and is in production use at many sites, it is also under heavy development in an effort to expand and improve the module. Right now, Vacation provides fairly complete support for managing .forward-style vacation notices on sendmail or courier mail based systems via an FTP transport. It also has some support for qmail and exim sql based servers. Vacation is part of a suite of account management modules for Horde consisting of Accounts, Forwards, Passwd, and Vacation. %prep %setup -q -n %{module}-%{version} %patch # 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 files $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 scripts $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