]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
5fa3fb87f10b875e791cf5b65ca14101763de253
[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:        5
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-daemon
64 Obsoletes:      amavisd-postfix
65 Obsoletes:      amavisd-exim
66 Obsoletes:      amavisd-qmail
67 Obsoletes:      amavisd-new-postfix
68 Obsoletes:      amavisd-new-exim
69 Obsoletes:      amavisd-new-qmail
70
71 %description
72 AMaViS is a script that interfaces a mail transport agent (MTA) with
73 one or more virus scanners and SpamAssasin. This is daemonized version
74 of amavis.
75
76 %description -l pl
77 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
78 a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
79 zdemonizowana.
80
81 %package sendmail
82 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
83 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
84 Group:          Applications/Mail
85 Requires:       sendmail
86 Requires:       %{name}
87
88 %description sendmail
89 AMaViS is a script that interfaces a mail transport agent (MTA) with
90 one or more virus scanners. This is daemonized version of amavis.
91
92 This package contains backend for sendmail.
93
94 %description sendmail -l pl
95 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
96 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
97
98 Pakiet ten zawiera back-end dla sendmaila.
99
100 %prep
101 %setup -q
102 %patch0 -p1
103 #%%patch1 -p1
104 %patch3 -p1
105
106 %build
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd,%{_sysconfdir}/rc.d/init.d,%{_sbindir}}
111
112 install amavisd $RPM_BUILD_ROOT%{_sbindir}
113 install amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}
114 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/amavisd
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %pre
120 if [ -n "`getgid amavis`" ]; then
121         if [ "`getgid amavis`" != "116" ]; then
122                 echo "Error: group amavis doesn't have gid=116. Correct this before installing amavisd-new." 1>&2
123                 exit 1
124         fi
125 else
126         echo "adding group amavis GID=116."
127         /usr/sbin/groupadd -g 116 -r -f amavis
128 fi
129
130 if [ -n "`id -u amavis 2>/dev/null`" ]; then
131         if [ "`id -u amavis`" != "97" ]; then
132                 echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
133                 exit 1
134         fi
135 else
136         /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
137 fi
138
139 %postun
140 if [ "$1" = "0" ]; then
141         /usr/sbin/userdel amavis
142         echo "Removing group amavis."
143         /usr/sbin/groupdel amavis
144 fi
145
146 %post
147 /sbin/chkconfig --add amavisd
148 if [ -f /var/lock/subsys/amavisd ]; then
149         /etc/rc.d/init.d/amavisd restart >&2
150 else
151         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
152 fi
153
154 %preun
155 if [ "$1" = "0" ];then
156         if [ -f /var/lock/subsys/amavisd ]; then
157                 /etc/rc.d/init.d/amavisd stop >&2
158         fi
159         /sbin/chkconfig --del amavisd
160 fi
161
162 %files
163 %defattr(644,root,root,755)
164 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
165 %attr(755,root,root) %{_sbindir}/amavisd*
166 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
167 %config(noreplace) %{_sysconfdir}/amavisd.conf
168 %attr(750,amavis,amavis) %{_var}/spool/amavis
169 %attr(755,amavis,root) %{_var}/run/amavisd
170
171 #%files sendmail
172 #%attr(755,root,root) %{_sbindir}/amavis
173 #%attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.059551 seconds and 3 git commands to generate.