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