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