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