]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
6931fdbd78272a9d49831f1612bce43124526c24
[packages/amavisd-new.git] / amavisd-new.spec
1 # TODO:
2 # - Add polish info mail templates
3 %include        /usr/lib/rpm/macros.perl
4 Summary:        A Mail Virus Scanner with SpamAssassin support - daemon
5 Summary(pl):    Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - demon
6 Name:           amavisd-new
7 Version:        2.4.1
8 Release:        0.1
9 Epoch:          1
10 License:        GPL
11 Group:          Applications/Mail
12 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
13 # Source0-md5:  bf770a3c7eee8a9c93932a04485e6a35
14 Source1:        %{name}.init
15 Source2:        %{name}-milter.init
16 Patch0:         %{name}-config.patch
17 Patch1:         %{name}-lib64.patch
18 Patch2:         %{name}-tools-dbdir.patch
19 URL:            http://www.ijs.si/software/amavisd/
20 BuildRequires:  autoconf
21 BuildRequires:  rpm-perlprov
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 BuildRequires:  sendmail-devel
24 Requires(post,preun):   /sbin/chkconfig
25 Requires(postun):       /usr/sbin/groupdel
26 Requires(postun):       /usr/sbin/userdel
27 Requires(pre):  /bin/id
28 Requires(pre):  /usr/bin/getgid
29 Requires(pre):  /usr/sbin/groupadd
30 Requires(pre):  /usr/sbin/useradd
31 Requires:       /usr/lib/sendmail
32 Requires:       perl-Archive-Tar
33 Requires:       perl-Archive-Zip >= 1.14
34 Requires:       perl-Compress-Zlib >= 1.35
35 Requires:       perl-Convert-TNEF
36 Requires:       perl-Convert-UUlib >= 1.05
37 Requires:       perl-MIME-tools
38 Requires:       perl-Mail-SpamAssassin
39 Requires:       perl-Net-Server
40 Requires:       perl-Time-HiRes >= 1.49
41 Requires:       perl-Unix-Syslog
42 Requires:       perl-libnet
43 Requires:       sh-utils
44 Provides:       group(amavis)
45 Provides:       user(amavis)
46 Obsoletes:      AMaViS
47 Obsoletes:      amavis
48 Obsoletes:      amavisd
49 Obsoletes:      amavisd-daemon
50 Obsoletes:      amavisd-exim
51 Obsoletes:      amavisd-new-exim
52 Obsoletes:      amavisd-new-postfix
53 Obsoletes:      amavisd-new-qmail
54 Obsoletes:      amavisd-postfix
55 Obsoletes:      amavisd-qmail
56 Conflicts:      amavis-stats <= 0.1.12
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
60 AMaViS is a script that interfaces a mail transport agent (MTA) with
61 one or more virus scanners and SpamAssasin. This is daemonized version
62 of amavis.
63
64 %description -l pl
65 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
66 a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
67 zdemonizowana.
68
69 %package sendmail
70 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
71 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
72 Group:          Applications/Mail
73 Requires:       %{name} = %{epoch}:%{version}-%{release}
74 Requires:       sendmail
75
76 %description sendmail
77 AMaViS is a script that interfaces a mail transport agent (MTA) with
78 one or more virus scanners. This is daemonized version of amavis.
79
80 This package contains backend for sendmail.
81
82 %description sendmail -l pl
83 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
84 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
85
86 Pakiet ten zawiera back-end dla sendmaila.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %if "%{_lib}" == "lib64"
92 %patch1 -p1
93 %endif
94 %patch2 -p1
95
96 %build
97 cd helper-progs
98 %{__autoconf}
99 ./configure \
100         --with-sendmail=/usr/lib/sendmail \
101         --with-runtime-dir=/var/spool/amavis/runtime \
102         --with-sockname=/var/run/amavisd/amavisd.sock
103 %{__make}
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir}}
108
109 install amavisd $RPM_BUILD_ROOT%{_sbindir}
110 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
111 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
112 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
113 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
114 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
115 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
116 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %pre
122 %groupadd -g 116 -r -f amavis
123 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
124
125 %postun
126 if [ "$1" = "0" ]; then
127         %userremove amavis
128         %groupremove amavis
129 fi
130
131 %post
132 /sbin/chkconfig --add amavisd
133 %service amavisd restart "Amavisd daemon"
134
135 %preun
136 if [ "$1" = "0" ]; then
137         %service amavisd stop
138         /sbin/chkconfig --del amavisd
139 fi
140
141 %post sendmail
142 /sbin/chkconfig --add amavis-milter
143 %service amavis-milter restart "Amavis-milter daemon"
144
145 %preun sendmail
146 if [ "$1" = "0" ];then
147         %service amavis-milter stop
148         /sbin/chkconfig --del amavis-milter
149 fi
150
151 %files
152 %defattr(644,root,root,755)
153 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
154 %attr(755,root,root) %{_sbindir}/amavisd*
155 %attr(754,root,root) /etc/rc.d/init.d/amavisd
156 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
157 %attr(750,amavis,amavis) %{_var}/spool/amavis
158 %attr(750,amavis,amavis) %{_var}/run/amavisd
159
160 %files sendmail
161 %defattr(644,root,root,755)
162 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
163 %attr(755,root,root) %{_sbindir}/amavis
164 %attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.072348 seconds and 3 git commands to generate.