]> git.pld-linux.org Git - packages/amavisd.git/blob - amavisd.spec
- rel 8 (rebuild with fixed %useradd/%groupadd macros)
[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:        8
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 # needs fix somewhere
65 %undefine       with_ccache
66
67 %description
68 AMaViS is a script that interfaces a mail transport agent (MTA) with
69 one or more virus scanners. This is daemonized version of amavis.
70
71 %description -l pl
72 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
73 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
74
75 %package postfix
76 Summary:        A Mail Virus Scanner - postfix back-end
77 Summary(pl):    Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
78 Group:          Applications/Mail
79 Requires:       amavisd
80 Requires:       postfix
81 Provides:       amavisd-daemon
82 Obsoletes:      amavisd-daemon
83 Obsoletes:      amavisd-exim
84 Obsoletes:      amavisd-qmail
85 Obsoletes:      amavisd-sendmail
86
87 %description postfix
88 AMaViS is a script that interfaces a mail transport agent (MTA) with
89 one or more virus scanners. This is daemonized version of amavis.
90
91 This package contains backend for postfix.
92
93 %description postfix -l pl
94 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
95 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
96
97 Pakiet ten zawiera back-end dla postfiks.
98
99 %package exim
100 Summary:        A Mail Virus Scanner - exim backend
101 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla exima
102 Group:          Applications/Mail
103 Requires:       amavisd
104 Requires:       exim
105 Provides:       amavisd-daemon
106 Obsoletes:      amavisd-daemon
107 Obsoletes:      amavisd-postfix
108 Obsoletes:      amavisd-qmail
109 Obsoletes:      amavisd-sendmail
110
111 %description exim
112 AMaViS is a script that interfaces a mail transport agent (MTA) with
113 one or more virus scanners. This is daemonized version of amavis.
114
115 This package contains backend for exim.
116
117 %description exim -l pl
118 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
119 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
120
121 Pakiet ten zawiera back-end dla exima.
122
123 # NFY
124 %package qmail
125 Summary:        A Mail Virus Scanner - qmail backend
126 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla qmaila
127 Group:          Applications/Mail
128 Requires:       amavisd
129 Requires:       qmail
130 Provides:       amavisd-daemon
131 Obsoletes:      amavisd-daemon
132 Obsoletes:      amavisd-exim
133 Obsoletes:      amavisd-postfix
134 Obsoletes:      amavisd-sendmail
135
136 %description qmail
137 AMaViS is a script that interfaces a mail transport agent (MTA) with
138 one or more virus scanners. This is daemonized version of amavis.
139
140 This package contains backend for qmail.
141
142 %description qmail -l pl
143 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
144 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
145
146 Pakiet ten zawiera back-end dla qmaila.
147
148 %package sendmail
149 Summary:        A Mail Virus Scanner - sendmail backend
150 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
151 Group:          Applications/Mail
152 Requires:       amavisd
153 Requires:       sendmail
154 Provides:       amavisd-daemon
155 Obsoletes:      amavisd-daemon
156 Obsoletes:      amavisd-exim
157 Obsoletes:      amavisd-postfix
158 Obsoletes:      amavisd-qmail
159
160 %description sendmail
161 AMaViS is a script that interfaces a mail transport agent (MTA) with
162 one or more virus scanners. This is daemonized version of amavis.
163
164 This package contains backend for sendmail.
165
166 %description sendmail -l pl
167 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
168 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
169
170 Pakiet ten zawiera back-end dla sendmaila.
171
172 %define no_install_post_chrpath 1
173 %prep
174 %setup -q
175 #-n %{name}-snapshot-%{version}
176 #%patch0 -p1
177 #%patch1 -p1
178 #%patch2 -p1
179 #%patch3 -p1
180 #%patch4 -p1
181 %patch5 -p1
182 %patch6 -p1
183 %patch7 -p1
184
185 %build
186 rm -f missing
187 %{__aclocal}
188 %{__automake}
189 %{__autoconf}
190 %configure \
191         --with-sendmail-wrapper=/usr/lib/sendmail \
192         --enable-smtp \
193         --enable-postfix \
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.postfix
204
205 %configure \
206         --with-sendmail-wrapper=/usr/lib/sendmail \
207         --disable-smtp \
208         --enable-exim \
209         --enable-all \
210         --enable-syslog \
211         --with-runtime-dir=%{_var}/spool/amavis/runtime \
212         --with-virusdir=%{_var}/spool/amavis/virusmails \
213         --with-logdir=%{_var}/log \
214         --with-amavisuser=amavis \
215         --with-sockname=%{_var}/run/amavisd/amavisd.sock
216
217 %{__make}
218 mv amavis/amavisd amavis/amavisd.exim
219
220 #NFY
221 %configure \
222         --with-sendmail-wrapper=/usr/lib/sendmail \
223         --disable-smtp \
224         --enable-qmail \
225         --enable-all \
226         --enable-syslog \
227         --with-runtime-dir=%{_var}/spool/amavis/runtime \
228         --with-virusdir=%{_var}/spool/amavis/virusmails \
229         --with-logdir=%{_var}/log \
230         --with-amavisuser=amavis \
231         --with-sockname=%{_var}/run/amavisd/amavisd.sock
232
233 %{__make}
234 mv amavis/amavisd amavis/amavisd.qmail
235 mv amavis/amavis amavis/amavis.qmail-queue
236
237 %configure \
238         --with-sendmail-wrapper=/usr/lib/sendmail \
239         --disable-smtp \
240         --enable-sendmail \
241         --enable-all \
242         --enable-syslog \
243         --with-runtime-dir=%{_var}/spool/amavis/runtime \
244         --with-virusdir=%{_var}/spool/amavis/virusmails \
245         --with-logdir=%{_var}/log \
246         --with-amavisuser=amavis \
247         --with-sockname=%{_var}/run/amavisd/amavisd.sock
248
249 %{__make}
250 mv amavis/amavisd amavis/amavisd.sendmail
251
252 %install
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd}
255
256 %{__make} install \
257         amavisuser=$(id -u) \
258         DESTDIR=$RPM_BUILD_ROOT
259 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
260
261 install amavis/{amavisd.{exim,postfix,sendmail,qmail},amavis.qmail-queue} $RPM_BUILD_ROOT%{_sbindir}
262
263 %clean
264 rm -rf $RPM_BUILD_ROOT
265
266 %pre
267 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis
268
269 %postun
270 if [ "$1" = "0" ]; then
271         %userremove amavis
272 fi
273
274 %post
275 /sbin/chkconfig --add amavisd
276 %service amavisd restart "Amavisd daemon"
277
278 %preun
279 if [ "$1" = "0" ];then
280         %service amavisd stop
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) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
304 %attr(750,amavis,root) %{_var}/spool/amavis
305 %attr(755,amavis,root) %{_var}/run/amavisd
306
307 %files exim
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_sbindir}/amavisd.exim
310 %ghost %attr(777,root,root) %{_sbindir}/amavisd
311
312 %files postfix
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_sbindir}/amavisd.postfix
315 %ghost %attr(777,root,root) %{_sbindir}/amavisd
316
317 %if %{with qmail}
318 %files qmail
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_sbindir}/amavis.qmail-queue
321 %attr(755,root,root) %{_sbindir}/amavisd.qmail
322 %ghost %attr(777,root,root) %{_sbindir}/amavisd
323 %endif
324
325 %files sendmail
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_sbindir}/amavisd.sendmail
328 %ghost %attr(777,root,root) %{_sbindir}/amavisd
This page took 0.049902 seconds and 3 git commands to generate.