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