1 |
spuhler |
926296 |
## This spec is based on kolab's spec from the OBS |
2 |
|
|
|
3 |
spuhler |
926177 |
%define _disable_ld_no_undefined 1 |
4 |
spuhler |
926296 |
|
5 |
|
|
# major is the part of the library name after the .so |
6 |
|
|
%define major 0 |
7 |
|
|
%define libname %mklibname %{name} %{major} |
8 |
|
|
%define develname %mklibname %{name} -d |
9 |
|
|
|
10 |
|
|
|
11 |
spuhler |
926160 |
%global with_systemd 1 |
12 |
ennael |
33418 |
|
13 |
spuhler |
926160 |
%global _name cyrus-imapd |
14 |
ennael |
33418 |
|
15 |
spuhler |
926160 |
%global ssl_pem_file %{_sysconfdir}/pki/%{_name}/%{_name}.pem |
16 |
ennael |
33418 |
|
17 |
spuhler |
926165 |
|
18 |
spuhler |
926160 |
%global _cyrususer cyrus |
19 |
|
|
%global _cyrusgroup mail |
20 |
|
|
%global _cyrexecdir %{_exec_prefix}/lib/%{_name} |
21 |
ennael |
33418 |
|
22 |
luigiwalser |
1102214 |
%global real_version 2.5.11 |
23 |
ennael |
33418 |
|
24 |
spuhler |
926160 |
## |
25 |
|
|
## Options |
26 |
|
|
## |
27 |
ennael |
33418 |
|
28 |
spuhler |
926160 |
%global with_bdb 1 |
29 |
|
|
%global with_mysql 1 |
30 |
|
|
%global with_pgsql 1 |
31 |
ennael |
33418 |
|
32 |
spuhler |
1019000 |
%global with_dav 0 |
33 |
spuhler |
926160 |
%global with_tcpwrap 1 |
34 |
ennael |
33418 |
|
35 |
spuhler |
926160 |
Name: cyrus-imapd |
36 |
|
|
Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support |
37 |
|
|
Version: %{real_version} |
38 |
spuhler |
1018999 |
Release: %mkrel 1 |
39 |
spuhler |
926160 |
License: BSD |
40 |
spuhler |
926165 |
Group: System/Servers |
41 |
spuhler |
926160 |
URL: http://www.cyrusimap.org |
42 |
ennael |
33418 |
|
43 |
spuhler |
926160 |
# Upstream sources |
44 |
oden |
980331 |
Source0: ftp://ftp.cyrusimap.org/cyrus-imapd/%{_name}-%{real_version}.tar.gz |
45 |
spuhler |
989656 |
Source1: cyrus-imapd.imap-2.5.x-conf |
46 |
spuhler |
926160 |
Source2: cyrus-imapd.cvt_cyrusdb_all |
47 |
|
|
Source3: cyrus-imapd.magic |
48 |
ennael |
33418 |
|
49 |
spuhler |
926160 |
# Distribution specific sources |
50 |
|
|
Source11: cyrus-imapd.logrotate |
51 |
|
|
Source12: cyrus-imapd.pam-config |
52 |
|
|
Source13: cyrus-imapd.cron-daily |
53 |
tmb |
233654 |
|
54 |
spuhler |
994682 |
# SysVinit |
55 |
|
|
Source22: cyrus-imapd.sysconfig |
56 |
spuhler |
926160 |
|
57 |
spuhler |
994682 |
|
58 |
spuhler |
926160 |
# Systemd support |
59 |
spuhler |
994682 |
Source31: cyrus-imapd.service |
60 |
|
|
Source32: cyr_systemd_helper |
61 |
spuhler |
926160 |
|
62 |
|
|
## |
63 |
|
|
## Patches |
64 |
|
|
## |
65 |
|
|
|
66 |
|
|
Provides: imap |
67 |
|
|
Provides: imap-server |
68 |
|
|
|
69 |
|
|
## |
70 |
|
|
## Build Requirements |
71 |
|
|
## |
72 |
|
|
BuildRequires: autoconf |
73 |
|
|
BuildRequires: automake |
74 |
|
|
BuildRequires: bison |
75 |
|
|
BuildRequires: pkgconfig(libsasl2) |
76 |
|
|
BuildRequires: pkgconfig(cunit) |
77 |
|
|
BuildRequires: sasl-plug-digestmd5 |
78 |
|
|
BuildRequires: sasl-plug-plain |
79 |
spuhler |
926336 |
BuildRequires: pkgconfig(libxml-2.0) |
80 |
spuhler |
926160 |
|
81 |
|
|
%if 0%{?with_bdb} |
82 |
spuhler |
994682 |
BuildRequires: db5-devel |
83 |
ennael |
33418 |
%endif |
84 |
spuhler |
926160 |
BuildRequires: flex |
85 |
|
|
#BuildRequires: gcc-c++ |
86 |
|
|
BuildRequires: gcc |
87 |
|
|
BuildRequires: groff |
88 |
|
|
BuildRequires: pkgconfig(jansson) |
89 |
|
|
BuildRequires: pkgconfig(krb5) |
90 |
|
|
|
91 |
|
|
%if 0%{?with_dav} |
92 |
|
|
BuildRequires: pkgconfig(libical) |
93 |
ennael |
33418 |
%endif |
94 |
|
|
|
95 |
spuhler |
926160 |
BuildRequires: libtool |
96 |
|
|
BuildRequires: pkgconfig(uuid) |
97 |
|
|
|
98 |
|
|
%if 0%{?with_mysql} |
99 |
|
|
BuildRequires: mysql-devel |
100 |
ennael |
33418 |
%endif |
101 |
spuhler |
926160 |
BuildRequires: openldap-devel |
102 |
|
|
BuildRequires: openssl-devel |
103 |
|
|
BuildRequires: perl(ExtUtils::MakeMaker) |
104 |
ennael |
33418 |
|
105 |
spuhler |
926160 |
BuildRequires: perl-devel |
106 |
|
|
BuildRequires: pkgconfig |
107 |
ennael |
33418 |
|
108 |
spuhler |
926160 |
%if 0%{?with_pgsql} |
109 |
|
|
BuildRequires: postgresql-devel |
110 |
|
|
%endif |
111 |
ennael |
33418 |
|
112 |
spuhler |
926160 |
%if 0%{?with_dav} |
113 |
spuhler |
926343 |
BuildRequires: pkgconfig(sqlite3) |
114 |
spuhler |
926160 |
%endif |
115 |
ennael |
33418 |
|
116 |
spuhler |
926160 |
%if 0%{?with_tcpwrap} |
117 |
|
|
BuildRequires: tcp_wrappers |
118 |
|
|
%endif |
119 |
ennael |
33418 |
|
120 |
spuhler |
926160 |
BuildRequires: transfig |
121 |
|
|
%if 0 |
122 |
|
|
# Disable the xapian-core requirement |
123 |
|
|
BuildRequires: xapian-core-devel |
124 |
|
|
%endif |
125 |
ennael |
33418 |
|
126 |
spuhler |
994682 |
Requires: db5-utils |
127 |
spuhler |
926160 |
Requires: file |
128 |
spuhler |
926578 |
## Spuhler 2016-01-22: I don't think we need this (Fedora has it in the perl-libs pacakge |
129 |
|
|
#Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
130 |
spuhler |
926160 |
Requires(post): coreutils |
131 |
|
|
Requires(post): e2fsprogs |
132 |
|
|
Requires(post): findutils |
133 |
|
|
Requires(post): grep |
134 |
|
|
Requires(post): make |
135 |
|
|
Requires(post): openssl |
136 |
|
|
Requires(post): perl |
137 |
|
|
Requires(preun): coreutils |
138 |
|
|
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd |
139 |
|
|
Requires(preun): /usr/sbin/userdel /usr/sbin/groupdel |
140 |
|
|
Requires(post): rpm-helper >= 0.24.8-1 |
141 |
|
|
Requires(preun): rpm-helper >= 0.24.8-1 |
142 |
ennael |
33418 |
|
143 |
|
|
|
144 |
spuhler |
926160 |
Obsoletes: %{name}-perl < %{version}-%{release} |
145 |
|
|
Provides: %{name}-perl = %{version}-%{release} |
146 |
|
|
Obsoletes: %{name}-utils < %{version}-%{release} |
147 |
|
|
Provides: %{name}-utils = %{version}-%{release} |
148 |
ennael |
33418 |
|
149 |
spuhler |
926160 |
%description |
150 |
|
|
The %{name} package contains the core of the Cyrus IMAP server. |
151 |
|
|
It is a scaleable enterprise mail system designed for use from |
152 |
|
|
small to large enterprise environments using standards-based |
153 |
|
|
internet mail technologies. |
154 |
ennael |
33418 |
|
155 |
spuhler |
926160 |
A full Cyrus IMAP implementation allows a seamless mail and bulletin |
156 |
|
|
board environment to be set up across multiple servers. It differs from |
157 |
|
|
other IMAP server implementations in that it is run on "sealed" |
158 |
|
|
servers, where users are not normally permitted to log in and have no |
159 |
|
|
system account on the server. The mailbox database is stored in parts |
160 |
|
|
of the filesystem that are private to the Cyrus IMAP server. All user |
161 |
|
|
access to mail is through software using the IMAP, POP3 or KPOP |
162 |
|
|
protocols. It also includes support for virtual domains, NNTP, |
163 |
|
|
mailbox annotations, and much more. The private mailbox database design |
164 |
|
|
gives the server large advantages in efficiency, scalability and |
165 |
|
|
administratability. Multiple concurrent read/write connections to the |
166 |
|
|
same mailbox are permitted. The server supports access control lists on |
167 |
|
|
mailboxes and storage quotas on mailbox hierarchies. |
168 |
ennael |
33418 |
|
169 |
spuhler |
926160 |
The Cyrus IMAP server supports the IMAP4rev1 protocol described |
170 |
|
|
in RFC 3501. IMAP4rev1 has been approved as a proposed standard. |
171 |
|
|
It supports any authentication mechanism available from the SASL |
172 |
|
|
library, imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using SSL and |
173 |
|
|
TLSv1) can be used for security. The server supports single instance |
174 |
|
|
store where possible when an email message is addressed to multiple |
175 |
|
|
recipients, SIEVE provides server side email filtering. |
176 |
ennael |
33418 |
|
177 |
spuhler |
926296 |
%package -n %{libname} |
178 |
|
|
Summary: Cyrus IMAP server library files |
179 |
|
|
Group: System/Libraries |
180 |
|
|
|
181 |
|
|
%description -n %{libname} |
182 |
|
|
The %{name}-lib package contains the library for cyrus-imapd |
183 |
ennael |
33418 |
|
184 |
spuhler |
926296 |
%package -n %{develname} |
185 |
|
|
Summary: Cyrus IMAP server development files |
186 |
|
|
Group: Development/Other |
187 |
|
|
Requires: %{libname} = %{version} |
188 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
189 |
|
|
|
190 |
|
|
%description -n %{develname} |
191 |
spuhler |
926160 |
The %{name}-devel package contains header files and libraries |
192 |
|
|
necessary for developing applications which use the imclient library. |
193 |
ennael |
33418 |
|
194 |
spuhler |
926296 |
|
195 |
|
|
%package -n perl-Cyrus |
196 |
|
|
Summary: Cyrus IMAPd utility Perl modules |
197 |
|
|
Group: Development/Perl |
198 |
|
|
|
199 |
|
|
%description -n perl-Cyrus |
200 |
|
|
This package contains Perl modules necessary to use the Cyrus server |
201 |
|
|
administrative utilities. |
202 |
|
|
|
203 |
|
|
The main package is %{name}. |
204 |
|
|
|
205 |
ennael |
33418 |
%prep |
206 |
spuhler |
926160 |
%setup -q -n %{_name}-%{real_version}%{?dot_snapshot_version} |
207 |
ennael |
33418 |
|
208 |
spuhler |
926160 |
%if 0%{?with_bdb} < 1 |
209 |
|
|
sed -i -e 's/,berkeley//g' cunit/db.testc |
210 |
|
|
sed -r -i -e 's/"berkeley(|-[a-z-]+)", //g' lib/imapoptions |
211 |
colin |
400402 |
%endif |
212 |
ennael |
33418 |
|
213 |
spuhler |
926160 |
# only to update config.* files |
214 |
|
|
autoreconf -vi || (libtoolize --force && autoreconf -vi) |
215 |
ennael |
33418 |
|
216 |
spuhler |
926160 |
# Modify docs master --> cyrus-master |
217 |
|
|
%{__perl} -pi -e "s@master\(8\)@cyrus-master(8)@" man/*5 man/*8 lib/imapoptions |
218 |
|
|
%{__sed} -i -e 's|\([^-]\)master|\1cyrus-master|g;s|^master|cyrus-master|g;s|Master|Cyrus-master|g;s|MASTER|CYRUS-MASTER|g' \ |
219 |
|
|
man/master.8 doc/man.html |
220 |
|
|
|
221 |
|
|
%if 0%{?with_dav} |
222 |
|
|
# Modify docs httpd --> cyrus-httpd |
223 |
|
|
%{__perl} -pi -e "s@httpd\(8\)@cyrus-httpd(8)@" man/*5 man/*8 lib/imapoptions |
224 |
|
|
%{__sed} -i -e 's|\([^-]\)httpd|\1cyrus-httpd|g;s|^httpd|cyrus-httpd|g;s|Httpd|Cyrus-httpd|g;s|HTTPD|CYRUS-HTTPD|g' \ |
225 |
|
|
man/httpd.8 doc/man.html |
226 |
colin |
400402 |
%endif |
227 |
ennael |
33418 |
|
228 |
spuhler |
926160 |
# Modify path in perl scripts |
229 |
|
|
find . -type f -name "*.pl" | xargs %{__perl} -pi -e "s@/usr/local/bin/perl@%{__perl}@" |
230 |
colin |
400398 |
|
231 |
spuhler |
926160 |
# modify lmtp socket path in .conf files |
232 |
|
|
%{__perl} -pi -e "s@/var/imap/@%{_var}/lib/imap/@" master/conf/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4 |
233 |
ennael |
33418 |
|
234 |
spuhler |
926160 |
# enable idled in .conf files to prevent error messages |
235 |
|
|
%{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf |
236 |
ennael |
33418 |
|
237 |
|
|
%build |
238 |
spuhler |
926160 |
CPPFLAGS="-I%{_includedir}/et -I%{_includedir}/kerberosIV" |
239 |
ennael |
33418 |
export CPPFLAGS |
240 |
|
|
CFLAGS="$RPM_OPT_FLAGS -fPIC" |
241 |
|
|
export CFLAGS |
242 |
spuhler |
926160 |
CXXFLAGS="$RPM_OPT_FLAGS -fPIC"; |
243 |
|
|
export CXXFLAGS |
244 |
|
|
CCDLFLAGS="-rdynamic" |
245 |
|
|
export CCDLFLAGS |
246 |
ennael |
33418 |
LDFLAGS="-L%{_libdir}" |
247 |
|
|
export LDFLAGS |
248 |
|
|
|
249 |
|
|
%configure2_5x \ |
250 |
spuhler |
926160 |
--enable-event-notification \ |
251 |
|
|
--enable-gssapi \ |
252 |
spuhler |
410430 |
--enable-idled \ |
253 |
spuhler |
926160 |
--enable-murder \ |
254 |
|
|
--enable-netscapehack \ |
255 |
|
|
--enable-nntp \ |
256 |
|
|
--enable-replication \ |
257 |
|
|
--enable-unit-tests \ |
258 |
|
|
%if 0 |
259 |
|
|
--enable-xapian \ |
260 |
ennael |
33418 |
%endif |
261 |
spuhler |
926160 |
%if 0%{?with_bdb} |
262 |
|
|
--with-bdb-incdir=%{_includedir}/db4 \ |
263 |
|
|
%else |
264 |
|
|
--without-bdb \ |
265 |
ennael |
33418 |
%endif |
266 |
spuhler |
926160 |
--with-cyrus-prefix=%{_cyrexecdir} \ |
267 |
|
|
--with-extraident="Kolab-%{version}-%{release}" \ |
268 |
|
|
%if 0%{?with_tcpwrap} < 1 |
269 |
|
|
--without-wrap \ |
270 |
ennael |
33418 |
%endif |
271 |
spuhler |
926160 |
%if 0%{?with_dav} |
272 |
spuhler |
926296 |
--enable-http \ |
273 |
ennael |
33418 |
%endif |
274 |
spuhler |
926160 |
--with-krbimpl=mit \ |
275 |
|
|
--with-ldap=/usr \ |
276 |
|
|
%if 0%{?with_mysql} |
277 |
|
|
--with-mysql=%{_prefix} \ |
278 |
|
|
--with-mysql-incdir=%{_includedir}/mysql/ \ |
279 |
spuhler |
926296 |
--with-mysql \ |
280 |
ennael |
33418 |
%endif |
281 |
spuhler |
926160 |
--with-perl=%{__perl} \ |
282 |
|
|
%if 0%{?with_pgsql} |
283 |
|
|
--with-pgsql=%{_includedir} \ |
284 |
ennael |
33418 |
%endif |
285 |
spuhler |
926160 |
--with-service-path=%{_cyrexecdir} \ |
286 |
|
|
--with-syslogfacility=MAIL |
287 |
ennael |
33418 |
|
288 |
spuhler |
926160 |
%make |
289 |
ennael |
33418 |
|
290 |
spuhler |
926160 |
%install |
291 |
ennael |
33418 |
|
292 |
spuhler |
1018999 |
|
293 |
spuhler |
926160 |
# Fix permissions on perl programs |
294 |
|
|
find . -type f -name "*.pl" -exec %{__chmod} 755 {} \; |
295 |
ennael |
33418 |
|
296 |
spuhler |
926160 |
# Do what the regular make install does |
297 |
|
|
%{__make} install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir} INSTALLDIRS=vendor |
298 |
ennael |
33418 |
|
299 |
|
|
# Install tools |
300 |
spuhler |
926160 |
for tool in tools/* ; do |
301 |
|
|
test -f ${tool} && %{__install} -m 755 ${tool} %{buildroot}%{_cyrexecdir}/ |
302 |
ennael |
33418 |
done |
303 |
|
|
|
304 |
|
|
# Create directories |
305 |
|
|
%{__install} -d \ |
306 |
spuhler |
926160 |
%{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,cron.daily} \ |
307 |
|
|
%{buildroot}%{_libdir}/sasl \ |
308 |
|
|
%{buildroot}%{_var}/spool/imap \ |
309 |
|
|
%{buildroot}%{_var}/lib/imap/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \ |
310 |
|
|
%{buildroot}%{_var}/lib/imap/ptclient \ |
311 |
|
|
%{buildroot}%{_sysconfdir}/pki/%{_name} \ |
312 |
|
|
doc/contrib |
313 |
ennael |
33418 |
|
314 |
|
|
# Install additional files |
315 |
spuhler |
926160 |
%{__install} -p -m 644 master/conf/prefork.conf %{buildroot}%{_sysconfdir}/cyrus.conf |
316 |
|
|
%{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/imapd.conf |
317 |
|
|
%{__install} -p -m 755 %{SOURCE2} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all |
318 |
|
|
%{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_var}/lib/imap/rpm/magic |
319 |
|
|
%{__install} -p -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/logrotate.d/%{_name} |
320 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/pop |
321 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/imap |
322 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/sieve |
323 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/mupdate |
324 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/lmtp |
325 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/nntp |
326 |
|
|
%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/csync |
327 |
|
|
%{__install} -p -m 755 %{SOURCE13} %{buildroot}%{_sysconfdir}/cron.daily/%{_name} |
328 |
|
|
%{__install} -d %{buildroot}%{_sysconfdir}/sysconfig/ |
329 |
|
|
%{__install} -p -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/sysconfig/%{_name} |
330 |
spuhler |
994682 |
%{__install} -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/cyrus-imapd.service |
331 |
|
|
%{__install} -p -D -m 755 %{SOURCE32} %{buildroot}%{_cyrexecdir}/cyr_systemd_helper |
332 |
ennael |
33418 |
|
333 |
|
|
|
334 |
spuhler |
926160 |
# Cleanup of doc dir |
335 |
|
|
find doc perl -name CVS -type d | xargs -r %{__rm} -rf |
336 |
|
|
find doc perl -name .cvsignore -type f | xargs -r %{__rm} -f |
337 |
|
|
%{__rm} -f doc/Makefile.dist* |
338 |
|
|
%{__rm} -f doc/text/htmlstrip.c |
339 |
|
|
%{__rm} -f doc/text/Makefile |
340 |
|
|
%{__rm} -rf doc/man |
341 |
ennael |
33418 |
|
342 |
spuhler |
926160 |
# fix permissions on perl .so files |
343 |
|
|
find %{buildroot}%{perl_vendorarch} -type f -name "*.so" -exec %{__chmod} 755 {} \; |
344 |
ennael |
33418 |
|
345 |
spuhler |
926160 |
# fix conflicts with uw-imap |
346 |
|
|
mv %{buildroot}%{_mandir}/man8/imapd.8 %{buildroot}%{_mandir}/man8/imapd.8cyrus |
347 |
|
|
mv %{buildroot}%{_mandir}/man8/pop3d.8 %{buildroot}%{_mandir}/man8/pop3d.8cyrus |
348 |
ennael |
33418 |
|
349 |
spuhler |
926160 |
# Install templates |
350 |
|
|
%{__install} -m 755 -d doc/conf |
351 |
|
|
%{__install} -m 644 master/conf/*.conf doc/conf/ |
352 |
ennael |
33418 |
|
353 |
spuhler |
926160 |
# Generate db config file |
354 |
|
|
( grep '^{' lib/imapoptions | grep _db | grep -v _db_path | cut -d'"' -f 2,4 | \ |
355 |
|
|
sed -e 's/^ *//' -e 's/-nosync//' -e 's/ *$//' -e 's/"/=/' |
356 |
|
|
echo sieve_version=2.2.3 ) | sort > %{buildroot}%{_var}/lib/imap/rpm/db.cfg |
357 |
ennael |
33418 |
|
358 |
spuhler |
926160 |
# create the ghost pem file |
359 |
|
|
touch %{buildroot}%{ssl_pem_file} |
360 |
ennael |
33418 |
|
361 |
spuhler |
926160 |
# Rename 'master' binary and manpage to avoid clash with postfix |
362 |
|
|
%{__mv} -f %{buildroot}%{_cyrexecdir}/master %{buildroot}%{_cyrexecdir}/cyrus-master |
363 |
|
|
%{__mv} -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8 |
364 |
ennael |
33418 |
|
365 |
spuhler |
926160 |
# Rename 'httpd' binary and manpage to avoid clash with apache httpd |
366 |
|
|
%if 0%{?with_dav} |
367 |
|
|
%{__mv} -f %{buildroot}%{_cyrexecdir}/httpd %{buildroot}%{_cyrexecdir}/cyrus-httpd |
368 |
|
|
%{__mv} -f %{buildroot}%{_mandir}/man8/httpd.8 %{buildroot}%{_mandir}/man8/cyrus-httpd.8 |
369 |
|
|
%endif |
370 |
ennael |
33418 |
|
371 |
spuhler |
926160 |
# Rename 'fetchnews' binary and manpage to avoid clash with leafnode |
372 |
|
|
%{__mv} -f %{buildroot}%{_cyrexecdir}/fetchnews %{buildroot}%{_cyrexecdir}/cyrfetchnews |
373 |
|
|
%{__mv} -f %{buildroot}%{_mandir}/man8/fetchnews.8 %{buildroot}%{_mandir}/man8/cyrfetchnews.8 |
374 |
|
|
%{__perl} -pi -e 's|fetchnews|cyrfetchnews|g;s|Fetchnews|Cyrfetchnews|g;s/FETCHNEWS/CYRFETCHNEWS/g' \ |
375 |
|
|
%{buildroot}%{_mandir}/man8/cyrfetchnews.8 |
376 |
ennael |
33418 |
|
377 |
spuhler |
926160 |
# compress manpages |
378 |
|
|
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
379 |
ennael |
33418 |
|
380 |
spuhler |
926160 |
# remove executable bit from docs |
381 |
|
|
for ddir in doc perl/imap/examples |
382 |
|
|
do |
383 |
|
|
find $ddir -type f -exec %{__chmod} -x {} \; |
384 |
|
|
done |
385 |
ennael |
33418 |
|
386 |
spuhler |
926160 |
# Remove installed but not packaged files |
387 |
luigiwalser |
1079128 |
%{__rm} -f %{buildroot}%{_cyrexecdir}/htmlstrip.c |
388 |
spuhler |
926160 |
%{__rm} -f %{buildroot}%{_cyrexecdir}/not-mkdep |
389 |
|
|
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2header* |
390 |
|
|
%{__rm} -f %{buildroot}%{_cyrexecdir}/config2man |
391 |
|
|
%{__rm} -f %{buildroot}%{_cyrexecdir}/pop3proxyd |
392 |
|
|
find %{buildroot} -type f -name "perllocal.pod" -exec %{__rm} -vf {} \; |
393 |
|
|
find %{buildroot} -type f -name ".packlist" -exec %{__rm} -vf {} \; |
394 |
|
|
find %{buildroot} -type f -name ".gitignore" -exec %{__rm} -vf {} \; |
395 |
|
|
%{__rm} -f %{buildroot}%{_mandir}/man8/syncnews.8* |
396 |
|
|
find %{buildroot}%{perl_vendorarch} -type f -name "*.bs" -exec %{__rm} -vf {} \; |
397 |
ennael |
33418 |
|
398 |
spuhler |
926160 |
%check |
399 |
|
|
make check || : |
400 |
ennael |
33418 |
|
401 |
|
|
|
402 |
|
|
%pre |
403 |
spuhler |
926160 |
if [ $1 == 1 ]; then |
404 |
|
|
# Create 'cyrus' user on target host |
405 |
spuhler |
926296 |
/usr/sbin/groupadd -r saslauth 2> /dev/null || : |
406 |
spuhler |
926160 |
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_var}/lib/imap -g %{_cyrusgroup} \ |
407 |
spuhler |
926296 |
-G saslauth -s /sbin/nologin -r %{_cyrususer} 2> /dev/null || : |
408 |
spuhler |
926160 |
fi |
409 |
ennael |
33418 |
|
410 |
spuhler |
927664 |
## From documentation: |
411 |
|
|
# It is strongly recommended to shut down the Cyrus IMAP services |
412 |
|
|
# before performing the upgrade, as the newer binaries will end up |
413 |
|
|
# writing to mailboxes.db in a way that is not compatible with the older binaries |
414 |
|
|
# (that would otherwise still be running). |
415 |
|
|
if [ $1 == 2 ]; then |
416 |
|
|
/usr/bin/systemctl stop cyrus-imapd |
417 |
|
|
fi |
418 |
|
|
|
419 |
ennael |
33418 |
%post |
420 |
spuhler |
926160 |
CHATTRSYNC=0 |
421 |
|
|
|
422 |
|
|
if [ -f "%{_sysconfdir}/sysconfig/cyrus-imapd" ]; then |
423 |
|
|
source %{_sysconfdir}/sysconfig/cyrus-imapd |
424 |
ennael |
33418 |
fi |
425 |
|
|
|
426 |
spuhler |
926160 |
if [ $CHATTRSYNC -eq 1 ]; then |
427 |
|
|
# Force synchronous updates of files in the following directories |
428 |
|
|
chattr -R +S \ |
429 |
|
|
$(grep ^configdirectory: /etc/imapd.conf | cut -d':' -f2) \ |
430 |
|
|
$(grep ^partition- /etc/imapd.conf | cut -d':' -f2) \ |
431 |
|
|
$(grep ^metapartition- /etc/imapd.conf | cut -d':' -f2) 2>/dev/null ||: |
432 |
|
|
fi |
433 |
ennael |
33418 |
|
434 |
spuhler |
926160 |
# Create SSL certificates |
435 |
spuhler |
1007470 |
%_create_ssl_certificate cyrus-imapd |
436 |
|
|
chown %{_cyrususer}:%{_cyrusgroup} /etc/pki/tls/private/cyrus-imapd.pem |
437 |
ennael |
33418 |
|
438 |
spuhler |
926160 |
# These commands may fail in a docker container, which may not |
439 |
|
|
# have a /usr/bin/systemctl with a 'preset' command |
440 |
spuhler |
989656 |
%_post_service cyrus-imapd |
441 |
spuhler |
394129 |
|
442 |
ennael |
33418 |
%preun |
443 |
spuhler |
989656 |
%_preun_service cyrus-imapd |
444 |
ennael |
33418 |
|
445 |
|
|
%files |
446 |
spuhler |
926160 |
%doc COPYING README |
447 |
|
|
%doc doc/* |
448 |
|
|
%config(noreplace) %{_sysconfdir}/cyrus.conf |
449 |
|
|
%config(noreplace) %{_sysconfdir}/imapd.conf |
450 |
|
|
%{_unitdir}/cyrus-imapd.service |
451 |
|
|
%{_cyrexecdir}/cyr_systemd_helper |
452 |
|
|
%dir %{_sysconfdir}/pki |
453 |
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{_name} |
454 |
|
|
%attr(0640,root,%{_cyrusgroup}) %config(noreplace) %{_sysconfdir}/sysconfig/%{_name} |
455 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/pop |
456 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/imap |
457 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/sieve |
458 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/lmtp |
459 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/mupdate |
460 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/csync |
461 |
|
|
%config(noreplace) %{_sysconfdir}/pam.d/nntp |
462 |
|
|
%attr(0755,root,root) %{_bindir}/cyradm |
463 |
|
|
%{_bindir}/imtest |
464 |
|
|
%{_bindir}/installsieve |
465 |
|
|
%{_bindir}/lmtptest |
466 |
|
|
%{_bindir}/mupdatetest |
467 |
|
|
%{_bindir}/nntptest |
468 |
|
|
%{_bindir}/pop3test |
469 |
|
|
%{_bindir}/sieveshell |
470 |
|
|
%{_bindir}/sivtest |
471 |
|
|
%{_bindir}/smtptest |
472 |
|
|
%{_bindir}/synctest |
473 |
|
|
%{_sysconfdir}/cron.daily/%{_name} |
474 |
guillomovitch |
232092 |
%dir %{_cyrexecdir} |
475 |
|
|
%{_cyrexecdir}/arbitron |
476 |
spuhler |
926160 |
%{_cyrexecdir}/arbitronsort.pl |
477 |
guillomovitch |
232092 |
%{_cyrexecdir}/chk_cyrus |
478 |
spuhler |
926160 |
%{_cyrexecdir}/compile_st.pl |
479 |
|
|
%{_cyrexecdir}/convert-sieve.pl |
480 |
|
|
%{_cyrexecdir}/cyr_deny |
481 |
|
|
%{_cyrexecdir}/cyr_df |
482 |
|
|
%{_cyrexecdir}/cyr_info |
483 |
|
|
#%%{_cyrexecdir}/ctl_conversationsdb |
484 |
guillomovitch |
232092 |
%{_cyrexecdir}/ctl_cyrusdb |
485 |
|
|
%{_cyrexecdir}/ctl_deliver |
486 |
|
|
%{_cyrexecdir}/ctl_mboxlist |
487 |
spuhler |
965084 |
#%%{_cyrexecdir}/ctl_zoneinfo |
488 |
guillomovitch |
232092 |
%{_cyrexecdir}/cvt_cyrusdb |
489 |
|
|
%{_cyrexecdir}/cyr_dbtool |
490 |
|
|
%{_cyrexecdir}/cyr_expire |
491 |
spuhler |
926160 |
%{_cyrexecdir}/cyr_sequence |
492 |
guillomovitch |
232092 |
%{_cyrexecdir}/cyr_synclog |
493 |
|
|
%{_cyrexecdir}/cyr_userseen |
494 |
spuhler |
926160 |
%{_cyrexecdir}/cyrdump |
495 |
|
|
%if 0%{?with_dav} |
496 |
|
|
%{_cyrexecdir}/cyrus-httpd |
497 |
spuhler |
926296 |
%{_cyrexecdir}/dav_reconstruct |
498 |
spuhler |
1018999 |
%{_cyrexecdir}/ctl_zoneinfo |
499 |
spuhler |
926160 |
%endif |
500 |
guillomovitch |
232092 |
%{_cyrexecdir}/cyrus-master |
501 |
spuhler |
926160 |
%{_cyrexecdir}/deliver |
502 |
guillomovitch |
232092 |
%{_cyrexecdir}/dohash |
503 |
spuhler |
926160 |
%{_cyrexecdir}/fixsearchpath.pl |
504 |
guillomovitch |
232092 |
%{_cyrexecdir}/fud |
505 |
luigiwalser |
1079128 |
%{_cyrexecdir}/git-version.sh |
506 |
spuhler |
926160 |
#%%{_cyrexecdir}/hammer_cyrusdb |
507 |
guillomovitch |
232092 |
%{_cyrexecdir}/imapd |
508 |
|
|
%{_cyrexecdir}/ipurge |
509 |
spuhler |
926160 |
%exclude %{_cyrexecdir}/jenkins-build.sh |
510 |
guillomovitch |
232092 |
%{_cyrexecdir}/lmtpd |
511 |
spuhler |
926160 |
%{_cyrexecdir}/lmtpproxyd |
512 |
guillomovitch |
232092 |
%{_cyrexecdir}/masssievec |
513 |
|
|
%{_cyrexecdir}/mbexamine |
514 |
|
|
%{_cyrexecdir}/mbpath |
515 |
spuhler |
926160 |
%{_cyrexecdir}/mbtool |
516 |
spuhler |
926296 |
#%%{_cyrexecdir}/message_test |
517 |
guillomovitch |
232092 |
%{_cyrexecdir}/migrate-metadata |
518 |
|
|
%{_cyrexecdir}/mkimap |
519 |
|
|
%{_cyrexecdir}/mknewsgroups |
520 |
|
|
%{_cyrexecdir}/notifyd |
521 |
|
|
%{_cyrexecdir}/pop3d |
522 |
|
|
%{_cyrexecdir}/quota |
523 |
|
|
%{_cyrexecdir}/reconstruct |
524 |
|
|
%{_cyrexecdir}/rehash |
525 |
spuhler |
926160 |
#%%{_cyrexecdir}/search_test |
526 |
guillomovitch |
232092 |
%{_cyrexecdir}/sievec |
527 |
|
|
%{_cyrexecdir}/sieved |
528 |
spuhler |
926160 |
%{_cyrexecdir}/smmapd |
529 |
|
|
#%%{_cyrexecdir}/squat_dump |
530 |
guillomovitch |
232092 |
%{_cyrexecdir}/squatter |
531 |
|
|
%{_cyrexecdir}/timsieved |
532 |
|
|
%{_cyrexecdir}/tls_prune |
533 |
|
|
%{_cyrexecdir}/translatesieve |
534 |
|
|
%{_cyrexecdir}/undohash |
535 |
|
|
%{_cyrexecdir}/unexpunge |
536 |
|
|
%{_cyrexecdir}/upgradesieve |
537 |
spuhler |
926160 |
%{_cyrexecdir}/cvt_cyrusdb_all |
538 |
|
|
%{_cyrexecdir}/idled |
539 |
|
|
%{_cyrexecdir}/mupdate |
540 |
|
|
%{_cyrexecdir}/mupdate-loadgen.pl |
541 |
|
|
%{_cyrexecdir}/proxyd |
542 |
|
|
%{_cyrexecdir}/sync_client |
543 |
|
|
%{_cyrexecdir}/sync_reset |
544 |
|
|
%{_cyrexecdir}/sync_server |
545 |
|
|
%{_cyrexecdir}/cyrfetchnews |
546 |
|
|
%{_cyrexecdir}/nntpd |
547 |
guillomovitch |
232092 |
%{_cyrexecdir}/ptdump |
548 |
|
|
%{_cyrexecdir}/ptexpire |
549 |
|
|
%{_cyrexecdir}/ptloader |
550 |
spuhler |
926160 |
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap |
551 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/backup |
552 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/db |
553 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/log |
554 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/meta |
555 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/md5 |
556 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/msg |
557 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/proc |
558 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/ptclient |
559 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/quota |
560 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/rpm |
561 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/sieve |
562 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_var}/lib/imap/socket |
563 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/sync |
564 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/lib/imap/user |
565 |
|
|
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_var}/spool/imap |
566 |
|
|
%{_libdir}/*.so.* |
567 |
|
|
%{_var}/lib/imap/rpm/* |
568 |
|
|
%doc perl/imap/README |
569 |
|
|
%doc perl/imap/Changes |
570 |
|
|
%doc perl/imap/examples |
571 |
|
|
%dir %{perl_vendorarch}/Cyrus |
572 |
|
|
%dir %{perl_vendorarch}/Cyrus/IMAP |
573 |
|
|
%{perl_vendorarch}/Cyrus/IMAP/Admin.pm |
574 |
|
|
%{perl_vendorarch}/Cyrus/IMAP/Shell.pm |
575 |
|
|
%{perl_vendorarch}/Cyrus/IMAP/IMSP.pm |
576 |
|
|
%{perl_vendorarch}/Cyrus/IMAP.pm |
577 |
|
|
%dir %{perl_vendorarch}/Cyrus/SIEVE |
578 |
|
|
%{perl_vendorarch}/Cyrus/SIEVE/managesieve.pm |
579 |
|
|
%dir %{perl_vendorlib}/Cyrus/ |
580 |
|
|
%dir %{perl_vendorlib}/Cyrus/Annotator |
581 |
|
|
%{perl_vendorlib}/Cyrus/Annotator/Daemon.pm |
582 |
|
|
%{perl_vendorlib}/Cyrus/Annotator/Message.pm |
583 |
|
|
%dir %{perl_vendorarch}/auto |
584 |
|
|
%dir %{perl_vendorarch}/auto/Cyrus |
585 |
|
|
%dir %{perl_vendorarch}/auto/Cyrus/IMAP |
586 |
|
|
%{perl_vendorarch}/auto/Cyrus/IMAP/IMAP.so |
587 |
|
|
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE |
588 |
|
|
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve |
589 |
|
|
%{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve/managesieve.so |
590 |
|
|
%{_mandir}/man1/* |
591 |
|
|
%{_mandir}/man3/* |
592 |
guillomovitch |
232092 |
%{_mandir}/man5/* |
593 |
spuhler |
926160 |
%{_mandir}/man8/* |
594 |
|
|
%dir %{_sysconfdir}/pki/%{_name} |
595 |
|
|
%attr(0640,root,%{_cyrusgroup}) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{ssl_pem_file} |
596 |
ennael |
33418 |
|
597 |
spuhler |
926296 |
|
598 |
|
|
%files -n %{libname} |
599 |
|
|
%{_libdir}/*.so.%{major}* |
600 |
|
|
|
601 |
|
|
%files -n %{develname} |
602 |
spuhler |
926160 |
%defattr(0644,root,root,0755) |
603 |
ennael |
33418 |
%{_includedir}/cyrus |
604 |
spuhler |
926160 |
%{_libdir}/pkgconfig/*cyrus*.pc |
605 |
|
|
%{_libdir}/*.so |
606 |
spuhler |
926296 |
%{_libdir}/lib*.la |
607 |
|
|
|
608 |
|
|
%files -n perl-Cyrus |
609 |
|
|
%doc perl/imap/README perl/imap/Changes perl/imap/examples |
610 |
|
|
%{perl_vendorarch}/auto/Cyrus |
611 |
|
|
%{perl_vendorarch}/Cyrus |
612 |
|
|
%{_mandir}/man3/Cyrus* |