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