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