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