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