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