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