]> git.pld-linux.org Git - packages/amavis-ng.git/blob - amavis-ng.spec
- converted to UTF-8
[packages/amavis-ng.git] / amavis-ng.spec
1 %include        /usr/lib/rpm/macros.perl
2 %define         pdir    AMAVIS
3 Summary:        New generation amavis
4 Summary(pl.UTF-8):   Amavis nowej generacji
5 Name:           amavis-ng
6 Version:        0.1.6.9
7 Release:        3
8 License:        GPL
9 Group:          Applications/Mail
10 Source0:        http://dl.sourceforge.net/amavis/%{name}-%{version}.tar.gz
11 # Source0-md5:  e9086bfbd3fa2049860d176a0c30549e
12 Source1:        %{name}-logrotate
13 Patch0:         %{name}-quarantine.patch
14 Patch1:         %{name}-config.patch
15 Patch2:         %{name}-courier.patch
16 Patch3:         %{name}-mks.patch
17 Patch4:         %{name}-make.patch
18 URL:            http://amavis.sourceforge.net/
19 BuildRequires:  perl-devel
20 BuildRequires:  perl-libnet
21 BuildRequires:  rpm-perlprov
22 BuildRequires:  rpmbuild(macros) >= 1.202
23 BuildRequires:  sendmail-devel
24 Requires(postun):       /usr/sbin/groupdel
25 Requires(postun):       /usr/sbin/userdel
26 Requires(pre):  /bin/id
27 Requires(pre):  /usr/bin/getgid
28 Requires(pre):  /usr/sbin/groupadd
29 Requires(pre):  /usr/sbin/useradd
30 Requires:       perl-Config-IniFiles
31 Requires:       perl-File-MMagic
32 Provides:       group(amavis)
33 Provides:       user(amavis)
34 Obsoletes:      AMaViS
35 Obsoletes:      amavis
36 Obsoletes:      amavisd
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # optionally used
40 %define _noautoreq      'perl(File::Scan)'
41
42 %description
43 AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans
44 email for malicious code inside attachments and archive files,
45 stopping delivery if malicious code is found. It supports integration
46 of several third-party virus scanners and integrates nicely into
47 several MTA setups. Unlike amavis-perl and amavisd, there is no need
48 for build-time configuration.
49
50 %description -l pl.UTF-8
51 AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i
52 amavis-perl. Skanuje pocztę elektroniczną na okoliczność groźnego kodu
53 wewnątrz załączników i archiwów, nie pozwalając na doręczenie w
54 przypadku wykrycia. Wspiera integrację różnych zewnętrznych skanerów
55 antywirusowych, ładnie integruje się z różnymi serwerami pocztowymi. W
56 przeciwieństwie do amavis-perl i amavisd, nie wymaga konfiguracji w
57 czasie budowania.
58
59 %prep
60 %setup -q
61 %patch0 -p1
62 %patch1 -p1
63 %patch2 -p1
64 %patch3 -p1
65 %patch4 -p1
66
67 # precompiled x86 binary
68 rm -f amavis-milter/amavis-milter
69
70 %build
71 %{__perl} Makefile.PL \
72         INSTALLDIRS=vendor
73 %{__make}
74
75 cd doc
76 %{__make}
77
78 cd ../amavis-milter
79 %{__make} \
80         CC="%{__cc}" \
81         CFLAGS="%{rpmcflags}"
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/logrotate.d,%{_infodir},%{_sbindir}}
86 install -d $RPM_BUILD_ROOT/var/spool/amavis-ng/{problems,quarantine,queue,tmp}
87 install -d $RPM_BUILD_ROOT/var/{run/amavis-ng,log/{archiv/amavis-ng,amavis-ng}}
88 install -d $RPM_BUILD_ROOT%{_datadir}/amavis-ng
89
90 %{__make} install \
91         DESTDIR=$RPM_BUILD_ROOT
92
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/amavis-ng
94 install etc/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir}
95 install doc/amavis-ng.info $RPM_BUILD_ROOT%{_infodir}
96 install amavis-milter/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
97 install magic.mime $RPM_BUILD_ROOT%{_datadir}/amavis-ng
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %pre
103 if [ "$1" = "1" ]; then
104         echo
105         echo 'Type "info amavis-ng" to get help'
106         echo
107 fi
108
109 %groupadd -g 97 -r -f amavis
110 %useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis
111
112 %triggerin -- courier
113 chown -R daemon /var/{spool,log}/amavis-ng
114 if [ -f /var/lock/subsys/courier ]; then
115         %{_sbindir}/filterctl stop perlfilter
116         %{_sbindir}/filterctl start perlfilter
117 fi
118
119 %postun
120 if [ "$1" = "0" ]; then
121         %userremove amavis
122         %groupremove amavis
123 fi
124
125 %files
126 %defattr(644,root,root,755)
127 %doc doc/README* doc/ChangeLog doc/RELEASE-NOTES
128 %attr(755,root,root) %{_bindir}/*
129 %attr(755,root,root) %{_sbindir}/*
130 %attr(770,amavis,amavis) /var/log/amavis-ng
131 %attr(770,amavis,amavis) /var/log/archiv/amavis-ng
132 %attr(750,amavis,amavis) /var/run/amavis-ng
133 %attr(770,amavis,amavis) /var/spool/amavis-ng
134 %attr(644,amavis,amavis) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis.conf
135 %{_datadir}/amavis-ng
136 %{_infodir}/amavis-ng.info*
137 %{perl_vendorlib}/AMAVIS.pm
138 %{perl_vendorlib}/AMAVIS
139 %{_mandir}/man1/*
140 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/amavis-ng
This page took 0.079616 seconds and 3 git commands to generate.