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