1 %include /usr/lib/rpm/macros.perl
2 Summary: A Mail Virus Scanner - Daemon.
3 Summary(pl): Antywirusowy skaner poczty elektronicznej - Demon
8 Group: Applications/Mail
9 Source0: http://www.amavis.org/dist/perl/%{name}-snapshot-%{version}.tar.gz
11 URL: http://www.amavis.org/
13 BuildRequires: autoconf
17 BuildRequires: ncompress
18 BuildRequires: perl-Archive-Tar
19 BuildRequires: perl-Archive-Zip
20 BuildRequires: perl-Compress-Zlib
21 BuildRequires: perl-MIME-tools
22 BuildRequires: perl-Unix-Syslog
23 BuildRequires: perl-Convert-UUlib
24 BuildRequires: perl-Convert-TNEF
25 BuildRequires: sh-utils
31 Requires: %{_libdir}/sendmail
41 Requires: amavisd-daemon
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 AMaViS is a script that interfaces a mail transport agent (MTA) with
46 one or more virus scanners. This is daemonized version of amavis.
49 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
50 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
53 Summary: A Mail Virus Scanner - postfix back-end.
54 Summary(pl): Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
55 Group: Applications/Mail
56 Provides: amavisd-daemon
57 Obsoletes: amavisd-exim
61 AMaViS is a script that interfaces a mail transport agent (MTA) with
62 one or more virus scanners. This is daemonized version of amavis.
64 This package contains backend for postfix.
66 %description postfix -l pl
67 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
68 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
70 Pakiet ten zawiera back-end dla postfiks.
73 Summary: A Mail Virus Scanner - exim backend.
74 Summary(pl): Antywirusowy skaner poczty elektronicznej - backend dla exima
75 Group: Applications/Mail
76 Provides: amavisd-daemon
77 Obsoletes: amavisd-postfix
81 AMaViS is a script that interfaces a mail transport agent (MTA) with
82 one or more virus scanners. This is daemonized version of amavis.
84 This package contains backend for exim.
86 %description exim -l pl
87 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
88 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
90 Pakiet ten zawiera back-end dla exima.
93 %setup -q -n %{name}-snapshot-%{version}
102 --with-runtime-dir=%{_var}/spool/amavis/runtime \
103 --with-virusdir=%{_var}/spool/amavis/virusmails \
104 --with-logdir=%{_var}/log \
105 --with-amavisuser=amavis \
106 --with-sockname=%{_var}/run/amavisd/amavisd.sock
109 mv amavis/amavisd amavis/amavisd.postfix
116 --with-runtime-dir=%{_var}/spool/amavis/runtime \
117 --with-virusdir=%{_var}/spool/amavis/virusmails \
118 --with-logdir=%{_var}/log \
119 --with-amavisuser=amavis \
120 --with-sockname=%{_var}/run/amavisd/amavisd.sock
123 cp amavis/amavisd amavis/amavisd.exim
125 gzip -9nf README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
128 rm -rf $RPM_BUILD_ROOT
129 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis,%{_var}/run/amavisd}
132 amavisuser=$(id -u) \
133 DESTDIR=$RPM_BUILD_ROOT
134 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
136 install amavis/amavisd.{exim,postfix} $RPM_BUILD_ROOT%{_sbindir}
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_sbindir}/amavis
141 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
142 %config(noreplace) %{_sysconfdir}/amavisd.conf
143 %doc *.gz doc/*.gz doc/amavis.png
144 %attr(750,amavis,root) %{_var}/spool/amavis
145 %attr(755,amavis,root) %{_var}/run/amavisd
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_sbindir}/amavisd.postfix
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_sbindir}/amavisd.exim
156 if [ -n "`id -u amavis 2>/dev/null`" ]; then
157 if [ "`id -u amavis`" != "97" ]; then
158 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
162 %{_sbindir}/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
166 if [ "$1" = "0" ]; then
167 %{_sbindir}/userdel amavis
171 /sbin/chkconfig --add amavisd
173 if [ -f %{_var}/lock/subsys/amavisd ]; then
174 /etc/rc.d/init.d/amavisd restart >&2
176 echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
180 if [ "$1" = "0" ];then
181 if [ -f %{_var}/lock/subsys/amavisd ]; then
182 /etc/rc.d/init.d/amavisd stop >&2
184 /sbin/chkconfig --del amavisd
188 if [ -f %{_sbindir}/amavisd ]; then
189 rm -f %{_sbindir}/amavisd
191 ln -s amavisd.exim %{_sbindir}/amavisd
194 if [ -f %{_sbindir}/amavisd ]; then
195 rm -f %{_sbindir}/amavisd
199 if [ -f %{_sbindir}/amavisd ]; then
200 rm -f %{_sbindir}/amavisd
202 ln -s amavisd.postfix %{_sbindir}/amavisd
205 if [ -f %{_sbindir}/amavisd ]; then
206 rm -f %{_sbindir}/amavisd
210 rm -rf $RPM_BUILD_ROOT