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