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