]> git.pld-linux.org Git - packages/amavis.git/blob - amavis.spec
- fix autoconf errors
[packages/amavis.git] / amavis.spec
1 %include        /usr/lib/rpm/macros.perl
2 %define         sub_ver pre2
3
4 Summary:        A Mail Virus Scanner
5 Summary(pl):    Antywirusowy skaner poczty elektronicznej
6 Name:           amavis
7 Version:        0.3.13%{sub_ver}
8 Release:        0.1
9 URL:            http://www.amavis.org/
10 Source0:        http://www.amavis.org/dist/perl/%{name}-%{version}.tar.gz
11 # Source0-md5:  2b90dba30a5ea2b73c2b348e26967f30
12 Source1:        amavis-README.courier
13 License:        GPL
14 Group:          Applications/Mail
15 Obsoletes:      AMaViS
16 BuildRequires:  autoconf >= 2.52
17 BuildRequires:  automake
18 BuildRequires:  perl-modules
19 BuildRequires:  perl-Convert-UUlib
20 BuildRequires:  perl-Convert-TNEF
21 BuildRequires:  perl-Unix-Syslog
22 BuildRequires:  perl-Archive-Tar
23 BuildRequires:  perl-Archive-Zip
24 BuildRequires:  perl-Compress-Zlib
25 BuildRequires:  perl-MIME-tools
26 BuildRequires:  file
27 BuildRequires:  sh-utils
28 BuildRequires:  arc
29 BuildRequires:  bzip2
30 BuildRequires:  lha
31 BuildRequires:  unarj
32 BuildRequires:  ncompress
33 BuildRequires:  unrar
34 BuildRequires:  zoo
35 Requires(pre):  /bin/id
36 Requires(pre):  /usr/sbin/useradd
37 Requires(postun):       /usr/sbin/userdel
38 Requires:       file
39 Requires:       sh-utils
40 Requires:       arc
41 Requires:       bzip2
42 Requires:       lha
43 Requires:       unarj
44 Requires:       ncompress
45 Requires:       unrar
46 Requires:       zoo
47 Obsoletes:      amavisd
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 AMaViS is a script that interfaces a mail transport agent (MTA) with
52 one or more virus scanners.
53
54 %description -l pl
55 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
56 a jednym lub wiêcej programów antywirusowych.
57
58 %package courier
59 Summary:        A Mail Virus Scanner - courier backend
60 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla couriera
61 Group:          Applications/Mail
62 Requires:       amavis = %{version}-%{release}
63 Requires:       courier
64 Provides:       amavis-courier
65
66 %description courier
67 AMaViS is a script that interfaces a mail transport agent (MTA) with
68 one or more virus scanners. This package contains backend for courier.
69
70 %description courier -l pl
71 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
72 a jednym lub wiêcej programów antywirusowych.
73
74 %prep
75 %setup -q
76
77 %build
78 #%{__aclocal}
79 #%{__autoconf}
80 #%{__automake}
81 %configure2_13 \
82         --enable-all \
83         --with-sendmail-wrapper=%{_sbindir}/sendmail \
84         --with-runtime-dir=/var/spool/amavis/runtime \
85         --with-virusdir=/var/spool/amavis/virusmails \
86         --with-mailto="postmaster" \
87         --enable-courier \
88         --with-amavisuser=amavis \
89         --with-perl=%{__perl}
90
91 %{__make}
92
93 cp amavis/amavis amavis/amavis.courier
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %{__make} install \
99         amavisuser=$(id -u) \
100         DESTDIR=$RPM_BUILD_ROOT
101
102 install %{SOURCE1} ./README.courier
103 install amavis/amavis.courier $RPM_BUILD_ROOT%{_sbindir}
104
105 # remove unneccessary files
106 rm -f %{_sbindir}/amavis
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %pre
112 if [ -n "`id -u amavis 2>/dev/null`" ]; then
113         if [ "`id -u amavis`" != "97" ]; then
114                 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
115                 exit 1
116         fi
117 else
118         /usr/sbin/useradd -u 97 -r -d /var/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
119 fi
120
121 %postun
122 if [ "$1" = "0" ]; then
123         /usr/sbin/userdel amavis
124 fi
125
126 %files
127 %defattr(644,root,root,755)
128 %doc README README.scanners AUTHORS BUGS ChangeLog FAQ TODO doc/amavis.html doc/amavis.png
129 %attr(750,amavis,root) /var/spool/amavis
130
131 %files courier
132 %defattr(644,root,root,755)
133 %doc README.courier
134 %attr(755,root,root) %{_sbindir}/amavis.courier
This page took 0.447238 seconds and 3 git commands to generate.