]> git.pld-linux.org Git - packages/amavis.git/blob - amavis.spec
- adapterized.
[packages/amavis.git] / amavis.spec
1
2 # conditional build _with_mks32 support for mks32 i386 _only_
3
4 %include        /usr/lib/rpm/macros.perl
5 Summary:        A Mail Virus Scanner
6 Summary(pl):    Antywirusowy skaner poczty elektronicznej
7 Name:           amavis
8 Version:        11
9 Release:        1
10 URL:            http://www.amavis.org/
11 Source0:        http://www.amavis.org/dist/perl/%{name}-perl-%{version}.tar.gz
12 %{?_with_mks32:Patch0: %{name}-perl-mks32.patch}
13 License:        GPL
14 Group:          Applications/Mail
15 Obsoletes:      AMaViS
16 BuildRequires:  autoconf >= 2.52
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:       file
36 Requires:       sh-utils
37 Requires:       arc
38 Requires:       bzip2
39 Requires:       lha
40 Requires:       unarj
41 Requires:       ncompress
42 Requires:       unrar
43 Requires:       zoo
44 Requires:       %{_sbindir}/sendmail
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 AMaViS is a script that interfaces a mail transport agent (MTA) with
49 one or more virus scanners.
50
51 %description -l pl
52 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
53 a jednym lub wiêcej programów antywirusowych.
54
55 %prep
56 %setup -q -n %{name}-perl-%{version}
57 %{?_with_mks32:%patch -p1}
58
59 %build
60 autoconf
61 %configure \
62         --enable-all \
63         --with-sendmail-wrapper=%{_sbindir}/sendmail \
64         --with-runtime-dir=/var/spool/amavis/runtime \
65         --with-virusdir=/var/spool/amavis/virusmails \
66         --with-mailto="postmaster" \
67         --with-amavisuser=amavis
68
69 %{__make}
70
71 gzip -9nf README* AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %{__make} install \
77         amavisuser=$(id -u) \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 %files
81 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_sbindir}/*
83 %doc *.gz doc/*.gz doc/amavis.png
84 %attr(750,amavis,root) /var/spool/amavis
85
86 %pre
87 if [ -n "`id -u amavis 2>/dev/null`" ]; then
88         if [ "`id -u amavis`" != "97" ]; then
89                 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
90                 exit 1
91         fi
92 else
93         /usr/sbin/useradd -u 97 -r -d /var/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
94 fi
95
96 %postun
97 if [ "$1" = "0" ]; then
98         /usr/sbin/userdel amavis
99 fi
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
This page took 0.109283 seconds and 3 git commands to generate.