]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
Added patch from Radoslaw Zielinski to fix virus scanning more than one
[packages/amavisd-new.git] / amavisd-new.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        A Mail Virus Scanner with SpamAssassin support - Daemon
3 Summary(pl):    Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - Demon
4 Name:           amavisd-new
5 Version:        20030314
6 Release:        2
7 License:        GPL
8 Group:          Applications/Mail
9 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}-p1.tar.gz
10 # Source0-md5:  3dcee8ad46afbf23d09bdea64621e5a3
11 Source1:        %{name}.init
12 Patch0:         %{name}-config.patch
13 Patch1:         %{name}-bin.patch
14 URL:            http://www.amavis.org/
15 BuildRequires:  arc
16 BuildRequires:  autoconf
17 BuildRequires:  automake
18 BuildRequires:  bzip2
19 BuildRequires:  file
20 BuildRequires:  lha
21 BuildRequires:  ncompress
22 BuildRequires:  perl-Archive-Tar
23 BuildRequires:  perl-Archive-Zip
24 BuildRequires:  perl-Compress-Zlib
25 BuildRequires:  perl-MIME-tools
26 BuildRequires:  perl-Unix-Syslog
27 BuildRequires:  perl-Convert-UUlib
28 BuildRequires:  perl-Convert-TNEF
29 BuildRequires:  perl-libnet
30 BuildRequires:  perl-Mail-SpamAssassin
31 BuildRequires:  perl-Net-Server
32 BuildRequires:  sh-utils
33 BuildRequires:  unarj
34 BuildRequires:  unrar
35 BuildRequires:  zoo
36 Requires(pre): /bin/id
37 Requires(pre): /usr/sbin/useradd
38 Requires(postun):      /usr/sbin/userdel
39 Requires(post,preun):   /sbin/chkconfig
40 Requires:       /usr/lib/sendmail
41 Requires:       arc
42 Requires:       bzip2
43 Requires:       file
44 Requires:       lha
45 Requires:       ncompress
46 Requires:       sh-utils
47 Requires:       unarj
48 Requires:       unrar
49 Requires:       zoo
50 Requires:       perl-Mail-SpamAssassin
51 #Requires:      perl-SAVI
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Obsoletes:      AMaViS
54 Obsoletes:      amavis
55 Obsoletes:      amavisd-daemon
56 Obsoletes:      amavisd-postfix
57 Obsoletes:      amavisd-exim
58 Obsoletes:      amavisd-qmail
59 Obsoletes:      amavisd-new-postfix
60 Obsoletes:      amavisd-new-exim
61 Obsoletes:      amavisd-new-qmail
62
63 %description
64 AMaViS is a script that interfaces a mail transport agent (MTA) with
65 one or more virus scanners and SpamAssasin. This is daemonized version
66 of amavis.
67
68 %description -l pl
69 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
70 a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
71 zdemonizowana.
72
73 %package sendmail
74 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
75 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
76 Group:          Applications/Mail
77 Requires:       sendmail
78 Requires:       %{name}
79
80 %description sendmail
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.
83
84 This package contains backend for sendmail.
85
86 %description sendmail -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.
89
90 Pakiet ten zawiera back-end dla sendmaila.
91
92 %prep
93 %setup -q
94 %patch0 -p1
95 %patch1 -p1
96
97 %build
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd,%{_sysconfdir},%{_sbindir}}
102
103 install amavisd $RPM_BUILD_ROOT%{_sbindir}/
104 install amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/
105 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %pre
111 if [ -n "`id -u amavis 2>/dev/null`" ]; then
112        if [ "`id -u amavis`" != "97" ]; then
113                echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
114                exit 1
115        fi
116 else
117        /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
118 fi
119
120 %postun
121 if [ "$1" = "0" ]; then
122        /usr/sbin/userdel amavis
123 fi
124
125 %post
126 /sbin/chkconfig --add amavisd
127 if [ -f /var/lock/subsys/amavisd ]; then
128         /etc/rc.d/init.d/amavisd restart >&2
129 else
130         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
131 fi
132
133 %preun
134 if [ "$1" = "0" ];then
135         if [ -f /var/lock/subsys/amavisd ]; then
136                 /etc/rc.d/init.d/amavisd stop >&2
137         fi
138         /sbin/chkconfig --del amavisd
139 fi
140
141 %files
142 %defattr(644,root,root,755)
143 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
144 %attr(755,root,root) %{_sbindir}/amavisd*
145 %attr(754,root,root) /etc/rc.d/init.d/*
146 %config(noreplace) %{_sysconfdir}/amavisd.conf
147 %attr(750,amavis,root) %{_var}/spool/amavis
148 %attr(755,amavis,root) %{_var}/run/amavisd
149
150 #%files sendmail
151 #%attr(755,root,root) %{_sbindir}/amavis
152 #%attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.064269 seconds and 4 git commands to generate.