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: 2474d4c034f96a58e5b8af91af514689
17 Source2: %{name}-milter.init
18 Source3: %{name}.tmpwatch
19 Patch0: %{name}-config.patch
20 Patch1: %{name}-tools-dbdir.patch
21 URL: http://www.ijs.si/software/amavisd/
22 BuildRequires: libmilter-devel
23 BuildRequires: rpm-perlprov
24 BuildRequires: rpmbuild(macros) >= 1.304
25 Requires(post,preun): /sbin/chkconfig
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires(pre): /bin/id
29 Requires(pre): /usr/bin/getgid
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
32 Requires: /usr/lib/sendmail
33 Requires: perl-Archive-Tar
34 Requires: perl-Archive-Zip >= 1.14
35 Requires: perl-Compress-Zlib >= 1.35
36 Requires: perl-Convert-TNEF
37 Requires: perl-Convert-UUlib >= 1.05
38 Requires: perl-MIME-tools
39 Requires: perl-Mail-SpamAssassin
40 Requires: perl-Net-Server >= 0.93
41 Requires: perl-Time-HiRes >= 1.49
42 Requires: perl-Unix-Syslog
44 Requires: perl-Mail-DKIM >= 0.31
46 Provides: group(amavis)
47 Provides: user(amavis)
51 Obsoletes: amavisd-daemon
52 Obsoletes: amavisd-exim
53 Obsoletes: amavisd-new-exim
54 Obsoletes: amavisd-new-postfix
55 Obsoletes: amavisd-new-qmail
56 Obsoletes: amavisd-postfix
57 Obsoletes: amavisd-qmail
58 Conflicts: amavis-stats <= 0.1.12
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 %define _tmpwatchdir /etc/tmpwatch
62 %define schemadir /usr/share/openldap/schema
65 AMaViS is a script that interfaces a mail transport agent (MTA) with
66 one or more virus scanners and SpamAssasin. This is daemonized version
69 %description -l pl.UTF-8
70 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
71 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
75 Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend
76 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
77 Group: Applications/Mail
78 Requires: %{name} = %{epoch}:%{version}-%{release}
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 sendmail.
87 %description sendmail -l pl.UTF-8
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 sendmaila.
93 %package -n openldap-schema-amavisd-new
94 Summary: Amavisd-new LDAP schema
95 Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
96 Group: Networking/Daemons
97 Requires: openldap-servers
99 %description -n openldap-schema-amavisd-new
100 This package contains LDAP schema for use with amavisd-new.
102 %description -n openldap-schema-amavisd-new -l pl.UTF-8
103 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
113 --with-sendmail=/usr/lib/sendmail \
114 --with-runtime-dir=/var/spool/amavis/runtime \
115 --with-sockname=/var/run/amavisd/amavisd.sock \
116 --with-milterlib=%{_libdir}
120 rm -rf $RPM_BUILD_ROOT
121 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
123 install amavisd $RPM_BUILD_ROOT%{_sbindir}
124 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
125 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
126 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
127 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
128 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
129 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
130 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
131 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
132 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
133 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
136 rm -rf $RPM_BUILD_ROOT
139 %groupadd -g 116 -r -f amavis
140 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
143 if [ "$1" = "0" ]; then
149 /sbin/chkconfig --add amavisd
150 %service amavisd restart "Amavisd daemon"
153 if [ "$1" = "0" ]; then
154 %service amavisd stop
155 /sbin/chkconfig --del amavisd
159 /sbin/chkconfig --add amavis-milter
160 %service amavis-milter restart "Amavis-milter daemon"
163 if [ "$1" = "0" ];then
164 %service amavis-milter stop
165 /sbin/chkconfig --del amavis-milter
168 %post -n openldap-schema-amavisd-new
169 %openldap_schema_register %{schemadir}/amavisd-new.schema
170 %service -q ldap restart
172 %postun -n openldap-schema-amavisd-new
173 if [ "$1" = "0" ]; then
174 %openldap_schema_unregister %{schemadir}/amavisd-new.schema
175 %service -q ldap restart
179 %defattr(644,root,root,755)
180 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
181 %attr(755,root,root) %{_sbindir}/amavisd*
182 %attr(754,root,root) /etc/rc.d/init.d/amavisd
183 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
184 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
185 %attr(750,amavis,amavis) %{_var}/spool/amavis
186 %attr(750,amavis,amavis) %{_var}/run/amavisd
189 %defattr(644,root,root,755)
190 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
191 %attr(755,root,root) %{_sbindir}/amavis
192 %attr(755,root,root) %{_sbindir}/amavis-milter
194 %files -n openldap-schema-amavisd-new
195 %defattr(644,root,root,755)
196 %{schemadir}/*.schema