]> git.pld-linux.org Git - packages/amavisd.git/blob - amavisd.spec
f8823fa5b3a11e7c7067e65660e274f9 amavisd-snapshot-20020300.tar.gz
[packages/amavisd.git] / amavisd.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        A Mail Virus Scanner - Daemon.
3 Summary(pl):    Antywirusowy skaner poczty elektronicznej - Demon
4 Name:           amavisd
5 Version:        20010714
6 Release:        11
7 License:        GPL
8 Group:          Applications/Mail
9 Source0:        http://www.amavis.org/dist/perl/%{name}-snapshot-%{version}.tar.gz
10 Source1:        %{name}.init
11 Patch0:         %{name}-notest-mta.patch
12 Patch1:         %{name}-nomilter.patch
13 Patch2:         %{name}-qmail.patch
14 Patch3:         %{name}-mks_vir.patch
15 URL:            http://www.amavis.org/
16 BuildRequires:  arc
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  bzip2
20 BuildRequires:  file
21 BuildRequires:  lha
22 BuildRequires:  ncompress
23 BuildRequires:  perl-Archive-Tar
24 BuildRequires:  perl-Archive-Zip
25 BuildRequires:  perl-Compress-Zlib
26 BuildRequires:  perl-MIME-tools
27 BuildRequires:  perl-Unix-Syslog
28 BuildRequires:  perl-Convert-UUlib
29 BuildRequires:  perl-Convert-TNEF
30 BuildRequires:  perl-libnet
31 BuildRequires:  sh-utils
32 BuildRequires:  unarj
33 BuildRequires:  unrar
34 BuildRequires:  zoo
35 Requires:       %{_libdir}/sendmail
36 Requires:       arc
37 Requires:       bzip2
38 Requires:       file
39 Requires:       lha
40 Requires:       ncompress
41 Requires:       sh-utils
42 Requires:       unarj
43 Requires:       unrar
44 Requires:       zoo
45 Requires:       amavisd-daemon
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Obsoletes:      AMaViS
48 Obsoletes:      amavis
49
50 %description
51 AMaViS is a script that interfaces a mail transport agent (MTA) with
52 one or more virus scanners. This is daemonized version of amavis.
53
54 %description -l pl
55 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
56 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
57
58 %package postfix
59 Summary:        A Mail Virus Scanner - postfix back-end.
60 Summary(pl):    Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
61 Group:          Applications/Mail
62 Provides:       amavisd-daemon
63 Obsoletes:      amavisd-daemon
64 Obsoletes:      amavisd-exim
65 Obsoletes:      amavisd-qmail
66 Obsoletes:      amavisd-sendmail
67 Requires:       postfix
68
69 %description postfix
70 AMaViS is a script that interfaces a mail transport agent (MTA) with
71 one or more virus scanners. This is daemonized version of amavis.
72
73 This package contains backend for postfix.
74
75 %description postfix -l pl
76 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
77 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
78
79 Pakiet ten zawiera back-end dla postfiks.
80
81 %package exim
82 Summary:        A Mail Virus Scanner - exim backend.
83 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla exima
84 Group:          Applications/Mail
85 Provides:       amavisd-daemon
86 Obsoletes:      amavisd-daemon
87 Obsoletes:      amavisd-postfix
88 Obsoletes:      amavisd-qmail
89 Obsoletes:      amavisd-sendmail
90 Requires:       exim
91
92 %description exim
93 AMaViS is a script that interfaces a mail transport agent (MTA) with
94 one or more virus scanners. This is daemonized version of amavis.
95
96 This package contains backend for exim.
97
98 %description exim -l pl
99 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
100 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
101
102 Pakiet ten zawiera back-end dla exima.
103
104 # NFY
105 #%package qmail
106 #Summary:       A Mail Virus Scanner - qmail backend.
107 #Summary(pl):   Antywirusowy skaner poczty elektronicznej - backend dla qmaila
108 #Group:         Applications/Mail
109 #Provides:      amavisd-daemon
110 #Obsoletes:     amavisd-daemon
111 #Obsoletes:     amavisd-postfix
112 #Obsoletes:     amavisd-exim
113 #Obsoletes:     amavisd-sendmail
114 #Requires:      qmailmta
115 #
116 #%description qmail
117 #AMaViS is a script that interfaces a mail transport agent (MTA) with
118 #one or more virus scanners. This is daemonized version of amavis.
119 #
120 #This package contains backend for qmail.
121 #
122 #%description qmail -l pl
123 #AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
124 #a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
125 #
126 #Pakiet ten zawiera back-end dla qmaila.
127
128 %package sendmail
129 Summary:        A Mail Virus Scanner - sendmail backend.
130 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
131 Group:          Applications/Mail
132 Provides:       amavisd-daemon
133 Obsoletes:      amavisd-daemon
134 Obsoletes:      amavisd-postfix
135 Obsoletes:      amavisd-exim
136 Obsoletes:      amavisd-qmail
137 Requires:       sendmail
138
139 %description sendmail
140 AMaViS is a script that interfaces a mail transport agent (MTA) with
141 one or more virus scanners. This is daemonized version of amavis.
142
143 This package contains backend for sendmail.
144
145 %description sendmail -l pl
146 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
147 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
148
149 Pakiet ten zawiera back-end dla sendmaila.
150
151 %prep
152 %setup -q -n %{name}-snapshot-%{version}
153 %patch0 -p1
154 %patch1 -p1
155 %patch2 -p1
156 %patch3 -p1
157
158 %build
159 aclocal
160 %{__autoconf}
161 %{__automake}
162 %configure \
163         --enable-smtp \
164         --enable-postfix \
165         --enable-all \
166         --enable-syslog \
167         --with-runtime-dir=%{_var}/spool/amavis/runtime \
168         --with-virusdir=%{_var}/spool/amavis/virusmails \
169         --with-logdir=%{_var}/log \
170         --with-amavisuser=amavis \
171         --with-sockname=%{_var}/run/amavisd/amavisd.sock
172
173 %{__make}
174 mv amavis/amavisd amavis/amavisd.postfix
175
176 %configure \
177         --disable-smtp \
178         --enable-exim \
179         --enable-all \
180         --enable-syslog \
181         --with-runtime-dir=%{_var}/spool/amavis/runtime \
182         --with-virusdir=%{_var}/spool/amavis/virusmails \
183         --with-logdir=%{_var}/log \
184         --with-amavisuser=amavis \
185         --with-sockname=%{_var}/run/amavisd/amavisd.sock
186
187 %{__make}
188 mv amavis/amavisd amavis/amavisd.exim
189
190 # NFY
191 #%configure \
192 #       --disable-smtp \
193 #       --enable-qmail \
194 #       --enable-all \
195 #       --enable-syslog \
196 #       --with-runtime-dir=%{_var}/spool/amavis/runtime \
197 #       --with-virusdir=%{_var}/spool/amavis/virusmails \
198 #       --with-logdir=%{_var}/log \
199 #       --with-amavisuser=amavis \
200 #       --with-sockname=%{_var}/run/amavisd/amavisd.sock
201 #
202 #%{__make}
203 #mv amavis/amavisd amavis/amavisd.qmail
204
205 %configure \
206         --disable-smtp \
207         --enable-sendmail \
208         --enable-all \
209         --enable-syslog \
210         --with-runtime-dir=%{_var}/spool/amavis/runtime \
211         --with-virusdir=%{_var}/spool/amavis/virusmails \
212         --with-logdir=%{_var}/log \
213         --with-amavisuser=amavis \
214         --with-sockname=%{_var}/run/amavisd/amavisd.sock
215
216 %{__make}
217 mv amavis/amavisd amavis/amavisd.sendmail
218
219 %install
220 rm -rf $RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis,%{_var}/run/amavisd}
222
223 %{__make} install \
224         amavisuser=$(id -u) \
225         DESTDIR=$RPM_BUILD_ROOT
226 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
227
228 install amavis/amavisd.{exim,postfix,sendmail} $RPM_BUILD_ROOT%{_sbindir}
229
230 %clean
231 rm -rf $RPM_BUILD_ROOT
232
233 %files
234 %defattr(644,root,root,755)
235 %doc README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
236 %attr(755,root,root) %{_sbindir}/amavis
237 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
238 %config(noreplace) %{_sysconfdir}/amavisd.conf
239 %attr(750,amavis,root) %{_var}/spool/amavis
240 %attr(755,amavis,root) %{_var}/run/amavisd
241
242 %files exim
243 %attr(755,root,root) %{_sbindir}/amavisd.exim
244 %ghost %attr(777,root,root) %{_sbindir}/amavisd
245
246 %files postfix
247 %attr(755,root,root) %{_sbindir}/amavisd.postfix
248 %ghost %attr(777,root,root) %{_sbindir}/amavisd
249
250 #%files qmail
251 #%attr(755,root,root) %{_sbindir}/amavisd.qmail
252 #%ghost %attr(777,root,root) %{_sbindir}/amavisd
253
254 %files sendmail
255 %attr(755,root,root) %{_sbindir}/amavisd.sendmail
256 %ghost %attr(777,root,root) %{_sbindir}/amavisd
257
258 %pre
259 if [ -n "`id -u amavis 2>/dev/null`" ]; then
260         if [ "`id -u amavis`" != "97" ]; then
261                 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
262                 exit 1
263         fi
264 else
265         %{_sbindir}/useradd -u 97 -r -d %{_var}/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
266 fi
267
268 %postun
269 if [ "$1" = "0" ]; then
270         %{_sbindir}/userdel amavis
271 fi
272
273 %post
274 /sbin/chkconfig --add amavisd
275
276 if [ -f %{_var}/lock/subsys/amavisd ]; then
277         /etc/rc.d/init.d/amavisd restart >&2
278 else
279         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
280 fi
281
282 %preun
283 if [ "$1" = "0" ];then
284         if [ -f %{_var}/lock/subsys/amavisd ]; then
285                 /etc/rc.d/init.d/amavisd stop >&2
286         fi
287         /sbin/chkconfig --del amavisd
288 fi
289
290 %post exim
291 ln -sf amavisd.exim %{_sbindir}/amavisd
292
293 %post postfix
294 ln -sf amavisd.postfix %{_sbindir}/amavisd
295
296 #%post qmail
297 #ln -sf amavisd.qmail %{_sbindir}/amavisd
298
299 %post sendmail
300 ln -sf amavisd.sendmail %{_sbindir}/amavisd
This page took 1.724004 seconds and 3 git commands to generate.