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