]>
Commit | Line | Data |
---|---|---|
4d192c0c | 1 | %define sub_ver pre2 |
67780d35 | 2 | %define _rel 2 |
0d57c844 | 3 | Summary: A Mail Virus Scanner |
855d7823 | 4 | Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej |
0d57c844 | 5 | Name: amavis |
9447b5ba | 6 | Version: 0.3.13 |
10ec041c | 7 | Release: 2.%{sub_ver}.%{_rel} |
7da643ca | 8 | URL: http://www.amavis.org/ |
9447b5ba | 9 | Source0: http://www.amavis.org/dist/perl/%{name}-%{version}%{sub_ver}.tar.gz |
4d192c0c | 10 | # Source0-md5: 2b90dba30a5ea2b73c2b348e26967f30 |
9447b5ba AA |
11 | Source1: %{name}-README.courier |
12 | Source2: %{name}-acx_pthread.m4 | |
13 | Patch0: %{name}-config.patch | |
0d57c844 | 14 | License: GPL |
15 | Group: Applications/Mail | |
33708c96 | 16 | BuildRequires: arc |
7da643ca | 17 | BuildRequires: autoconf >= 2.52 |
ffdcc025 | 18 | BuildRequires: automake |
33708c96 | 19 | BuildRequires: file |
20 | BuildRequires: lha | |
f1873390 | 21 | BuildRequires: libtool |
33708c96 | 22 | BuildRequires: ncompress |
7da643ca AM |
23 | BuildRequires: perl-Archive-Tar |
24 | BuildRequires: perl-Archive-Zip | |
25 | BuildRequires: perl-Compress-Zlib | |
10ec041c ER |
26 | BuildRequires: perl-Convert-TNEF |
27 | BuildRequires: perl-Convert-UUlib | |
7da643ca | 28 | BuildRequires: perl-MIME-tools |
10ec041c ER |
29 | BuildRequires: perl-Unix-Syslog |
30 | BuildRequires: perl-modules | |
b09c91cc | 31 | BuildRequires: rpm-perlprov |
ba536f04 | 32 | BuildRequires: rpmbuild(macros) >= 1.202 |
33708c96 | 33 | BuildRequires: sendmail-devel |
7da643ca | 34 | BuildRequires: unarj |
0d57c844 | 35 | BuildRequires: unrar |
b09c91cc | 36 | BuildRequires: unzip |
7da643ca | 37 | BuildRequires: zoo |
10ec041c ER |
38 | Requires(postun): /usr/sbin/groupdel |
39 | Requires(postun): /usr/sbin/userdel | |
8fc92af8 | 40 | Requires(pre): /bin/id |
b662e637 | 41 | Requires(pre): /usr/sbin/groupadd |
8fc92af8 | 42 | Requires(pre): /usr/sbin/useradd |
7da643ca AM |
43 | Requires: arc |
44 | Requires: bzip2 | |
33708c96 | 45 | Requires: file |
7da643ca | 46 | Requires: lha |
7da643ca | 47 | Requires: ncompress |
33708c96 | 48 | Requires: sh-utils |
49 | Requires: unarj | |
7da643ca AM |
50 | Requires: unrar |
51 | Requires: zoo | |
b83919e0 | 52 | Provides: group(amavis) |
53 | Provides: user(amavis) | |
10ec041c | 54 | Obsoletes: AMaViS |
4aa3ff79 | 55 | Obsoletes: amavisd |
0d57c844 | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
58 | %description | |
7da643ca AM |
59 | AMaViS is a script that interfaces a mail transport agent (MTA) with |
60 | one or more virus scanners. | |
0d57c844 | 61 | |
861422e1 JR |
62 | %description -l pl.UTF-8 |
63 | AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA) | |
64 | a jednym lub więcej programów antywirusowych. | |
253b6ed5 | 65 | |
7ca60bb3 AA |
66 | %package courier |
67 | Summary: A Mail Virus Scanner - courier backend | |
855d7823 | 68 | Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla couriera |
7ca60bb3 AA |
69 | Group: Applications/Mail |
70 | Requires: amavis = %{version}-%{release} | |
71 | Requires: courier | |
72 | Provides: amavis-courier | |
73 | ||
74 | %description courier | |
75 | AMaViS is a script that interfaces a mail transport agent (MTA) with | |
76 | one or more virus scanners. This package contains backend for courier. | |
77 | ||
861422e1 JR |
78 | %description courier -l pl.UTF-8 |
79 | AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA) | |
80 | a jednym lub więcej programów antywirusowych. | |
7ca60bb3 | 81 | |
0d57c844 | 82 | %prep |
9447b5ba AA |
83 | %setup -q -n %{name}-%{version}%{sub_ver} |
84 | %patch0 -p1 | |
85 | install -d m4 | |
86 | install %{SOURCE2} m4/acx_pthread.m4 | |
0d57c844 | 87 | |
88 | %build | |
9447b5ba AA |
89 | %{__libtoolize} |
90 | %{__aclocal} -I m4 | |
b662e637 | 91 | %{__autoheader} |
9447b5ba AA |
92 | %{__autoconf} |
93 | %{__automake} | |
94 | %configure \ | |
7da643ca AM |
95 | --enable-all \ |
96 | --with-sendmail-wrapper=%{_sbindir}/sendmail \ | |
97 | --with-runtime-dir=/var/spool/amavis/runtime \ | |
98 | --with-virusdir=/var/spool/amavis/virusmails \ | |
99 | --with-mailto="postmaster" \ | |
7ca60bb3 | 100 | --enable-courier \ |
02d25ae6 | 101 | --with-amavisuser=amavis \ |
102 | --with-perl=%{__perl} | |
7da643ca | 103 | |
0d57c844 | 104 | %{__make} |
105 | ||
7ca60bb3 AA |
106 | cp amavis/amavis amavis/amavis.courier |
107 | ||
0d57c844 | 108 | %install |
109 | rm -rf $RPM_BUILD_ROOT | |
7da643ca AM |
110 | |
111 | %{__make} install \ | |
112 | amavisuser=$(id -u) \ | |
113 | DESTDIR=$RPM_BUILD_ROOT | |
88dfae4c | 114 | |
9447b5ba | 115 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
7ca60bb3 AA |
116 | install %{SOURCE1} ./README.courier |
117 | install amavis/amavis.courier $RPM_BUILD_ROOT%{_sbindir} | |
9447b5ba | 118 | install amavis/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavis.conf |
7ca60bb3 AA |
119 | |
120 | # remove unneccessary files | |
9447b5ba | 121 | rm -f $RPM_BUILD_ROOT%{_sbindir}/amavis |
7ca60bb3 | 122 | |
88dfae4c | 123 | %clean |
124 | rm -rf $RPM_BUILD_ROOT | |
7da643ca | 125 | |
0f34d4f5 | 126 | %pre |
ba536f04 ER |
127 | %groupadd -g 116 -r -f amavis |
128 | %useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis | |
0f34d4f5 | 129 | |
130 | %postun | |
131 | if [ "$1" = "0" ]; then | |
b83919e0 | 132 | %userremove amavis |
133 | %groupremove amavis | |
0f34d4f5 | 134 | fi |
135 | ||
88dfae4c | 136 | %files |
137 | %defattr(644,root,root,755) | |
7ca60bb3 | 138 | %doc README README.scanners AUTHORS BUGS ChangeLog FAQ TODO doc/amavis.html doc/amavis.png |
9447b5ba AA |
139 | %attr(751,amavis,amavis) %dir /var/spool/amavis |
140 | %attr(753,amavis,amavis) %dir /var/spool/amavis/runtime | |
141 | %attr(753,amavis,amavis) %dir /var/spool/amavis/virusmails | |
42f3d641 | 142 | %attr(644,amavis,amavis) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis.conf |
7ca60bb3 AA |
143 | |
144 | %files courier | |
145 | %defattr(644,root,root,755) | |
146 | %doc README.courier | |
147 | %attr(755,root,root) %{_sbindir}/amavis.courier |