]> git.pld-linux.org Git - packages/amavis-ng.git/blob - amavis-ng.spec
- revert user changes
[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 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         INSTALLDIRS=vendor
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT
60
61 %{__make} install DESTDIR=$RPM_BUILD_ROOT
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %pre
67 if [ -n "`getgid amavis`" ]; then
68    if [ "`getgid amavis`" != "97" ]; then
69        echo "Warning: group amavis doesn't have gid=97. Correct this before installing amavis" 1>&2
70        exit 1
71    fi
72 else
73   echo "adding group amavis GID=97"
74   /usr/sbin/groupadd -g 97 -r -f amavis
75 fi
76
77 if [ -n "`id -u amavis 2>/dev/null`" ]; then
78    if [ "`id -u amavis`" != "97" ]; then
79       echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
80       exit 1
81    fi
82 else
83    echo "adding user amavis UID=97"
84    /usr/sbin/useradd -u 97 -r -d /var/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
85 fi
86
87 %postun
88 if [ "$1" = "0" ]; then
89    echo "Removing user amavis"
90    /usr/sbin/userdel amavis
91    echo "Removing group amavis"
92    /usr/sbin/groupdel amavis
93 fi
94
95 %files
96 %defattr(644,root,root,755)
97 %doc doc/*
98 %attr(755,root,root) %{_bindir}/*
99 %attr(755,root,root) %{_sbindir}/*
100 %{_datadir}/amavis
101 %attr(750,amavis,sweep) /var/spool/amavis
102 %{perl_vendorlib}/AMAVIS.pm
103 %{perl_vendorlib}/AMAVIS
104 %{_mandir}/man1/*
This page took 0.07109 seconds and 3 git commands to generate.