]> git.pld-linux.org Git - packages/amavisd.git/blob - amavisd.spec
- added BR: perl-libnet
[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-exim
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-postfix
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 %prep
94 %setup -q -n %{name}-snapshot-%{version}
95
96 %build
97 autoconf
98 %configure \
99         --enable-smtp \
100         --enable-postfix \
101         --enable-all \
102         --enable-syslog \
103         --with-runtime-dir=%{_var}/spool/amavis/runtime \
104         --with-virusdir=%{_var}/spool/amavis/virusmails \
105         --with-logdir=%{_var}/log \
106         --with-amavisuser=amavis \
107         --with-sockname=%{_var}/run/amavisd/amavisd.sock
108
109 %{__make}
110 mv amavis/amavisd amavis/amavisd.postfix
111
112 %configure \
113         --disable-smtp \
114         --enable-exim \
115         --enable-all \
116         --enable-syslog \
117         --with-runtime-dir=%{_var}/spool/amavis/runtime \
118         --with-virusdir=%{_var}/spool/amavis/virusmails \
119         --with-logdir=%{_var}/log \
120         --with-amavisuser=amavis \
121         --with-sockname=%{_var}/run/amavisd/amavisd.sock
122
123 %{__make}
124 cp amavis/amavisd amavis/amavisd.exim
125
126 gzip -9nf README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis,%{_var}/run/amavisd}
131
132 %{__make} install \
133         amavisuser=$(id -u) \
134         DESTDIR=$RPM_BUILD_ROOT
135 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
136
137 install amavis/amavisd.{exim,postfix} $RPM_BUILD_ROOT%{_sbindir}
138
139 %files
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_sbindir}/amavis
142 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
143 %config(noreplace) %{_sysconfdir}/amavisd.conf
144 %doc *.gz doc/*.gz doc/amavis.png
145 %attr(750,amavis,root) %{_var}/spool/amavis
146 %attr(755,amavis,root) %{_var}/run/amavisd
147
148 %files postfix
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_sbindir}/amavisd.postfix
151
152 %files exim
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_sbindir}/amavisd.exim
155
156 %pre
157 if [ -n "`id -u amavis 2>/dev/null`" ]; then
158         if [ "`id -u amavis`" != "97" ]; then
159                 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
160                 exit 1
161         fi
162 else
163         %{_sbindir}/useradd -u 97 -r -d %{_var}/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
164 fi
165
166 %postun
167 if [ "$1" = "0" ]; then
168         %{_sbindir}/userdel amavis
169 fi
170
171 %post
172 /sbin/chkconfig --add amavisd
173
174 if [ -f %{_var}/lock/subsys/amavisd ]; then
175         /etc/rc.d/init.d/amavisd restart >&2
176 else
177         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
178 fi
179
180 %preun
181 if [ "$1" = "0" ];then
182         if [ -f %{_var}/lock/subsys/amavisd ]; then
183                 /etc/rc.d/init.d/amavisd stop >&2
184         fi
185         /sbin/chkconfig --del amavisd
186 fi
187
188 %post exim
189 if [ -f %{_sbindir}/amavisd ]; then
190     rm -f %{_sbindir}/amavisd
191 fi
192 ln -s amavisd.exim %{_sbindir}/amavisd
193
194 %postun exim
195 if [ -f %{_sbindir}/amavisd ]; then
196     rm -f %{_sbindir}/amavisd
197 fi
198
199 %post postfix
200 if [ -f %{_sbindir}/amavisd ]; then
201     rm -f %{_sbindir}/amavisd
202 fi
203 ln -s amavisd.postfix %{_sbindir}/amavisd
204
205 %postun postfix
206 if [ -f %{_sbindir}/amavisd ]; then
207     rm -f %{_sbindir}/amavisd
208 fi
209
210 %clean
211 rm -rf $RPM_BUILD_ROOT
This page took 0.074362 seconds and 4 git commands to generate.