Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
qmail-spp-plugins-vchkuser
> vchkuser.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File vchkuser.spec of Package qmail-spp-plugins-vchkuser (Revision 4)
Currently displaying revision
4
,
show latest
%define qdir /var/qmail %define vpopdir /var/vpopmail %define pkgname vchkuser Summary: VPOPmail user plugin for qmail-smtp Name: vchkuser-spp Provides: qmail-spp-plugis-%{pkgname} Version: 0.2 Release: 1 License: GPLv2 Group: System/Mail URL: http://bb.xnull.de/projects/vchkuser/ Source: http://bb.xnull.de/projects/vchkuser/dist/%{pkgname}-%{version}.tar.bz2 Patch0: vchkuser-makefile.patch Requires: qmail vpopmail BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: qmail vpopmail pcre-devel mysql-devel %description vchkuser is a qmail-spp plugin which checks for recipient existence with vpopmail. It is based on a script by Werner Maier but has been rewritten in C to get rid of all the suid hacks and to enhance performance. %prep %setup -n %{pkgname}-%{version} %patch0 %build VPOPMAILDIR=%{vpopdir} QMAILDIR=%{qdir} %__make %install mkdir -p $RPM_BUILD_ROOT%{qdir}/plugins install -m 0750 %{pkgname} $RPM_BUILD_ROOT%{qdir}/plugins %post cd %{qdir}/control if [ "$1" -ge 1 -a `grep -c plugins/%{pkgname} smtpplugins` -eq 0 ]; then echo Trying to insert plugin into %{qdir}/control/smtpplugins... if grep '^\[mail\]$' smtpplugins >/dev/null; then i=1 while [ `head -$i smtpplugins | grep -c '^\[mail\]$'` -lt 1 ]; do i=$(($i + 1)) done head -$i smtpplugins >smtpplugins.new tail +$(($i + 1)) smtpplugins >>smtpplugins.new && \ mv smtpplugins.new smtpplugins else echo "[mail]" >>smtpplugins fi if grep '^\[rcpt\]$' smtpplugins >/dev/null; then i=1 while [ `head -$i smtpplugins | grep -c '^\[rcpt\]$'` -lt 1 ]; do i=$(($i + 1)) done head -$i smtpplugins >smtpplugins.new echo "plugins/%{pkgname}" >>smtpplugins.new tail +$(($i + 1)) smtpplugins >>smtpplugins.new && \ mv smtpplugins.new smtpplugins else echo "[rcpt]" >>smtpplugins echo "plugins/%{pkgname}" >>smtpplugins fi echo "Don't forget to set the required environment variables" echo "when invoking qmail-smtpd." echo "And think about whitelisting some addresses, see %{_docdir}/%{name}." fi %preun if [ "$1" = 0 ]; then cd %{qdir}/control if [ -r smtpplugins ]; then echo Trying to remove %{pkgname} from %{qdir}/control/smtpplugins... egrep -v '^#*plugins/%{pkgname}$' smtpplugins >smtpplugins.new && \ mv smtpplugins.new smtpplugins fi fi %clean [ "$RPM_BUILD_ROOT" = "/" ] || rm -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,qmail) %doc README LICENSE %attr(4750,vpopmail,vchkpw) %{qdir}/plugins/%{pkgname} %changelog * Sun Jan 25 2009 Carsten Schoene <cs@linux-administrator.com> - 0.2-1 - initial build