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