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