]> git.pld-linux.org Git - packages/amavisd.git/blob - amavisd.spec
- Requires: %%{_libdir}/sendmail instead %{_sbindir}/sendmail,
[packages/amavisd.git] / amavisd.spec
1 %include        /usr/lib/rpm/macros.perl    
2 Summary:        A Mail Virus Scanner - Daemon.
3 Summary(pl):    Antywirusowy skaner poczty elektronicznej - Demon
4 Name:           amavisd
5 Version:        20010714
6 Release:        1
7 License:        GPL
8 Group:          Applications/Mail
9 Group(de):      Applikationen/Post
10 Group(es):      Aplicaciones/Correo Electrónico
11 Group(fr):      Applications/Courrier
12 Group(pl):      Aplikacje/Poczta
13 Group(pt):      Aplicações/Correio Eletrônico
14 Source0:        http://www.amavis.org/dist/perl/%{name}-snapshot-%{version}.tar.gz
15 Source1:        %{name}.init
16 URL:            http://www.amavis.org/
17 BuildRequires:  arc
18 BuildRequires:  autoconf
19 BuildRequires:  bzip2
20 BuildRequires:  file
21 BuildRequires:  lha
22 BuildRequires:  ncompress
23 BuildRequires:  perl-Archive-Tar
24 BuildRequires:  perl-Archive-Zip
25 BuildRequires:  perl-Compress-Zlib
26 BuildRequires:  perl-MIME-tools
27 BuildRequires:  perl-Unix-Syslog
28 BuildRequires:  perl-devel
29 BuildRequires:  perl-Convert-UUlib
30 BuildRequires:  perl-Convert-TNEF
31 BuildRequires:  sh-utils
32 BuildRequires:  unarj
33 BuildRequires:  unrar
34 BuildRequires:  zoo
35 Obsoletes:      AMaViS
36 Obsoletes:      amavis
37 Requires:       %{_libdir}/sendmail
38 Requires:       arc
39 Requires:       bzip2
40 Requires:       file
41 Requires:       lha
42 Requires:       ncompress
43 Requires:       sh-utils
44 Requires:       unarj
45 Requires:       unrar
46 Requires:       zoo
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 AMaViS is a script that interfaces a mail transport agent (MTA) with
51 one or more virus scanners. This is daemonized version of amavis.
52
53 %description -l pl
54 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
55 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
56
57 %prep
58 %setup -q -n %{name}-snapshot-%{version}
59
60 %build
61 autoconf
62 %configure \
63         --enable-relay \
64         --enable-smtp \
65         --enable-all \
66         --enable-syslog \
67         --with-runtime-dir=%{_var}/spool/amavis/runtime \
68         --with-logdir=%{_var}/log \
69         --with-amavisuser=amavis \
70         --with-sockname=%{_var}/run/amavisd/amavisd.sock
71
72 %{__make}
73
74 gzip -9nf README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis,%{_var}/run/amavisd}
79
80 %{__make} install \
81         amavisuser=$(id -u) \
82         DESTDIR=$RPM_BUILD_ROOT
83 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
84
85 %files
86 %defattr(644,root,root,755)
87 %attr(755,root,root) %{_sbindir}/amavisd
88 %attr(755,root,root) %{_sbindir}/amavis
89 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
90 %config(noreplace) %{_sysconfdir}/amavisd.conf 
91 %doc *.gz doc/*.gz doc/amavis.png
92 %attr(750,amavis,root) %{_var}/spool/amavis
93 %attr(755,amavis,root) %{_var}/run/amavisd
94
95 %pre
96 if [ -n "`id -u amavis 2>/dev/null`" ]; then
97         if [ "`id -u amavis`" != "97" ]; then
98                 echo "Warning: user amavis haven't uid=97. Correct this before installing amavis" 1>&2
99                 exit 1
100         fi
101 else
102         %{_sbindir}/useradd -u 97 -r -d %{_var}/spool/amavis  -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
103 fi
104
105 %postun
106 if [ "$1" = "0" ]; then
107         %{_sbindir}/userdel amavis
108 fi
109
110 %post
111 /sbin/chkconfig --add amavisd
112
113 if [ -f %{_var}/lock/subsys/amavisd ]; then
114         /etc/rc.d/init.d/amavisd restart >&2
115 else
116         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
117 fi
118
119 %preun
120 if [ "$1" = "0" ];then
121         if [ -f %{_var}/lock/subsys/amavisd ]; then
122                 /etc/rc.d/init.d/amavisd stop >&2
123         fi
124         /sbin/chkconfig --del amavisd
125 fi
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
This page took 0.739187 seconds and 4 git commands to generate.