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