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