%define name qcheck %define version 1.0 %define release 3mdk Summary: Checks Maildirs for incoming mails. Name: %{name} Version: %{version} Release: %{release} License: Freeware Group: Networking/Mail URL: ftp://ftp.meanmachine.ch/pub/unix/qmail/ Source: %{name}.tar.bz2 Buildroot: %{_tmppath}/%{name}-%{version}-root %description This is a quick utility to check if there are new mails on any un*x system using Maildirs rather than mboxes. %prep [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %setup -q -n %{name} %build gcc %{optflags} -Wall -o %{name} %{name}.c %install install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_sysconfdir}/profile.d cat > %{buildroot}%{_sysconfdir}/profile.d/%{name}.csh <<EOF if ( -d \${HOME}/Maildir/new ) then %{_bindir}/qcheck exit endif EOF cat > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh <<EOF if [ -d \${HOME}/Maildir/new ];then %{_bindir}/qcheck fi EOF install -m 755 %{name} %{buildroot}%{_bindir}/ chmod 0755 %{buildroot}%{_sysconfdir}/profile.d/%{name}.* %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} rm -rf %{_builddir}/%{name} %files %defattr(-,root,root) %doc README %config(noreplace) %{_sysconfdir}/profile.d/%{name}.* %{_bindir}/%{name} %changelog * Thu Jan 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0-3mdk - build release * Fri Nov 30 2001 Vincent Danen <vdanen@mandrakesoft.com> 1.0-2mdk - spec cleanups - remove mention of qmail as exim, postfix, and qmail can all use Maildirs * Mon Nov 26 2001 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0-1mdk - initial cooker contrib