]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
- updated to 20020630
[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:        1
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 URL:            http://www.ijs.si/software/amavisd/
18 BuildRequires:  arc
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  bzip2
22 BuildRequires:  file
23 BuildRequires:  lha
24 BuildRequires:  ncompress
25 BuildRequires:  perl-Archive-Tar
26 BuildRequires:  perl-Archive-Zip
27 BuildRequires:  perl-Compress-Zlib
28 BuildRequires:  perl-MIME-tools
29 BuildRequires:  perl-Unix-Syslog
30 BuildRequires:  perl-Convert-UUlib
31 BuildRequires:  perl-Convert-TNEF
32 BuildRequires:  perl-libnet >= 1:1.12
33 BuildRequires:  perl-Mail-SpamAssassin
34 BuildRequires:  perl-Vipuls-Razor-V1
35 BuildRequires:  perl-Net-Server
36 BuildRequires:  sh-utils
37 BuildRequires:  unarj
38 BuildRequires:  unrar
39 BuildRequires:  zoo
40 Requires(pre):  /bin/id
41 Requires(pre):  /usr/sbin/useradd
42 Requires(post,preun):   /sbin/chkconfig
43 Requires(postun):       /usr/sbin/userdel
44 Requires:       /usr/lib/sendmail
45 Requires:       arc
46 Requires:       bzip2
47 Requires:       file
48 Requires:       lha
49 Requires:       ncompress
50 Requires:       sh-utils
51 Requires:       unarj
52 Requires:       unrar
53 Requires:       zoo
54 Requires:       perl-Mail-SpamAssassin
55 Requires:       perl-Vipuls-Razor-V1
56 Requires:       amavisd-new-daemon
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Obsoletes:      AMaViS
59 Obsoletes:      amavis
60
61 %description
62 AMaViS is a script that interfaces a mail transport agent (MTA) with
63 one or more virus scanners and SpamAssasin.
64 This is daemonized version of amavis.
65
66 %description -l pl
67 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
68 a jednym lub wiêcej programów antywirusowych i SpamAssasinem.
69 Wersja zdemonizowana.
70
71 %package postfix
72 Summary:        A Mail Virus Scanner with SpamAssasin support - postfix back-end.
73 Summary(pl):    Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
74 Group:          Applications/Mail
75 Provides:       amavisd-new-daemon
76 Obsoletes:      amavisd-daemon
77 Obsoletes:      amavisd-new-daemon
78 Obsoletes:      amavisd-exim
79 Obsoletes:      amavisd-qmail
80 Obsoletes:      amavisd-sendmail
81 Requires:       postfix
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 with SpamAssasin support - exim backend.
97 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla exima
98 Group:          Applications/Mail
99 Provides:       amavisd-new-daemon
100 Obsoletes:      amavisd-daemon
101 Obsoletes:      amavisd-new-daemon
102 Obsoletes:      amavisd-postfix
103 Obsoletes:      amavisd-qmail
104 Obsoletes:      amavisd-sendmail
105 Requires:       exim
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 #Provides:      amavisd-new-daemon
125 #Obsoletes:     amavisd-daemon
126 #Obsoletes:     amavisd-new-daemon
127 #Obsoletes:     amavisd-postfix
128 #Obsoletes:     amavisd-exim
129 #Obsoletes:     amavisd-sendmail
130 #Requires:      qmailmta
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 with SpamAssasin support - sendmail backend.
146 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
147 Group:          Applications/Mail
148 Provides:       amavisd-new-daemon
149 Obsoletes:      amavisd-daemon
150 Obsoletes:      amavisd-new-daemon
151 Obsoletes:      amavisd-postfix
152 Obsoletes:      amavisd-exim
153 Obsoletes:      amavisd-qmail
154 Requires:       sendmail
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 %prep
169 %setup -q -n %{name}-%{version}
170 %patch0 -p1
171 %patch1 -p1
172 %patch2 -p1
173 %patch3 -p1
174 %patch4 -p1
175 %patch5 -p1
176
177 %build
178 aclocal
179 %{__autoconf}
180 %{__automake}
181 %configure \
182         --enable-smtp \
183         --enable-postfix \
184         --enable-all \
185         --enable-syslog \
186         --with-smtp-port=10025 \
187         --with-runtime-dir=%{_var}/spool/amavis/runtime \
188         --with-virusdir=%{_var}/spool/amavis/virusmails \
189         --with-logdir=%{_var}/log \
190         --with-amavisuser=amavis \
191         --with-sockname=%{_var}/run/amavisd/amavisd.sock
192
193 %{__make}
194 mv amavis/amavisd amavis/amavisd.postfix
195
196 %configure \
197         --disable-smtp \
198         --enable-exim \
199         --enable-all \
200         --enable-syslog \
201         --with-smtp-port=10025 \
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-smtp-port=10025 \
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
227 %configure \
228         --disable-smtp \
229         --enable-sendmail \
230         --enable-all \
231         --enable-syslog \
232         --with-smtp-port=10025 \
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%{_sysconfdir}/rc.d/init.d/amavisd
250
251 install amavis/amavisd.{exim,postfix,sendmail} $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
296 %post sendmail
297 ln -sf amavisd.sendmail %{_sbindir}/amavisd
298
299 %files
300 %defattr(644,root,root,755)
301 %doc README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
302 %attr(755,root,root) %{_sbindir}/amavis
303 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
304 %config(noreplace) %{_sysconfdir}/amavisd.conf
305 %attr(750,amavis,root) %{_var}/spool/amavis
306 %attr(755,amavis,root) %{_var}/run/amavisd
307
308 %files exim
309 %attr(755,root,root) %{_sbindir}/amavisd.exim
310 %ghost %attr(777,root,root) %{_sbindir}/amavisd
311
312 %files postfix
313 %attr(755,root,root) %{_sbindir}/amavisd.postfix
314 %ghost %attr(777,root,root) %{_sbindir}/amavisd
315
316 #%files qmail
317 #%attr(755,root,root) %{_sbindir}/amavisd.qmail
318 #%ghost %attr(777,root,root) %{_sbindir}/amavisd
319
320 %files sendmail
321 %attr(755,root,root) %{_sbindir}/amavisd.sendmail
322 %ghost %attr(777,root,root) %{_sbindir}/amavisd
This page took 0.079687 seconds and 4 git commands to generate.