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