]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail.spec
- Spelling correction
[packages/sendmail.git] / sendmail.spec
1 Summary:        A widely used Mail Transport Agent (MTA)
2 Summary(pl):    Sendmail -- aplikacja do obs³ugi poczty elektronicznej
3 Name:           sendmail
4 Version:        8.10.1
5 Release:        5
6 License:        BSD
7 Group:          Networking/Daemons
8 Group(pl):      Sieciowe/Serwery
9 Provides:       smtpdaemon
10 Source0:        ftp://ftp.cs.berkeley.edu/ucb/sendmail/%{name}.%{version}.tar.gz
11 Source1:        sendmail.init
12 Source2:        http://www.informatik.uni-kiel.de/%7Eca/email/rules/check.tar
13 Source3:        aliases
14 Source4:        sendmail.sysconfig
15 Source5:        sendmail-8.9.3-etc-mail-Makefile
16 Source6:        sendmail.mc
17 Source7:        sendmail-config.m4
18 Patch0:         sendmail-8.10.0-redhat.patch
19 Patch1:         sendmail-8.10.0-makemapman.patch
20 Patch2:         sendmail-8.10.0-smrsh-paths.patch
21 Patch3:         sendmail-8.8.7-rmail.patch
22 Buildrequires:  cyrus-sasl-devel
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Prereq:         /sbin/chkconfig
25 Provides:       smtpdaemon
26 Obsoletes:      smtpdaemon
27 Obsoletes:      zmail
28 Obsoletes:      qmail
29 Obsoletes:      smail
30 Obsoletes:      sendmail-cf
31
32 %description
33 The Sendmail program is a very widely used Mail Transport Agent (MTA).
34 MTAs send mail from one machine to another. Sendmail is not a client
35 program, which you use to read your e-mail. Sendmail is a
36 behind-the-scenes program which actually moves your e-mail over
37 networks or the Internet to where you want it to go.
38
39 If you need documentation on Sendmail, you can install the sendmail-doc
40 package.
41
42 %description -l pl
43 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
44 miêdzy komputerami w sieci internet. Zajmuje siê przekazywaniem poczty
45 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
46 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
47 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
48 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
49 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
50
51 dokumentacja do programu sendmail znajduje siê w pakiecie sendmail-doc.
52
53 %package doc
54 Summary:        Documentation about the Sendmail Mail Transport Agent program
55 Summary(pl):    Dokumentacja do Sendmaila
56 Group:          Documentation
57 Group(pl):      Dokumentacja
58 Requires:       %{name} = %{version}
59
60 %description doc
61 The sendmail-doc package contains documentation about the Sendmail
62 Mail Transport Agent (MTA) program, including release notes, the
63 Sendmail FAQ and a few papers written about Sendmail. The papers are
64 provided in PostScript(TM) and troff formats.
65
66 Install the sendmail-doc package if you need documentation about
67 Sendmail.
68
69 %description -l pl
70 Ten pakiet zawiera dokumentacjê do programu Sendmail Mail Transport
71 Agent (MTA). Dokumentacja zwawiera informacje o zmianach w bie¿±cej
72 wersji i FAQ - najczêsciej zadawane pytania. Dokumentacja dostêpna jest
73 w formacie PostScript(TM) oraz troff. Je¿eli potrzebujesz dokumentacji
74 - zainstaluj ten pakiet.
75
76 %prep
77 %setup -q
78 %patch0 -p1
79 %patch1 -p1
80 %patch2 -p1
81 %patch3 -p1
82
83 # XXX REVERTING
84 #tar xf $RPM_SOURCE_DIR/check.tar -C cf
85 #chown root.root cf/hack/* cf/README.check
86
87 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
88
89 install %{SOURCE7} config.m4
90
91 %build
92 export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_VENDOR_CF_PATH=1"
93
94 cd sendmail
95 sh Build -f ../config.m4
96 cd ..
97
98 cd mailstats
99 sh Build -f ../config.m4
100 cd ..
101
102 cd rmail
103 sh Build -f ../config.m4
104 cd ..
105
106 cd makemap
107 sh Build -f ../config.m4
108 cd ..
109
110 cd praliases
111 sh Build -f ../config.m4
112 cd ..
113
114 cd smrsh
115 sh Build -f ../config.m4
116 cd ..
117
118 cd cf/cf
119 m4 redhat.mc > redhat.cf
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT
124
125 cd $RPM_BUILD_ROOT
126 install -d etc/rc.d/init.d etc/rc.d/rc{0,1,2,3,4,5,6}.d etc/sysconfig
127 install -d usr/bin usr/lib usr/man/man{1,5,8} usr/sbin var/log var/spool usr/lib/sendmail-cf
128 cd -
129
130 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
131
132 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
133  install -C $OBJDIR/sendmail
134 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
135  install -C $OBJDIR/mailstats
136 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
137  install -C $OBJDIR/praliases
138 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
139  force-install -C $OBJDIR/rmail
140 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
141  install -C $OBJDIR/makemap
142 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
143 %{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
144  install -C $OBJDIR/smrsh
145
146 # install docs by hand
147 install -d $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
148 cp -ar FAQ LICENSE KNOWNBUGS README RELEASE_NOTES doc $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
149 cp smrsh/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.smrsh
150 cp cf/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.cf
151
152 # install the cf files
153 cd cf
154 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
155 cd -
156
157 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
158
159
160 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
161 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/mail/sendmail.mc
162 echo "# local-host-names - include all aliases for your machine here." > $RPM_BUILD_ROOT%{_sysconfdir}/mail/local-host-names
163
164 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
165 install -d -m755 $RPM_BUILD_ROOT/var/spool/mqueue
166
167 # dangling symlinks
168 for f in hoststat mailq newaliases purgestat
169   do
170     ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
171   done
172 install -d $RPM_BUILD_ROOT%{_sysconfdir}/smrsh
173
174 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/mail/access
175 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
176 # of the format of this file. (search for access_db in that file)
177 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
178 # package.
179 #
180 # by default we allow relaying from localhost...
181 localhost.localdomain           RELAY
182 localhost                       RELAY
183 127.0.0.1                       RELAY
184
185 EOF
186 for map in virtusertable access domaintable mailertable
187   do
188 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
189 makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
190   done
191 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
192 makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
193
194 install %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/sendmail
195 install %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
196
197 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mail/Makefile
198
199 chmod u+w $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases}
200 chmod u+w $RPM_BUILD_ROOT%{_bindir}/rmail
201
202 strip $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases,sendmail}
203 strip $RPM_BUILD_ROOT%{_bindir}/rmail
204
205 %clean
206 rm -rf $RPM_BUILD_ROOT
207
208 %post
209 #
210 # Convert old format to new
211 #
212 if [ -f /etc/mail/deny ] ; then
213     cat /etc/mail/deny | \
214         awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
215                   {print $1" REJECT"}' >> /etc/mail/access
216     cp /etc/mail/deny /etc/mail/deny.rpmorig
217 fi
218 for oldfile in relay_allow ip_allow name_allow ; do
219     if [ -f /etc/mail/$oldfile ] ; then
220         cat /etc/mail/$oldfile | \
221                 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
222              { print $1\" RELAY\" }" >> /etc/mail/access
223         cp /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
224      fi
225 done
226
227 #
228 # Oops, these files moved
229 #
230 if [ -f /etc/sendmail.cw ] ; then
231     cat /etc/sendmail.cw  | \
232       awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
233            { print $1 }' >> /etc/mail/local-host-names
234     cp /etc/sendmail.cw /etc/sendmail.cw.rpmorig
235 fi
236 #
237 # Rebuild maps (next reboot will rebuild also)
238 #
239 { /usr/bin/newaliases
240   for map in virtusertable access domaintable mailertable
241   do
242     if [ -f /etc/mail/${map} ] ; then
243       /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
244       sleep 1
245     fi
246   done
247 } > /dev/null 2>&1
248
249 /sbin/chkconfig --add sendmail
250
251 %preun
252 if [ $1 = 0 ]; then
253         /sbin/chkconfig --del sendmail
254 fi
255
256 # removal of compatibility links
257 %triggerpostun -- sendmail < 8.10.1
258 /sbin/chkconfig --add sendmail
259
260 %files
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_sbindir}/mailstats
263 %attr(755,root,root) %{_sbindir}/praliases
264 %attr(755,root,root) %{_bindir}/hoststat
265 %attr(755,root,root) %{_bindir}/purgestat
266 %attr(755,root,root) %{_bindir}/rmail
267 %attr(755,root,root) %{_bindir}/makemap
268 %attr(755,root,root) %{_sbindir}/makemap
269 %attr(755,root,root) %{_sbindir}/sendmail
270 %attr(755,root,root) %{_bindir}/newaliases
271 %attr(755,root,root) %{_bindir}/mailq
272 %attr(755,root,root) %{_sbindir}/smrsh
273 %{_libdir}/sendmail
274 %{_libdir}/sendmail-cf
275
276 %{_mandir}/man8/rmail.8*
277 %{_mandir}/man8/praliases.8*
278 %{_mandir}/man8/mailstats.8*
279 %{_mandir}/man8/makemap.8*
280 %{_mandir}/man8/sendmail.8*
281 %{_mandir}/man5/aliases.5*
282 %{_mandir}/man1/newaliases.1*
283 %{_mandir}/man1/mailq.1*
284
285 /var/log/statistics
286 # XXX can't do noreplace here or new sendmail will not deliver.
287 %config %{_sysconfdir}/sendmail.cf
288 %attr(0644,root,root) %config %{_sysconfdir}/mail/sendmail.mc
289 %config(noreplace) %{_sysconfdir}/mail/local-host-names
290 %config(noreplace) %{_sysconfdir}/aliases
291 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
292 %attr(0755,root,mail) %dir      /var/spool/mqueue
293 %dir %{_sysconfdir}/smrsh
294 %dir %{_sysconfdir}/mail
295
296 %config %{_sysconfdir}/mail/Makefile
297 %ghost %{_sysconfdir}/mail/virtusertable.db
298 %config(noreplace) %{_sysconfdir}/mail/virtusertable
299
300 %ghost %{_sysconfdir}/mail/access.db
301 %config(noreplace) %{_sysconfdir}/mail/access
302
303 %ghost %{_sysconfdir}/mail/domaintable.db
304 %config(noreplace) %{_sysconfdir}/mail/domaintable
305
306 %ghost %{_sysconfdir}/mail/mailertable.db
307 %config(noreplace) %{_sysconfdir}/mail/mailertable
308 %config(noreplace) %{_sysconfdir}/mail/helpfile
309
310 %attr(754,root,root) /etc/rc.d/init.d/sendmail
311 %config(noreplace) /etc/sysconfig/sendmail
312
313 %files doc
314 %defattr(644,root,root,755)
315 %{_prefix}/doc/sendmail
This page took 0.069896 seconds and 4 git commands to generate.