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