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