]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
- one more little detail
[packages/amavisd-new.git] / amavisd-new.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        A Mail Virus Scanner with SpamAssasin support - Daemon.
3 Summary(pl):    Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - Demon
4 Name:           amavisd-new
5 Version:        20020630
6 Release:        4
7 License:        GPL
8 Group:          Applications/Mail
9 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Patch0:         %{name}-notest-mta.patch
12 Patch1:         %{name}-nomilter.patch
13 Patch2:         %{name}-qmail.patch
14 Patch3:         %{name}-clamav.patch
15 Patch4:         %{name}-paths.patch
16 Patch5:         %{name}-avp.patch
17 Patch6:         %{name}-config.patch
18 URL:            http://www.ijs.si/software/amavisd/
19 BuildRequires:  arc
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  bzip2
23 BuildRequires:  file
24 BuildRequires:  lha
25 BuildRequires:  ncompress
26 BuildRequires:  perl-Archive-Tar
27 BuildRequires:  perl-Archive-Zip
28 BuildRequires:  perl-Compress-Zlib
29 BuildRequires:  perl-MIME-tools
30 BuildRequires:  perl-Unix-Syslog
31 BuildRequires:  perl-Convert-UUlib
32 BuildRequires:  perl-Convert-TNEF
33 BuildRequires:  perl-libnet >= 1:1.12
34 BuildRequires:  perl-Mail-SpamAssassin
35 BuildRequires:  perl-Vipuls-Razor-V1
36 BuildRequires:  perl-Net-Server
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(post,preun):   /sbin/chkconfig
44 Requires(postun):       /usr/sbin/userdel
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:       perl-Mail-SpamAssassin
56 Requires:       perl-Vipuls-Razor-V1
57 Requires:       amavisd-new-daemon
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 Obsoletes:      AMaViS
60 Obsoletes:      amavis
61
62 %description
63 AMaViS is a script that interfaces a mail transport agent (MTA) with
64 one or more virus scanners and SpamAssasin.
65 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 i SpamAssasinem.
70 Wersja zdemonizowana.
71
72 %package postfix
73 Summary:        A Mail Virus Scanner with SpamAssasin support - postfix back-end.
74 Summary(pl):    Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
75 Group:          Applications/Mail
76 Provides:       amavisd-new-daemon
77 Obsoletes:      amavisd-daemon
78 Obsoletes:      amavisd-new-daemon
79 Obsoletes:      amavisd-exim
80 Obsoletes:      amavisd-qmail
81 Obsoletes:      amavisd-sendmail
82 Requires:       postfix
83
84 %description postfix
85 AMaViS is a script that interfaces a mail transport agent (MTA) with
86 one or more virus scanners. This is daemonized version of amavis.
87
88 This package contains backend for postfix.
89
90 %description postfix -l pl
91 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
92 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
93
94 Pakiet ten zawiera back-end dla postfiks.
95
96 %package exim
97 Summary:        A Mail Virus Scanner with SpamAssasin support - exim backend.
98 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla exima
99 Group:          Applications/Mail
100 Provides:       amavisd-new-daemon
101 Obsoletes:      amavisd-daemon
102 Obsoletes:      amavisd-new-daemon
103 Obsoletes:      amavisd-postfix
104 Obsoletes:      amavisd-qmail
105 Obsoletes:      amavisd-sendmail
106 Requires:       exim
107
108 %description exim
109 AMaViS is a script that interfaces a mail transport agent (MTA) with
110 one or more virus scanners. This is daemonized version of amavis.
111
112 This package contains backend for exim.
113
114 %description exim -l pl
115 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
116 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
117
118 Pakiet ten zawiera back-end dla exima.
119
120 # NFY
121 #%package qmail
122 #Summary:       A Mail Virus Scanner - qmail backend.
123 #Summary(pl):   Antywirusowy skaner poczty elektronicznej - backend dla qmaila
124 #Group:         Applications/Mail
125 #Provides:      amavisd-new-daemon
126 #Obsoletes:     amavisd-daemon
127 #Obsoletes:     amavisd-new-daemon
128 #Obsoletes:     amavisd-postfix
129 #Obsoletes:     amavisd-exim
130 #Obsoletes:     amavisd-sendmail
131 #Requires:      qmailmta
132 #
133 #%description qmail
134 #AMaViS is a script that interfaces a mail transport agent (MTA) with
135 #one or more virus scanners. This is daemonized version of amavis.
136 #
137 #This package contains backend for qmail.
138 #
139 #%description qmail -l pl
140 #AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
141 #a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
142 #
143 #Pakiet ten zawiera back-end dla qmaila.
144
145 %package sendmail
146 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend.
147 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
148 Group:          Applications/Mail
149 Provides:       amavisd-new-daemon
150 Obsoletes:      amavisd-daemon
151 Obsoletes:      amavisd-new-daemon
152 Obsoletes:      amavisd-postfix
153 Obsoletes:      amavisd-exim
154 Obsoletes:      amavisd-qmail
155 Requires:       sendmail
156
157 %description sendmail
158 AMaViS is a script that interfaces a mail transport agent (MTA) with
159 one or more virus scanners. This is daemonized version of amavis.
160
161 This package contains backend for sendmail.
162
163 %description sendmail -l pl
164 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
165 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
166
167 Pakiet ten zawiera back-end dla sendmaila.
168
169 %prep
170 %setup -q -n %{name}-%{version}
171 %patch0 -p1
172 %patch1 -p1
173 %patch2 -p1
174 %patch3 -p1
175 %patch4 -p1
176 %patch5 -p1
177 %patch6 -p1
178
179 %build
180 aclocal
181 %{__autoconf}
182 %{__automake}
183 %configure \
184         --disable-smtp \
185         --enable-exim \
186         --enable-all \
187         --enable-syslog \
188         --with-smtp-port=10025 \
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.exim
197
198 # NFY
199 #%%configure \
200 #       --disable-smtp \
201 #       --enable-qmail \
202 #       --enable-all \
203 #       --enable-syslog \
204 #       --with-smtp-port=10025 \
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.qmail
213
214 %configure \
215         --disable-smtp \
216         --enable-sendmail \
217         --enable-all \
218         --enable-syslog \
219         --with-smtp-port=10025 \
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.sendmail
228
229 %configure \
230         --enable-smtp \
231         --enable-postfix \
232         --enable-all \
233         --enable-syslog \
234         --with-smtp-port=10025 \
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.postfix
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%{_sysconfdir}/rc.d/init.d/amavisd
252
253 install amavis/amavisd.{exim,postfix,sendmail} $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         /usr/sbin/userdel 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
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) %{_sysconfdir}/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}/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.045664 seconds and 3 git commands to generate.