]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
90ab42800366ecab69ad4279f2234d38e94c9196
[packages/amavisd-new.git] / amavisd-new.spec
1 # TODO:
2 # - Add polish info mail templates
3
4 %include        /usr/lib/rpm/macros.perl
5 Summary:        A Mail Virus Scanner with SpamAssassin support - daemon
6 Summary(pl):    Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - demon
7 Name:           amavisd-new
8 Version:        20030616
9 Release:        3
10 License:        GPL
11 Group:          Applications/Mail
12 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}-p5.tar.gz
13 # Source0-md5:  13c76432e957ccd302856f64526483a2
14 Source1:        %{name}.init
15 Patch0:         %{name}-config.patch
16 # Patch1:       %{name}-bin.patch # I don't get perl and it has rejects
17 Patch3:         %{name}-cpio-reads-tar.patch
18 URL:            http://www.amavis.org/
19 BuildRequires:  arc
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  bzip2
23 BuildRequires:  file
24 BuildRequires:  lha
25 BuildRequires:  ncompress
26 BuildRequires:  perl-Archive-Tar
27 BuildRequires:  perl-Archive-Zip
28 BuildRequires:  perl-Compress-Zlib
29 BuildRequires:  perl-MIME-tools
30 BuildRequires:  perl-Unix-Syslog
31 BuildRequires:  perl-Convert-UUlib
32 BuildRequires:  perl-Convert-TNEF
33 BuildRequires:  perl-libnet
34 BuildRequires:  perl-Mail-SpamAssassin
35 BuildRequires:  perl-Net-Server
36 BuildRequires:  sh-utils
37 BuildRequires:  unarj
38 BuildRequires:  unrar
39 BuildRequires:  zoo
40 Requires(pre):  /usr/bin/getgid
41 Requires(pre):  /bin/id
42 Requires(pre):  /usr/sbin/groupadd
43 Requires(pre):  /usr/sbin/useradd
44 Requires(postun):       /usr/sbin/userdel
45 Requires(postun):       /usr/sbin/groupdel
46 Requires(post,preun):   /sbin/chkconfig
47 Requires:       /usr/lib/sendmail
48 Requires:       arc
49 Requires:       bzip2
50 Requires:       file
51 Requires:       lha
52 Requires:       ncompress
53 Requires:       sh-utils
54 Requires:       unarj
55 Requires:       unrar
56 Requires:       zoo
57 Requires:       perl-Mail-SpamAssassin
58 #Requires:      perl-SAVI
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 Obsoletes:      AMaViS
61 Obsoletes:      amavis
62 Obsoletes:      amavisd-daemon
63 Obsoletes:      amavisd-postfix
64 Obsoletes:      amavisd-exim
65 Obsoletes:      amavisd-qmail
66 Obsoletes:      amavisd-new-postfix
67 Obsoletes:      amavisd-new-exim
68 Obsoletes:      amavisd-new-qmail
69
70 %description
71 AMaViS is a script that interfaces a mail transport agent (MTA) with
72 one or more virus scanners and SpamAssasin. This is daemonized version
73 of amavis.
74
75 %description -l pl
76 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
77 a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
78 zdemonizowana.
79
80 %package sendmail
81 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
82 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
83 Group:          Applications/Mail
84 Requires:       sendmail
85 Requires:       %{name}
86
87 %description sendmail
88 AMaViS is a script that interfaces a mail transport agent (MTA) with
89 one or more virus scanners. This is daemonized version of amavis.
90
91 This package contains backend for sendmail.
92
93 %description sendmail -l pl
94 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
95 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
96
97 Pakiet ten zawiera back-end dla sendmaila.
98
99 %prep
100 %setup -q
101 %patch0 -p1
102 #%%patch1 -p1
103 %patch3 -p1
104
105 %build
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd,%{_sysconfdir}/rc.d/init.d,%{_sbindir}}
110
111 install amavisd $RPM_BUILD_ROOT%{_sbindir}
112 install amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}
113 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/amavisd
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %pre
119 if [ -n "`getgid amavis`" ]; then
120         if [ "`getgid amavis`" != "116" ]; then
121                 echo "Error: group amavis doesn't have gid=116. Correct this before installing amavisd-new." 1>&2
122                 exit 1
123         fi
124 else
125         echo "adding group amavis GID=116."
126         /usr/sbin/groupadd -g 116 -r -f amavis
127 fi
128
129 if [ -n "`id -u amavis 2>/dev/null`" ]; then
130         if [ "`id -u amavis`" != "97" ]; then
131                 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
132                 exit 1
133         fi
134 else
135         /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
136 fi
137
138 %postun
139 if [ "$1" = "0" ]; then
140         /usr/sbin/userdel amavis
141         echo "Removing group amavis."
142         /usr/sbin/groupdel amavis
143 fi
144
145 %post
146 /sbin/chkconfig --add amavisd
147 if [ -f /var/lock/subsys/amavisd ]; then
148         /etc/rc.d/init.d/amavisd restart >&2
149 else
150         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
151 fi
152
153 %preun
154 if [ "$1" = "0" ];then
155         if [ -f /var/lock/subsys/amavisd ]; then
156                 /etc/rc.d/init.d/amavisd stop >&2
157         fi
158         /sbin/chkconfig --del amavisd
159 fi
160
161 %files
162 %defattr(644,root,root,755)
163 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
164 %attr(755,root,root) %{_sbindir}/amavisd*
165 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
166 %config(noreplace) %{_sysconfdir}/amavisd.conf
167 %attr(750,amavis,amavis) %{_var}/spool/amavis
168 %attr(755,amavis,root) %{_var}/run/amavisd
169
170 #%files sendmail
171 #%attr(755,root,root) %{_sbindir}/amavis
172 #%attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.034322 seconds and 3 git commands to generate.