]> git.pld-linux.org Git - packages/amavis-ng.git/blob - amavis-ng.spec
- ooh... kewl. amavis-ng in Ra is pretty unusable thing ;) Great. I love
[packages/amavis-ng.git] / amavis-ng.spec
1 Summary:        New generation amavis
2 Summary(pl):    Amavis nowej generacji
3 Name:           amavis-ng
4 Version:        0.1.4.1.orig
5 Release:        2
6 License:        GPL
7 Group:          Applications/Mail
8 Source0:        http://prdownloads.sourceforge.net/amavis/%{name}_%{version}.tar.gz
9 Patch0:         %{name}.patch
10 URL:            http://amavis.sourceforge.net/
11 BuildRequires:  perl
12 BuildRequires:  perl-devel
13 Requires(pre):  /usr/bin/getgid
14 Requires(pre):  /bin/id
15 Requires(pre):  /usr/sbin/groupadd
16 Requires(pre):  /usr/sbin/useradd
17 Requires(postun):       /usr/sbin/userdel
18 Requires(postun):       /usr/sbin/groupdel
19 Obsoletes:      amavisd
20 Obsoletes:      amavis
21 Obsoletes:      AMaViS
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans
26 email for malicious code inside attachments and archive files,
27 stopping delivery if malicious code is found. It supports integration
28 of several third-party virus scanners and integrates nicely into
29 several MTA setups. Unlike amavis-perl and amavisd, there is no need
30 for build-time configuration.
31
32 %description -l pl
33 AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i
34 amavis-perl. Skanuje pocztê elektroniczn± na okoliczno¶æ gro¼nego kodu
35 wewn±trz za³±czników i archiwów, nie pozwalaj±c na dorêczenie w
36 przypadku wykrycia. Wspiera integracjê ró¿nych zewnêtrznych skanerów
37 antywirusowych, ³adnie integruje siê z ró¿nymi serwerami pocztowymi.
38 W przeciwieñstwie do amavis-perl i amavisd, nie wymaga konfiguracji w
39 czasie budowania.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44
45 %build
46 perl Makefile.PL
47 %{__make}
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT
51
52 %{__make} install DESTDIR=$RPM_BUILD_ROOT
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %pre
58 if [ -n "`getgid amavis`" ]; then
59    if [ "`getgid amavis`" != "97" ]; then
60        echo "Warning: group amavis doesn't have gid=97. Correct this before installing amavis" 1>&2
61        exit 1
62    fi
63 else
64   echo "adding group amavis GID=97"
65   /usr/sbin/groupadd -g 97 -r -f amavis
66 fi
67
68 if [ -n "`id -u amavis 2>/dev/null`" ]; then
69    if [ "`id -u amavis`" != "97" ]; then
70       echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
71       exit 1
72    fi
73 else
74    echo "adding user amavis UID=97"
75    /usr/sbin/useradd -u 97 -r -d /var/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
76 fi
77
78 %postun
79 if [ "$1" = "0" ]; then
80    echo "Removing user amavis"
81    /usr/sbin/userdel amavis
82    echo "Removing group amavis"
83    /usr/sbin/groupdel amavis
84 fi
85
86
87 %files
88 %defattr(644,root,root,755)
89 %doc doc/*
90 %attr(755,root,root) %{_bindir}/*
91 %attr(755,root,root) %{_sbindir}/*
92 %{_datadir}/amavis
93 %attr(750,amavis,amavis) /var/spool/amavis
94 /usr/lib/perl5/*
95 /usr/share/man/man1/*
This page took 0.049821 seconds and 3 git commands to generate.