]> git.pld-linux.org Git - packages/amavis.git/blob - amavis.spec
- better message in pre, more Requires(), release 3
[packages/amavis.git] / amavis.spec
1 %include        /usr/lib/rpm/macros.perl
2
3 Summary:        A Mail Virus Scanner
4 Summary(pl):    Antywirusowy skaner poczty elektronicznej
5 Name:           amavis
6 Version:        11
7 Release:        3
8 URL:            http://www.amavis.org/
9 Source0:        http://www.amavis.org/dist/perl/%{name}-perl-%{version}.tar.gz
10 Patch0:         %{name}-perl-mks32.patch
11 Patch1:         %{name}-nomilter.patch
12 License:        GPL
13 Group:          Applications/Mail
14 Obsoletes:      AMaViS
15 BuildRequires:  autoconf >= 2.52
16 BuildRequires:  automake
17 BuildRequires:  perl
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 Requires:       /usr/sbin/sendmail
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 %prep
59 %setup -q -n %{name}-perl-%{version}
60 %patch0 -p1
61 %patch1 -p1
62
63 %build
64 aclocal
65 automake -a -c
66 %{__autoconf}
67 %configure \
68         --enable-all \
69         --with-sendmail-wrapper=%{_sbindir}/sendmail \
70         --with-runtime-dir=/var/spool/amavis/runtime \
71         --with-virusdir=/var/spool/amavis/virusmails \
72         --with-mailto="postmaster" \
73         --with-amavisuser=amavis
74
75 %{__make}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %{__make} install \
81         amavisuser=$(id -u) \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %pre
88 if [ -n "`id -u amavis 2>/dev/null`" ]; then
89         if [ "`id -u amavis`" != "97" ]; then
90                 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
91                 exit 1
92         fi
93 else
94         /usr/sbin/useradd -u 97 -r -d /var/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
95 fi
96
97 %postun
98 if [ "$1" = "0" ]; then
99         /usr/sbin/userdel amavis
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_sbindir}/*
105 %doc README* AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
106 %attr(750,amavis,root) /var/spool/amavis
This page took 0.060434 seconds and 3 git commands to generate.