]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
02f69c179ca4c505a11094748aa99273407ca0d6
[packages/amavisd-new.git] / amavisd-new.spec
1 # TODO:
2 # - Add polish info mail templates
3 # - move amavis part of tmpwatch configuration from tmpwatch.spec
4 #
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        A Mail Virus Scanner with SpamAssassin support - daemon
7 Summary(pl.UTF-8):      Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon
8 Name:           amavisd-new
9 Version:        2.6.1
10 Release:        2
11 Epoch:          1
12 License:        GPL
13 Group:          Applications/Mail
14 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
15 # Source0-md5:  2474d4c034f96a58e5b8af91af514689
16 Source1:        %{name}.init
17 Source2:        %{name}-milter.init
18 Source3:        %{name}.tmpwatch
19 Patch0:         %{name}-config.patch
20 Patch1:         %{name}-tools-dbdir.patch
21 URL:            http://www.ijs.si/software/amavisd/
22 BuildRequires:  libmilter-devel
23 BuildRequires:  rpm-perlprov
24 BuildRequires:  rpmbuild(macros) >= 1.304
25 Requires(post,preun):   /sbin/chkconfig
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 Requires(pre):  /bin/id
29 Requires(pre):  /usr/bin/getgid
30 Requires(pre):  /usr/sbin/groupadd
31 Requires(pre):  /usr/sbin/useradd
32 Requires:       /usr/lib/sendmail
33 Requires:       perl-Archive-Tar
34 Requires:       perl-Archive-Zip >= 1.14
35 Requires:       perl-Compress-Zlib >= 1.35
36 Requires:       perl-Convert-TNEF
37 Requires:       perl-Convert-UUlib >= 1.05
38 Requires:       perl-MIME-tools
39 Requires:       perl-Net-Server >= 0.93
40 Requires:       perl-Time-HiRes >= 1.49
41 Requires:       perl-Unix-Syslog
42 Requires:       perl-libnet
43 Requires:       sh-utils
44 #Suggests:      arc
45 Suggests:       nomarch
46 #Suggests:      arj
47 Suggests:       unarj
48 Suggests:       binutils
49 Suggests:       bzip2
50 Suggests:       cabextract
51 Suggests:       clamav
52 Suggests:       cpio
53 Suggests:       dspam
54 Suggests:       freeze
55 #Suggests:      unfreeze
56 #Suggests:      melt
57 Suggests:       gzip
58 Suggests:       lha
59 Suggests:       lzop
60 Suggests:       ncompress
61 Suggests:       pax
62 Suggests:       perl-Authen-SASL
63 # required already by perl-Mail-SpamAssassin
64 #Suggests:      perl-DB_File
65 #Suggests:      perl-IO-Socket-INET6
66 # required when doing SQL lookups
67 #Suggests:      perl-DBD-mysql
68 Suggests:       perl-Digest-MD5
69 Suggests:       perl-Mail-DKIM >= 0.31
70 Suggests:       perl-Mail-SpamAssassin
71 Suggests:       perl-Razor
72 Suggests:       perl-SAVI
73 Suggests:       perl-ldap
74 Suggests:       p0f
75 #Suggests:      rar
76 Suggests:       unrar
77 #Suggests:      ripole
78 Suggests:       rpm-utils
79 Suggests:       tnef
80 Suggests:       unzoo
81 #Suggests:      zoo
82 Provides:       group(amavis)
83 Provides:       user(amavis)
84 Obsoletes:      AMaViS
85 Obsoletes:      amavis
86 Obsoletes:      amavisd
87 Obsoletes:      amavisd-daemon
88 Obsoletes:      amavisd-exim
89 Obsoletes:      amavisd-new-exim
90 Obsoletes:      amavisd-new-postfix
91 Obsoletes:      amavisd-new-qmail
92 Obsoletes:      amavisd-postfix
93 Obsoletes:      amavisd-qmail
94 Conflicts:      amavis-stats <= 0.1.12
95 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96
97 %define         _tmpwatchdir    /etc/tmpwatch
98 %define         schemadir       /usr/share/openldap/schema
99
100 %description
101 AMaViS is a script that interfaces a mail transport agent (MTA) with
102 one or more virus scanners and SpamAssasin. This is daemonized version
103 of amavis.
104
105 %description -l pl.UTF-8
106 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
107 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
108 zdemonizowana.
109
110 %package sendmail
111 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
112 Summary(pl.UTF-8):      Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
113 Group:          Applications/Mail
114 Requires:       %{name} = %{epoch}:%{version}-%{release}
115 Requires:       sendmail
116
117 %description sendmail
118 AMaViS is a script that interfaces a mail transport agent (MTA) with
119 one or more virus scanners. This is daemonized version of amavis.
120
121 This package contains backend for sendmail.
122
123 %description sendmail -l pl.UTF-8
124 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
125 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
126
127 Pakiet ten zawiera back-end dla sendmaila.
128
129 %package -n openldap-schema-amavisd-new
130 Summary:        Amavisd-new LDAP schema
131 Summary(pl.UTF-8):      Schemat LDAP dla amavisd-new
132 Group:          Networking/Daemons
133 Requires:       openldap-servers
134
135 %description -n openldap-schema-amavisd-new
136 This package contains LDAP schema for use with amavisd-new.
137
138 %description -n openldap-schema-amavisd-new -l pl.UTF-8
139 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
140
141 %prep
142 %setup -q
143 %patch0 -p1
144 %patch1 -p1
145
146 %build
147 cd helper-progs
148 %configure \
149         --with-sendmail=/usr/lib/sendmail \
150         --with-runtime-dir=/var/spool/amavis/runtime \
151         --with-sockname=/var/run/amavisd/amavisd.sock \
152         --with-milterlib=%{_libdir}
153 %{__make}
154
155 %install
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
158
159 install amavisd $RPM_BUILD_ROOT%{_sbindir}
160 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
161 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
162 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
163 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
164 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
165 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
166 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
167 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
168 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
169 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %pre
175 %groupadd -g 116 -r -f amavis
176 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
177
178 %postun
179 if [ "$1" = "0" ]; then
180         %userremove amavis
181         %groupremove amavis
182 fi
183
184 %post
185 /sbin/chkconfig --add amavisd
186 %service amavisd restart "Amavisd daemon"
187
188 %preun
189 if [ "$1" = "0" ]; then
190         %service amavisd stop
191         /sbin/chkconfig --del amavisd
192 fi
193
194 %post sendmail
195 /sbin/chkconfig --add amavis-milter
196 %service amavis-milter restart "Amavis-milter daemon"
197
198 %preun sendmail
199 if [ "$1" = "0" ];then
200         %service amavis-milter stop
201         /sbin/chkconfig --del amavis-milter
202 fi
203
204 %post -n openldap-schema-amavisd-new
205 %openldap_schema_register %{schemadir}/amavisd-new.schema
206 %service -q ldap restart
207
208 %postun -n openldap-schema-amavisd-new
209 if [ "$1" = "0" ]; then
210         %openldap_schema_unregister %{schemadir}/amavisd-new.schema
211         %service -q ldap restart
212 fi
213
214 %files
215 %defattr(644,root,root,755)
216 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
217 %attr(755,root,root) %{_sbindir}/amavisd*
218 %attr(754,root,root) /etc/rc.d/init.d/amavisd
219 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
220 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
221 %attr(750,amavis,amavis) %{_var}/spool/amavis
222 %attr(750,amavis,amavis) %{_var}/run/amavisd
223
224 %files sendmail
225 %defattr(644,root,root,755)
226 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
227 %attr(755,root,root) %{_sbindir}/amavis
228 %attr(755,root,root) %{_sbindir}/amavis-milter
229
230 %files -n openldap-schema-amavisd-new
231 %defattr(644,root,root,755)
232 %{schemadir}/*.schema
This page took 0.05503 seconds and 2 git commands to generate.