]> git.pld-linux.org Git - packages/postfix.git/blob - postfix.spec
remove Requires: procmail (now we do not use it in default config)
[packages/postfix.git] / postfix.spec
1 #
2 # Conditional build:
3 # --without sasl - build wihtout SMTP AUTH support
4 # --without ssl  - build without SSL/TLS support
5 # --without ipv6 - build without IPv6 support
6 #
7 %define tls_ver 0.8.5-1.1.5-0.9.6c
8 Summary:        Postfix Mail Transport Agent
9 Summary(cs):    Postfix - program pro pøepravu po¹ty (MTA)
10 Summary(fr):    Agent de transport de courrier Postfix
11 Summary(pl):    Serwer SMTP Postfix
12 Summary(sk):    Agent prenosu po¹ty Postfix
13 Name:           postfix
14 Version:        1.1.5
15 Release:        0.1
16 Epoch:          2
17 Group:          Networking/Daemons
18 License:        distributable
19 Source0:        ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
20 Source1:        %{name}.aliases
21 Source2:        %{name}.cron
22 Source3:        %{name}.init
23 Source5:        %{name}.sysconfig
24 Source6:        ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
25 Source7:        %{name}.sasl
26 Patch0:         %{name}-config.patch
27 Patch1:         %{name}-pl.patch
28 Patch2:         %{name}-conf_msg.patch
29 Patch3:         %{name}-ipv6.patch
30 Patch4:         %{name}-dynamicmaps.patch
31 Patch5:         %{name}-pgsql.patch
32 URL:            http://www.postfix.org/
33 BuildRequires:  awk
34 %{!?_without_sasl:BuildRequires:        cyrus-sasl-devel}
35 BuildRequires:  db3-devel
36 BuildRequires:  grep
37 %{!?_without_ipv6:BuildRequires:        libinet6 >= 0.20010420-3}
38 BuildRequires:  mysql-devel
39 BuildRequires:  openldap-devel >= 2.0.0
40 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
41 BuildRequires:  pcre-devel
42 BuildRequires:  postgresql-devel
43 PreReq:         rc-scripts
44 PreReq:         sed
45 Requires(pre):  /usr/sbin/useradd
46 Requires(pre):  /usr/sbin/groupadd
47 Requires(pre):  /usr/bin/getgid
48 Requires(pre):  /bin/id
49 Requires(post): /bin/hostname
50 Requires(post,postun):/sbin/ldconfig
51 Requires(post,preun):/sbin/chkconfig
52 Requires(postun):       /usr/sbin/userdel
53 Requires(postun):       /usr/sbin/groupdel
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Provides:       smtpdaemon
56 Obsoletes:      smtpdaemon
57 Obsoletes:      exim
58 Obsoletes:      masqmail
59 Obsoletes:      omta
60 Obsoletes:      qmail
61 Obsoletes:      sendmail
62 Obsoletes:      sendmail-cf
63 Obsoletes:      sendmail-doc
64 Obsoletes:      smail
65 Obsoletes:      zmailer
66 Requires:       diffutils
67 Requires:       findutils
68
69 %description
70 Postfix is attempt to provide an alternative to the widely-used
71 Sendmail program. Postfix attempts to be fast, easy to administer, and
72 hopefully secure, while at the same time being sendmail compatible
73 enough to not upset your users. This version has IPv6 support.
74
75 %description -l fr
76 Postfix (voir http://www.postfix.org/) se veut une alternative à
77 sendmail, responsable de l'acheminement de 70% des courriers
78 électroniques sur Internet. IBM en a suppotré le développement, mais
79 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
80 plus grand nombre de systèmes possible. Dans cette optique, il a été
81 écrit pour être totalement sous le contrôle de l'utilisateur.
82
83 %description -l it
84 Postfix (http://www.postfix.org/) e' un'alternativa al programma
85 sendmail utilizzato per la gestione del 70 per cento della posta
86 Internet.
87
88 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
89 evoluzione.
90
91 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
92 quale troverete le indicazioni per una corretta installazione e
93 configurazione di questo programma.
94
95 %description -l pl
96 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
97 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
98 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
99 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera
100 IPv6.
101
102 %description -l sk
103 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
104 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
105 elektronickej po¹ty doruèenej na Internete.
106
107 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
108 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
109 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
110 mô¾e vyvíja» podµa jeho pou¾ívateµov.
111
112 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
113 popísané kroky potrebné pred a po in¹talácii Postfixu.
114
115 %package devel
116 Summary:        Postfix loadable modules development package
117 Summary(pl):    Pakiet dla programistów ³adowanych modu³ów do postfiksa
118 Group:          Development/Libraries
119 Requires:       %{name} = %{version}
120
121 %description devel
122 Header files to build additional map types for Postfix.
123
124 %description devel -l pl
125 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
126
127 %package dict-ldap
128 Summary:        LDAP map support for Postfix
129 Summary(pl):    Obs³uga map LDAP dla Postfiksa
130 Group:          Networking/Daemons
131 Requires:       %{name} = %{version}
132 Requires:       openldap >= 2.0.0
133
134 %description dict-ldap
135 This package provides support for LDAP maps in Postfix.
136
137 %description dict-ldap -l pl
138 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
139
140 %package dict-mysql
141 Summary:        MySQL map support for Postfix
142 Summary(pl):    Obs³uga map MySQL dla Postfiksa
143 Group:          Networking/Daemons
144 Requires:       %{name} = %{version}
145
146 %description dict-mysql
147 This package provides support for MySQL maps in Postfix.
148
149 %description dict-mysql -l pl
150 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
151
152 %package dict-pcre
153 Summary:        PCRE map support for Postfix
154 Summary(pl):    Obs³uga map PCRE dla Postfiksa
155 Group:          Networking/Daemons
156 Requires:       %{name} = %{version}
157
158 %description dict-pcre
159 This package provides support for PCRE maps in Postfix.
160
161 %description dict-pcre -l pl
162 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
163
164 %package dict-pgsql
165 Summary:        PostgreSQL map support for Postfix
166 Summary(pl):    Obs³uga map PostgreSQL dla Postfiksa
167 Group:          Networking/Daemons
168 Requires:       %{name} = %{version}
169
170 %description dict-pgsql
171 This package provides support for PostgreSQL maps in Postfix.
172
173 %description dict-pgsql -l pl
174 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
175
176 %prep
177 %setup -q -a6
178 %patch0 -p1
179 %patch1 -p1
180 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
181 %patch2 -p1
182 %{!?_without_ipv6:%patch3 -p1 }
183 %patch4 -p1
184 %patch5 -p1
185
186 %build
187 %{__make} -f Makefile.init makefiles
188 %{__make} tidy
189 %{__make} DEBUG="" OPT="%{rpmcflags}" \
190         CCARGS="-DHAS_LDAP -DHAS_PCRE %{!?_without_sasl:-DUSE_SASL_AUTH} -DHAS_MYSQL -DHAS_PGSQL -I/usr/include/mysql -I/usr/include/postgresql %{!?_without_ssl:-DHAS_SSL -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS" \
191         AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto}"
192
193 %install
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
196         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
197         $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
198         pfixtls
199
200 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
201
202 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
203
204 install bin/* $RPM_BUILD_ROOT%{_sbindir}
205 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
206 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
207
208 for f in dns global master util ; do
209         install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
210         ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
211 done
212 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
213 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
214
215 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
216
217 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
218 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
219 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
220 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
221 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
222 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
223
224 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
225 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
226 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
227
228 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
229         {aliases,access,canonical,relocated,transport,virtual}{,.db}
230
231 gzip -9nf *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES \
232         README_FILES/*README
233
234 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
235
236 %clean
237 rm -rf $RPM_BUILD_ROOT
238
239 %pre
240 if [ -n "`/usr/bin/getgid postfix`" ]; then
241         if [ "`getgid postfix`" != "62" ]; then
242                 echo "Warning: group postfix haven't gid=62. Correct this before installing postfix" 1>&2
243                 exit 1
244         fi
245 else
246         /usr/sbin/groupadd -g 62 -r -f postfix
247 fi
248 if [ -n "`/usr/bin/getgid maildrop`" ]; then
249         if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
250                 echo "Warning: group maildrop haven't gid=63. Correct this before installing postfix" 1>&2
251                 exit 1
252         fi
253 else
254         /usr/sbin/groupadd -g 63 -r -f maildrop
255 fi
256 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
257         if [ "`/bin/id -u postfix`" != "62" ]; then
258                 echo "Warning: user postfix haven't uid=62. Correct this before installing postfix" 1>&2
259                 exit 1
260         fi
261 else
262         /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
263 fi
264
265 %post
266 /sbin/ldconfig
267 if ! grep -q "^postmaster:" /etc/mail/aliases; then
268         echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
269         echo "postmaster:       root" >>/etc/mail/aliases
270 fi
271 if ! grep -q "^myhostname" /etc/mail/main.cf; then
272         postconf -e myhostname=`/bin/hostname -f`
273 fi
274
275 newaliases
276 /sbin/chkconfig --add postfix
277 if [ -f /var/lock/subsys/postfix ]; then
278         /etc/rc.d/init.d/postfix restart >&2
279 else
280         echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
281 fi
282
283 %preun
284 if [ "$1" = "0" ]; then
285         if [ -f /var/lock/subsys/postfix ]; then
286                 /etc/rc.d/init.d/postfix stop >&2
287         fi
288         /sbin/chkconfig --del postfix
289 fi
290
291 %postun
292 /sbin/ldconfig
293 if [ "$1" = "0" ]; then
294         /usr/sbin/groupdel maildrop 2> /dev/null
295         /usr/sbin/userdel postfix 2> /dev/null
296         /usr/sbin/groupdel postfix 2> /dev/null
297 fi
298
299 %triggerpostun -- postfix < 1:1.1.2
300 sed -e 's/^\(pickup[    ]\+fifo[        ]\+[^   ]\+[    ]\+\)[^         ]\+\([  ]\)/\1-\2/;
301 s/^\(cleanup[   ]\+unix[        ]\+\)[^         ]\+\([  ]\)/\1n\2/' /etc/mail/master.cf \
302         > /etc/mail/master.cf.rpmtmp
303 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
304
305 %files
306 %defattr(644,root,root,755)
307 %doc html *.gz README_FILES/*.gz
308 %doc sample-conf
309 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
310 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
311 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
312 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
313 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
314 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
315 #%ghost %{_sysconfdir}/mail/*.db
316 %dir %{_sysconfdir}/mail
317 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
318 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
319 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
320 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
321 %attr(755,root,root) %{_sysconfdir}/mail/post-install
322 %{_sysconfdir}/mail/postfix-files
323 %attr(740,root,root) /etc/cron.daily/postfix
324 %attr(754,root,root) /etc/rc.d/init.d/postfix
325 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
326 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
327 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
328 %attr(755,root,root) %{_bindir}/*
329 %attr(755,root,root) %{_sbindir}/s*
330 %attr(755,root,root) %{_sbindir}/postfix
331 %attr(755,root,root) %{_sbindir}/postalias
332 %attr(755,root,root) %{_sbindir}/postkick
333 %attr(755,root,root) %{_sbindir}/postl*
334 %attr(755,root,root) %{_sbindir}/postc*
335 %attr(755,root,root) %{_sbindir}/postmap
336 %attr(2755,root,maildrop) %{_sbindir}/postqueue
337 %attr(755,root,root) %{_sbindir}/postsuper
338 %attr(2755,root,maildrop) %{_sbindir}/postdrop
339 %attr(755,root,root) %{_sbindir}/qmqp-source
340 %attr(755,root,root) %{_libdir}/sendmail
341 %dir %{_libdir}/postfix
342 %attr(755,root,root) %{_libdir}/postfix/[^d]*
343 %attr(755,root,root) %dir %{_var}/spool/postfix
344 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
345 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
346 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
347 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
348 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
349 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
350 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
351 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
352 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
353 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
354 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
355 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
356 %{_mandir}/man*/*
357
358 %files devel
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_libdir}/libpostfix-*.so
361 %{_includedir}/postfix
362
363 %files dict-ldap
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
366
367 %files dict-mysql
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
370
371 %files dict-pcre
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
374
375 %files dict-pgsql
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so
This page took 0.657196 seconds and 4 git commands to generate.