]>
Commit | Line | Data |
---|---|---|
afeb56a6 | 1 | Summary: New generation amavis |
2 | Summary(pl): Amavis nowej generacji | |
3 | Name: amavis-ng | |
a00ed71e | 4 | Version: 0.1.4.1.orig |
afeb56a6 | 5 | Release: 0 |
6 | License: GPL | |
7 | Group: Applications/Mail | |
a00ed71e | 8 | Source0: http://prdownloads.sourceforge.net/amavis/%{name}_%{version}.tar.gz |
9a43b838 | 9 | Patch0: %{name}.patch |
afeb56a6 | 10 | URL: http://amavis.sourceforge.net/ |
11 | BuildRequires: perl | |
12 | BuildRequires: perl-devel | |
13 | Obsoletes: amavisd | |
14 | Obsoletes: amavis | |
15 | Obsoletes: AMaViS | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
9a43b838 | 19 | AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans |
20 | email for malicious code inside attachments and archive files, | |
21 | stopping delivery if malicious code is found. It supports integration | |
22 | of several third-party virus scanners and integrates nicely into | |
23 | several MTA setups. Unlike amavis-perl and amavisd, there is no need | |
24 | for build-time configuration. | |
afeb56a6 | 25 | |
9a43b838 | 26 | # %description -l pl |
27 | # TODO | |
afeb56a6 | 28 | |
29 | %prep | |
30 | %setup -q | |
a00ed71e | 31 | %patch0 -p1 |
afeb56a6 | 32 | |
33 | %build | |
34 | perl Makefile.PL | |
a00ed71e | 35 | %{__make} |
afeb56a6 | 36 | %install |
37 | rm -rf $RPM_BUILD_ROOT | |
38 | install -d $RPM_BUILD_ROOT | |
39 | ||
40 | %{__make} install DESTDIR=$RPM_BUILD_ROOT | |
41 | ||
42 | %clean | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
a00ed71e | 45 | %pre |
46 | if [ -n "`getgid amavis`" ]; then | |
47 | if [ "`getgid amavis`" != "97" ]; then | |
48 | echo "Warning: group amavis doesn't have gid=97. Correct this before installing clamav" 1>&2 | |
49 | exit 1 | |
50 | fi | |
51 | else | |
52 | echo "adding group amavis GID=97" | |
53 | /usr/sbin/groupadd -g 97 -r -f amavis | |
54 | fi | |
9a43b838 | 55 | |
a00ed71e | 56 | if [ -n "`id -u amavis 2>/dev/null`" ]; then |
57 | if [ "`id -u amavis`" != "97" ]; then | |
58 | echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2 | |
59 | exit 1 | |
60 | fi | |
61 | else | |
62 | echo "adding user amavis UID=97" | |
63 | /usr/sbin/useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis 1>&2 | |
64 | fi | |
65 | ||
66 | %postun | |
67 | if [ "$1" = "0" ]; then | |
68 | echo "Removing user amavis" | |
69 | /usr/sbin/userdel amavis | |
70 | echo "Removing group clamav" | |
71 | /usr/sbin/groupdel amavis | |
72 | fi | |
9a43b838 | 73 | |
a00ed71e | 74 | |
afeb56a6 | 75 | %files |
76 | %defattr(644,root,root,755) | |
a00ed71e | 77 | %doc README TODO |
afeb56a6 | 78 | %attr(755,root,root) %{_bindir}/* |
a00ed71e | 79 | %attr(755,root,root) %{_sbindir}/* |
80 | %{_datadir}/amavis | |
81 | %attr(750,amavis,amavis) /var/spool/amavis |