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: perl-libnet
26 BuildRequires: sh-utils
32 Requires: %{_libdir}/sendmail
42 Requires: amavisd-daemon
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 AMaViS is a script that interfaces a mail transport agent (MTA) with
47 one or more virus scanners. This is daemonized version of amavis.
50 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
51 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
54 Summary: A Mail Virus Scanner - postfix back-end.
55 Summary(pl): Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
56 Group: Applications/Mail
57 Provides: amavisd-daemon
58 Obsoletes: amavisd-exim
62 AMaViS is a script that interfaces a mail transport agent (MTA) with
63 one or more virus scanners. This is daemonized version of amavis.
65 This package contains backend for postfix.
67 %description postfix -l pl
68 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
69 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
71 Pakiet ten zawiera back-end dla postfiks.
74 Summary: A Mail Virus Scanner - exim backend.
75 Summary(pl): Antywirusowy skaner poczty elektronicznej - backend dla exima
76 Group: Applications/Mail
77 Provides: amavisd-daemon
78 Obsoletes: amavisd-postfix
82 AMaViS is a script that interfaces a mail transport agent (MTA) with
83 one or more virus scanners. This is daemonized version of amavis.
85 This package contains backend for exim.
87 %description exim -l pl
88 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
89 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
91 Pakiet ten zawiera back-end dla exima.
94 %setup -q -n %{name}-snapshot-%{version}
103 --with-runtime-dir=%{_var}/spool/amavis/runtime \
104 --with-virusdir=%{_var}/spool/amavis/virusmails \
105 --with-logdir=%{_var}/log \
106 --with-amavisuser=amavis \
107 --with-sockname=%{_var}/run/amavisd/amavisd.sock
110 mv amavis/amavisd amavis/amavisd.postfix
117 --with-runtime-dir=%{_var}/spool/amavis/runtime \
118 --with-virusdir=%{_var}/spool/amavis/virusmails \
119 --with-logdir=%{_var}/log \
120 --with-amavisuser=amavis \
121 --with-sockname=%{_var}/run/amavisd/amavisd.sock
124 cp amavis/amavisd amavis/amavisd.exim
126 gzip -9nf README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis,%{_var}/run/amavisd}
133 amavisuser=$(id -u) \
134 DESTDIR=$RPM_BUILD_ROOT
135 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
137 install amavis/amavisd.{exim,postfix} $RPM_BUILD_ROOT%{_sbindir}
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_sbindir}/amavis
142 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
143 %config(noreplace) %{_sysconfdir}/amavisd.conf
144 %doc *.gz doc/*.gz doc/amavis.png
145 %attr(750,amavis,root) %{_var}/spool/amavis
146 %attr(755,amavis,root) %{_var}/run/amavisd
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_sbindir}/amavisd.postfix
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_sbindir}/amavisd.exim
157 if [ -n "`id -u amavis 2>/dev/null`" ]; then
158 if [ "`id -u amavis`" != "97" ]; then
159 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
163 %{_sbindir}/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2
167 if [ "$1" = "0" ]; then
168 %{_sbindir}/userdel amavis
172 /sbin/chkconfig --add amavisd
174 if [ -f %{_var}/lock/subsys/amavisd ]; then
175 /etc/rc.d/init.d/amavisd restart >&2
177 echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
181 if [ "$1" = "0" ];then
182 if [ -f %{_var}/lock/subsys/amavisd ]; then
183 /etc/rc.d/init.d/amavisd stop >&2
185 /sbin/chkconfig --del amavisd
189 if [ -f %{_sbindir}/amavisd ]; then
190 rm -f %{_sbindir}/amavisd
192 ln -s amavisd.exim %{_sbindir}/amavisd
195 if [ -f %{_sbindir}/amavisd ]; then
196 rm -f %{_sbindir}/amavisd
200 if [ -f %{_sbindir}/amavisd ]; then
201 rm -f %{_sbindir}/amavisd
203 ln -s amavisd.postfix %{_sbindir}/amavisd
206 if [ -f %{_sbindir}/amavisd ]; then
207 rm -f %{_sbindir}/amavisd
211 rm -rf $RPM_BUILD_ROOT