]> git.pld-linux.org Git - packages/exim.git/blob - exim.spec
- BuildRequires: db3-devel.
[packages/exim.git] / exim.spec
1 Summary:        University of Cambridge Mail Transfer Agent 
2 Summary(pl):    Agent Transferu Poczty Uniwersytetu w Cambridge
3 Name:           exim
4 Version:        3.16
5 Release:        2
6 License:        GPL
7 Group:          Networking/Daemons
8 Group(de):      Netzwerkwesen/Server
9 Group(pl):      Sieciowe/Serwery
10 Source0:        ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-%{version}.tar.gz
11 Source1:        ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-texinfo-3.10.tar.gz
12 Source2:        %{name}.init
13 Source3:        %{name}.cron.db
14 Source4:        %{name}.8
15 Source5:        analyse-log-errors
16 Source6:        %{name}on.desktop
17 Source8:        Makefile-Linux
18 Source9:        %{name}.aliases
19 Source10:       %{name}.conf
20 Source11:       newaliases
21 Source12:       %{name}.logrotate
22 Source13:       %{name}.sysconfig
23 #Source14:      ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/FAQ.txt.gz
24 Source14:       %{name}-FAQ.txt.gz
25 #Source15:      ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/config.samples.tar.gz
26 Source15:       %{name}-config.samples.tar.gz
27 Patch0:         %{name}-EDITME.patch
28 Patch1:         %{name}-monitor-EDITME.patch
29 Patch2:         %{name}-texinfo.patch
30 Patch3:         %{name}-use_system_pcre.patch
31 URL:            http://www.exim.org/
32 BuildRequires:  openldap-devel
33 BuildRequires:  texinfo
34 BuildRequires:  perl
35 BuildRequires:  pam-devel
36 BuildRequires:  pcre-devel
37 BuildRequires:  db3-devel
38 Provides:       smtpdaemon
39 Prereq:         /usr/sbin/useradd
40 Prereq:         /usr/sbin/groupadd
41 Prereq:         /bin/awk
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Obsoletes:      smtpdaemon
44 Obsoletes:      sendmail
45 Obsoletes:      sendmail-cf
46 Obsoletes:      sendmail-doc
47 Obsoletes:      postfix
48 Obsoletes:      zmailer
49 Obsoletes:      smail
50 Obsoletes:      qmail
51
52 %description
53 Smail like Mail Transfer Agent with single configuration file.
54 Features: flexible retry algorithms, header & envelope rewriting,
55 multiple deliveries down single connection or multiple deliveries in
56 parallel, regular expressions in configuration parameters, file
57 lookups, supports sender and/or reciever verification, selective
58 relaying, supports virtual domains, built-in mail filtering and can be
59 configured to drop root privilleges when possible.
60
61 %description -l pl
62 Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym.
63 Jego zalety: ¶wietne algorytmy, mo¿liwo¶æ przepisywania nag³ówków &
64 koperty, wielokrotne dostarczanie poczty podczas jednego po³±czenia
65 lub równoleg³e dostarczanie poczty, wyra¿enia regularne w parametrach
66 konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne
67 relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów,
68 mo¿liwo¶æ odrzucania praw roota kiedy jest to mo¿liwe.
69
70 %package X11
71 Summary:        X Window based Exim administration tool
72 Summary(pl):    Narzêdzia administracyjne exima dla X Window
73 Group:          X11/Applications
74 Group(de):      X11/Applikationen
75 Group(pl):      X11/Aplikacje
76 Requires:       applnk
77
78 %description X11
79 X Window based monitor & administration utility for the Exim Mail
80 Transfer Agent.
81
82 %description -l pl X11
83 Bazuj±ce na X Window narzêdzia dla Exima - monitor i program
84 administracyjny.
85
86 %prep
87 #%set_MAIL qwe
88 #exit 1
89
90 %setup -q -T -b 0
91 %setup -q -T -D -a 1
92 %patch0 -p1
93 %patch1 -p1
94 %patch2 -p0
95 %patch3 -p1
96
97 install %{SOURCE14} doc/FAQ.txt.gz
98 install %{SOURCE15} doc/config.samples.tar.gz
99
100 install -d Local
101 cp src/EDITME Local/Makefile
102 cp exim_monitor/EDITME Local/eximon.conf
103
104 %build
105 %{__make} CFLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O -g}"
106
107 makeinfo exim-texinfo-*/doc/{oview,spec,filter}.texinfo
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,mail} \
112         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_libdir}} \
113         $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail} \
114         $RPM_BUILD_ROOT{%{_infodir},/usr/X11R6/bin,%{_applnkdir}/System}
115
116 install build-Linux-pld/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
117         build-Linux-pld/exinext \
118         build-Linux-pld/exi{cyclog,next,what} %{SOURCE11} \
119         util/{exigrep,eximstats,exiqsumm,exiqsumm,unknownuser.sh,unknownuser.sh} \
120         $RPM_BUILD_ROOT%{_bindir}
121 install build-Linux-pld/eximon.bin $RPM_BUILD_ROOT/usr/X11R6/bin
122 install build-Linux-pld/eximon $RPM_BUILD_ROOT/usr/X11R6/bin
123
124 install %{SOURCE5} .
125 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/
126 install %{SOURCE13} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
127 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
128 install %{SOURCE12} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
129 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mail/
130 install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/
131 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
132 install *.info* $RPM_BUILD_ROOT%{_infodir}/
133
134 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
135 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_libdir}/sendmail
136 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
137 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
138 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
139 ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
140
141 install %{SOURCE6} $RPM_BUILD_ROOT%{_applnkdir}/System
142
143 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
144
145 gzip -9nf README* NOTICE LICENCE analyse-log-errors \
146         doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,oview.txt,spec.txt}
147
148 %pre
149 /usr/sbin/groupadd -g 79 -r -f exim
150 if [ -n "`id -u exim 2>/dev/null`" ]; then
151         if [ "`id -u exim`" != "79" ]; then
152                 echo "Warning: user exim doesn't have uid=79. Corect this before installing Exim" 1>&2
153                 exit 1
154         fi
155 else
156         /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
157         if [ -f /var/db/passwd.db ]; then
158                 /usr/bin/update-db 1>&2
159         fi
160 fi
161 %post
162 umask 022
163 /sbin/chkconfig --add %{name}
164 if [ -r /var/run/exim*.pid ]; then
165         /etc/rc.d/init.d/%{name} restart >&2
166 else
167         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon."
168 fi
169
170 if [ ! -f /etc/mail/mailname ]; then
171         rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
172         chmod 644 /etc/mail/mailname
173 fi
174 newaliases
175 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
176
177 # Add/modify MAIL variable via pam_env.
178 mv -f %{_sysconfdir}/security/pam_env.conf{,.tmp}
179 awk '$1 != "MAIL" { print $0; }; END { print "MAIL\t\tDEFAULT=${HOME}/Mail/Mailbox"; }' \
180         < %{_sysconfdir}/security/pam_env.conf.tmp \
181         > %{_sysconfdir}/security/pam_env.conf
182 rm -f %{_sysconfdir}/security/pam_env.conf.tmp
183
184 %preun
185 if [ "$1" = "0" ]; then
186         /sbin/chkconfig --del %{name}
187         /etc/rc.d/init.d/%{name} stop >&2
188 fi
189
190 %postun
191 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
192 if [ "$1" = "0" ]; then
193         /usr/sbin/userdel exim
194         /usr/sbin/groupdel exim
195         
196         mv -f %{_sysconfdir}/security/pam_env.conf{,.tmp}
197         awk '$1 != "MAIL" { print $0; }' \
198                 < %{_sysconfdir}/security/pam_env.conf.tmp \
199                 > %{_sysconfdir}/security/pam_env.conf
200         rm -f %{_sysconfdir}/security/pam_env.conf.tmp
201 fi
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %files
207 %defattr(644,root,root,755)
208 %doc *.gz doc/*.gz
209 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/exim.conf
210 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
211 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/exim
212 %attr( 644,root,root) /etc/logrotate.d/exim
213 %attr( 754,root,root) /etc/rc.d/init.d/exim
214 %attr(4755,root,root) %{_bindir}/exim
215 %attr( 775,root,mail) %dir %{_var}/mail
216 %attr( 700,exim,root) %dir %{_var}/spool/exim
217 %attr( 750,exim,exim) %dir %{_var}/spool/exim/db
218 %attr( 700,exim,root) %dir %{_var}/spool/exim/input
219 %attr( 750,exim,root) %dir %{_var}/spool/exim/msglog
220 %attr( 755,root,root) %{_bindir}/exim_*
221 %attr( 755,root,root) %{_bindir}/exinext
222 %attr( 755,root,root) %{_bindir}/exiwhat
223 %attr( 755,root,root) %{_bindir}/exicyclog
224 %attr( 755,root,root) %{_bindir}/exigrep
225 %attr( 755,root,root) %{_bindir}/eximstats
226 %attr( 755,root,root) %{_bindir}/exiqsumm
227 %attr( 755,root,root) %{_bindir}/unknownuser.sh
228 %attr( 755,root,root) %{_bindir}/transport-filter.pl
229 %attr( 755,root,root) %{_bindir}/newaliases
230 %attr( 755,root,root) %{_sbindir}/*
231 %attr( 755,root,root) %{_libdir}/*
232 %attr( 754,root,root) /etc/cron.daily/exim.cron.db
233 %attr( 750,exim,root) %dir %{_var}/log/exim
234 %attr( 750,exim,root) %dir %{_var}/log/archiv/exim
235 %attr( 640,exim,root) %ghost %{_var}/log/exim/*
236 %{_infodir}/*
237 %{_mandir}/man8/*
238
239 %files X11
240 %defattr(644,root,root,755)
241 %attr(755,root,root) /usr/X11R6/bin/*
242 %{_applnkdir}/System/*
This page took 1.701942 seconds and 4 git commands to generate.