]>
Commit | Line | Data |
---|---|---|
1 | %define orig_name exim | |
2 | Summary: Lite version of exim Mail Transfer Agent | |
3 | Summary(pl.UTF-8): Lekka wersja Agenta Transferu Poczty | |
4 | Name: exim-lite | |
5 | Version: 4.51 | |
6 | Release: 3 | |
7 | Epoch: 2 | |
8 | License: GPL | |
9 | Group: Networking/Daemons | |
10 | Source0: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{orig_name}-%{version}.tar.bz2 | |
11 | # Source0-md5: 36c0c005e012d13beb7edfd8d124c049 | |
12 | Source1: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{orig_name}-texinfo-4.50.tar.bz2 | |
13 | # Source1-md5: a12993436e9943083e3ce5b76cf96b11 | |
14 | Source2: %{orig_name}.init | |
15 | Source3: %{orig_name}.cron.db | |
16 | Source4: %{orig_name}4.conf | |
17 | Source5: analyse-log-errors | |
18 | Source6: %{orig_name}on.desktop | |
19 | # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/ | |
20 | Source7: %{orig_name}4-man-021016.tar.bz2 | |
21 | # Source7-md5: b552704ebf853a401946038a2b7e8e98 | |
22 | Source9: %{orig_name}.aliases | |
23 | Source10: newaliases | |
24 | Source11: %{orig_name}.logrotate | |
25 | Source12: %{orig_name}.sysconfig | |
26 | Source13: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2 | |
27 | # Source13-md5: ff781bd31fb1d574c8b9d33f4bfd34a7 | |
28 | Source14: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2 | |
29 | # Source14-md5: 4b93321938a800caa6127c48ad60a42b | |
30 | Source15: %{orig_name}4-smtp.pamd | |
31 | Source16: %{orig_name}on.png | |
32 | Patch0: %{orig_name}4-EDITME.patch | |
33 | Patch1: %{orig_name}4-monitor-EDITME.patch | |
34 | Patch2: %{orig_name}4-texinfo.patch | |
35 | Patch3: %{orig_name}4-use_system_pcre.patch | |
36 | Patch4: %{orig_name}4-Makefile-Default.patch | |
37 | Patch5: %{orig_name}4-exiscan-pld.patch | |
38 | URL: http://www.exim.org/ | |
39 | BuildRequires: XFree86-devel | |
40 | BuildRequires: db-devel | |
41 | BuildRequires: openssl-devel >= 0.9.7d | |
42 | BuildRequires: pam-devel | |
43 | BuildRequires: pcre-devel | |
44 | BuildRequires: perl-devel >= 1:5.6.0 | |
45 | BuildRequires: readline-devel | |
46 | BuildRequires: rpmbuild(macros) >= 1.202 | |
47 | BuildRequires: texinfo | |
48 | Requires(post): /bin/hostname | |
49 | Requires(post): fileutils | |
50 | Requires(post,preun): /sbin/chkconfig | |
51 | Requires(postun): /usr/sbin/groupdel | |
52 | Requires(postun): /usr/sbin/userdel | |
53 | Requires(pre): /bin/id | |
54 | Requires(pre): /usr/bin/getgid | |
55 | Requires(pre): /usr/sbin/groupadd | |
56 | Requires(pre): /usr/sbin/useradd | |
57 | Requires: pam >= 0.77.3 | |
58 | Requires: rc-scripts | |
59 | Provides: exim | |
60 | Provides: group(exim) | |
61 | Provides: smtpdaemon | |
62 | Provides: user(exim) | |
63 | Conflicts: logrotate < 3.8.0 | |
64 | Obsoletes: courier | |
65 | Obsoletes: exim | |
66 | Obsoletes: masqmail | |
67 | Obsoletes: nullmailer | |
68 | Obsoletes: omta | |
69 | Obsoletes: postfix | |
70 | Obsoletes: qmail | |
71 | Obsoletes: qmail-client | |
72 | Obsoletes: sendmail | |
73 | Obsoletes: sendmail-cf | |
74 | Obsoletes: sendmail-doc | |
75 | Obsoletes: smail | |
76 | Obsoletes: smtpdaemon | |
77 | Obsoletes: ssmtp | |
78 | Obsoletes: zmailer | |
79 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
80 | ||
81 | %description | |
82 | Smail like Mail Transfer Agent with single configuration file. | |
83 | Features: flexible retry algorithms, header & envelope rewriting, | |
84 | multiple deliveries down single connection or multiple deliveries in | |
85 | parallel, regular expressions in configuration parameters, file | |
86 | lookups, supports sender and/or reciever verification, selective | |
87 | relaying, supports virtual domains, built-in mail filtering and can be | |
88 | configured to drop root privilleges when possible. | |
89 | ||
90 | %description -l pl.UTF-8 | |
91 | Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym. | |
92 | Jego zalety: świetne algorytmy, możliwość przepisywania nagłówków & | |
93 | koperty, wielokrotne dostarczanie poczty podczas jednego połączenia | |
94 | lub równoległe dostarczanie poczty, wyrażenia regularne w parametrach | |
95 | konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne | |
96 | relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów, | |
97 | możliwość odrzucania praw roota kiedy jest to możliwe. | |
98 | ||
99 | %package X11 | |
100 | Summary: X11 based Exim administration tool | |
101 | Summary(pl.UTF-8): Narzędzia administracyjne exima dla X11 | |
102 | Summary(pt_BR.UTF-8): Monitor X11 para o exim | |
103 | Group: X11/Applications | |
104 | ||
105 | %description X11 | |
106 | X11 based monitor & administration utility for the Exim Mail Transfer | |
107 | Agent. | |
108 | ||
109 | %description X11 -l pl.UTF-8 | |
110 | Bazujące na X11 narzędzia dla Exima - monitor i program | |
111 | administracyjny. | |
112 | ||
113 | %prep | |
114 | %setup -n %{orig_name}-%{version} -q -a1 -a7 | |
115 | %patch0 -p1 | |
116 | %patch1 -p1 | |
117 | %patch2 -p0 | |
118 | %patch3 -p1 | |
119 | %patch4 -p1 | |
120 | %patch5 -p0 | |
121 | ||
122 | install %{SOURCE13} doc/FAQ.txt.bz2 | |
123 | install %{SOURCE14} doc/config.samples.tar.bz2 | |
124 | ||
125 | install -d Local | |
126 | cp -f src/EDITME Local/Makefile | |
127 | cp -f exim_monitor/EDITME Local/eximon.conf | |
128 | ||
129 | %build | |
130 | ||
131 | %{__make} -j1 \ | |
132 | CC="%{__cc}" \ | |
133 | CFLAGS="%{rpmcflags}" \ | |
134 | LOOKUP_CDB=yes \ | |
135 | XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \ | |
136 | X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \ | |
137 | LOOKUP_LIBS="" \ | |
138 | LOOKUP_INCLUDE="" | |
139 | ||
140 | makeinfo --force exim-texinfo-*/doc/*.texinfo | |
141 | ||
142 | %install | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail | |
145 | install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d} | |
146 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib} | |
147 | install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archive,}/exim,mail} | |
148 | install -d $RPM_BUILD_ROOT{%{_infodir},%{_desktopdir},%{_pixmapsdir}} | |
149 | ||
150 | install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \ | |
151 | build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \ | |
152 | build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \ | |
153 | util/unknownuser.sh \ | |
154 | $RPM_BUILD_ROOT%{_bindir} | |
155 | install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir} | |
156 | install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir} | |
157 | ||
158 | install %{SOURCE5} . | |
159 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly | |
160 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{orig_name} | |
161 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{orig_name} | |
162 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{orig_name} | |
163 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf | |
164 | install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
165 | install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases | |
166 | install *.info* $RPM_BUILD_ROOT%{_infodir} | |
167 | install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp | |
168 | ||
169 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail | |
170 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail | |
171 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq | |
172 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp | |
173 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail | |
174 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq | |
175 | ||
176 | install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir} | |
177 | install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir} | |
178 | ||
179 | touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log | |
180 | ||
181 | %clean | |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
184 | %pre | |
185 | %groupadd -g 79 exim | |
186 | %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim | |
187 | ||
188 | %post | |
189 | umask 022 | |
190 | /sbin/chkconfig --add %{orig_name} | |
191 | if [ -f /var/lock/subsys/exim ]; then | |
192 | /etc/rc.d/init.d/%{orig_name} restart >&2 | |
193 | else | |
194 | echo "Run \"/etc/rc.d/init.d/%{orig_name} start\" to start exim daemon." | |
195 | fi | |
196 | ||
197 | if [ ! -f /etc/mail/mailname ]; then | |
198 | rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname | |
199 | chmod 644 /etc/mail/mailname | |
200 | fi | |
201 | newaliases | |
202 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
203 | ||
204 | %preun | |
205 | if [ "$1" = "0" ]; then | |
206 | if [ -f /var/lock/subsys/exim ]; then | |
207 | /etc/rc.d/init.d/exim stop >&2 | |
208 | fi | |
209 | /sbin/chkconfig --del %{orig_name} | |
210 | fi | |
211 | ||
212 | %postun | |
213 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
214 | if [ "$1" = "0" ]; then | |
215 | %userremove exim | |
216 | %groupremove exim | |
217 | fi | |
218 | ||
219 | %triggerpostun -- exim < 3.90 | |
220 | if [ -f /etc/mail/exim.conf ]; then | |
221 | umask 022 | |
222 | mv /etc/mail/exim.conf /etc/mail/exim.conf.3 | |
223 | /usr/bin/convert4r4 < /etc/mail/exim.conf.3 > /etc/mail/exim.conf | |
224 | fi | |
225 | ||
226 | %files | |
227 | %defattr(644,root,root,755) | |
228 | %doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt%{?with_exiscan:,exiscan-*.txt}} build-Linux-*/transport-filter.pl | |
229 | %dir %{_sysconfdir}/mail | |
230 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf | |
231 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases | |
232 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim | |
233 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim | |
234 | %attr(754,root,root) /etc/rc.d/init.d/exim | |
235 | %attr(4755,root,root) %{_bindir}/exim | |
236 | %attr(770,root,exim) %dir %{_var}/spool/exim | |
237 | %attr(750,exim,exim) %dir %{_var}/spool/exim/db | |
238 | %attr(700,exim,root) %dir %{_var}/spool/exim/input | |
239 | %attr(750,exim,root) %dir %{_var}/spool/exim/msglog | |
240 | %attr(755,root,root) %{_bindir}/exim_* | |
241 | %attr(755,root,root) %{_bindir}/exinext | |
242 | %attr(755,root,root) %{_bindir}/exiwhat | |
243 | %attr(755,root,root) %{_bindir}/exicyclog | |
244 | %attr(755,root,root) %{_bindir}/exigrep | |
245 | %attr(755,root,root) %{_bindir}/eximstats | |
246 | %attr(755,root,root) %{_bindir}/exiqsumm | |
247 | %attr(755,root,root) %{_bindir}/unknownuser.sh | |
248 | %attr(755,root,root) %{_bindir}/newaliases | |
249 | %attr(755,root,root) %{_bindir}/convert4r4 | |
250 | %attr(755,root,root) %{_sbindir}/mailq | |
251 | %attr(755,root,root) %{_sbindir}/rmail | |
252 | %attr(755,root,root) %{_sbindir}/rsmtp | |
253 | %attr(755,root,root) %{_sbindir}/runq | |
254 | %attr(755,root,root) %{_sbindir}/sendmail | |
255 | %attr(755,root,root) /usr/lib/sendmail | |
256 | %attr(754,root,root) /etc/cron.weekly/exim.cron.db | |
257 | %attr(750,exim,root) %dir %{_var}/log/exim | |
258 | %attr(750,exim,root) %dir %{_var}/log/archive/exim | |
259 | %attr(640,exim,root) %ghost %{_var}/log/exim/* | |
260 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp | |
261 | %{_infodir}/*.info* | |
262 | %{_mandir}/man8/* | |
263 | ||
264 | %files X11 | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %{_bindir}/eximon | |
267 | %attr(755,root,root) %{_bindir}/eximon.bin | |
268 | %{_desktopdir}/eximon.desktop | |
269 | %{_pixmapsdir}/eximon.png |