2 # - Add polish info mail templates
3 # - move amavis part of tmpwatch configuration from tmpwatch.spec
5 %include /usr/lib/rpm/macros.perl
6 Summary: A Mail Virus Scanner with SpamAssassin support - daemon
7 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon
13 Group: Applications/Mail
14 Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
15 # Source0-md5: d750176de7481498ebd1011e08a488da
17 Source2: %{name}-milter.init
18 Source3: %{name}.tmpwatch
19 Patch0: %{name}-config.patch
20 Patch1: %{name}-lib64.patch
21 Patch2: %{name}-tools-dbdir.patch
22 URL: http://www.ijs.si/software/amavisd/
23 BuildRequires: autoconf
24 BuildRequires: rpm-perlprov
25 BuildRequires: rpmbuild(macros) >= 1.304
26 BuildRequires: sendmail-devel
27 Requires(post,preun): /sbin/chkconfig
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
34 Requires: /usr/lib/sendmail
35 Requires: perl-Archive-Tar
36 Requires: perl-Archive-Zip >= 1.14
37 Requires: perl-Compress-Zlib >= 1.35
38 Requires: perl-Convert-TNEF
39 Requires: perl-Convert-UUlib >= 1.05
40 Requires: perl-MIME-tools
41 Requires: perl-Mail-SpamAssassin
42 Requires: perl-Net-Server >= 0.93
43 Requires: perl-Time-HiRes >= 1.49
44 Requires: perl-Unix-Syslog
47 Provides: group(amavis)
48 Provides: user(amavis)
52 Obsoletes: amavisd-daemon
53 Obsoletes: amavisd-exim
54 Obsoletes: amavisd-new-exim
55 Obsoletes: amavisd-new-postfix
56 Obsoletes: amavisd-new-qmail
57 Obsoletes: amavisd-postfix
58 Obsoletes: amavisd-qmail
59 Conflicts: amavis-stats <= 0.1.12
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _tmpwatchdir /etc/tmpwatch
63 %define schemadir /usr/share/openldap/schema
66 AMaViS is a script that interfaces a mail transport agent (MTA) with
67 one or more virus scanners and SpamAssasin. This is daemonized version
70 %description -l pl.UTF-8
71 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
72 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
76 Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend
77 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
78 Group: Applications/Mail
79 Requires: %{name} = %{epoch}:%{version}-%{release}
83 AMaViS is a script that interfaces a mail transport agent (MTA) with
84 one or more virus scanners. This is daemonized version of amavis.
86 This package contains backend for sendmail.
88 %description sendmail -l pl.UTF-8
89 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
90 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
92 Pakiet ten zawiera back-end dla sendmaila.
94 %package -n openldap-schema-amavisd-new
95 Summary: Amavisd-new LDAP schema
96 Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
97 Group: Networking/Daemons
98 Requires: openldap-servers
100 %description -n openldap-schema-amavisd-new
101 This package contains LDAP schema for use with amavisd-new.
103 %description -n openldap-schema-amavisd-new -l pl.UTF-8
104 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
109 %if "%{_lib}" == "lib64"
118 --with-sendmail=/usr/lib/sendmail \
119 --with-runtime-dir=/var/spool/amavis/runtime \
120 --with-sockname=/var/run/amavisd/amavisd.sock
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
127 install amavisd $RPM_BUILD_ROOT%{_sbindir}
128 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
129 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
130 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
131 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
132 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
133 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
134 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
135 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
136 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
139 rm -rf $RPM_BUILD_ROOT
142 %groupadd -g 116 -r -f amavis
143 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
146 if [ "$1" = "0" ]; then
152 /sbin/chkconfig --add amavisd
153 %service amavisd restart "Amavisd daemon"
156 if [ "$1" = "0" ]; then
157 %service amavisd stop
158 /sbin/chkconfig --del amavisd
162 /sbin/chkconfig --add amavis-milter
163 %service amavis-milter restart "Amavis-milter daemon"
166 if [ "$1" = "0" ];then
167 %service amavis-milter stop
168 /sbin/chkconfig --del amavis-milter
171 %post -n openldap-schema-amavisd-new
172 %openldap_schema_register %{schemadir}/amavisd-new.schema
173 %service -q ldap restart
175 %postun -n openldap-schema-amavisd-new
176 if [ "$1" = "0" ]; then
177 %openldap_schema_unregister %{schemadir}/amavisd-new.schema
178 %service -q ldap restart
182 %defattr(644,root,root,755)
183 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
184 %attr(755,root,root) %{_sbindir}/amavisd*
185 %attr(754,root,root) /etc/rc.d/init.d/amavisd
186 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
187 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
188 %attr(750,amavis,amavis) %{_var}/spool/amavis
189 %attr(750,amavis,amavis) %{_var}/run/amavisd
192 %defattr(644,root,root,755)
193 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
194 %attr(755,root,root) %{_sbindir}/amavis
195 %attr(755,root,root) %{_sbindir}/amavis-milter
197 %files -n openldap-schema-amavisd-new
198 %defattr(644,root,root,755)
199 %{schemadir}/*.schema