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