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