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