[Mimedefang] mimedefang.spec & build with/without antivirus support
No Six
number6 at freesurf.fr
Mon Feb 23 15:22:08 EST 2004
Hi David,
Some people want to build MIMEDefang RPM with antivirus code,
some wants to build it without (configure --disable-anti-virus
switch which is the default righ now in mimedefang.spec).
It's easy to offer this choice in the mimedefang.spec file :
Just update the specfile with a new define and some conditionnal
switches (after the existing defines) and a test on the
configure part :
%define dir_spool /var/spool/MIMEDefang
%define dir_quarantine /var/spool/MD-Quarantine
%define dir_log /var/log/mimedefang
%define user defang
%define with_antivirus 0
%{?_with_antivirus: %{expand: %%define with_antivirus 1}}
%{?_without_antivirus: %{expand: %%define with_antivirus 0}}
....... lines jumped
....... lines jumped
%prep
%setup -q -n %{name}-%{version}-BETA-2
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--sysconfdir=/etc \
--with-spooldir=%{dir_spool} \
--with-quarantinedir=%{dir_quarantine} \
%if %{with_antivirus}
--with-user=%{user}
%else
--with-user=%{user} \
--disable-anti-virus
%endif
With such code people can build the RPM with antivirus-code through :
rpm -tb mimedefang-2.40-BETA-2.tar.gz --with 'antivirus'
for instance.
Regards,
No6
PS :
rpm -tb mimedefang-2.40-BETA-2.tar.gz --define '_with_antivirus 1'
seems to work too.
More information about the MIMEDefang
mailing list