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