- handle uoa (with bcond)
[packages/evolution-data-server.git] / evolution-data-server.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # do not build and package API docs
4 %bcond_without  kerberos5       # build without kerberos5 support
5 %bcond_without  ldap            # build without ldap support
6 %bcond_without  static_libs     # do not build static libs
7 %bcond_without  uoa             # single sign-on (aka Ubuntu Online Accounts)
8 %bcond_without  vala            # do not build Vala API
9
10 %define         basever         3.10
11 %define         apiver          1.2
12 Summary:        Evolution data server
13 Summary(pl.UTF-8):      Serwer danych Evolution
14 Name:           evolution-data-server
15 Version:        3.10.4
16 Release:        1
17 License:        LGPL v2+
18 Group:          X11/Libraries
19 Source0:        http://ftp.gnome.org/pub/GNOME/sources/evolution-data-server/3.10/%{name}-%{version}.tar.xz
20 # Source0-md5:  62b365fa50f13a0be85eec67115742c8
21 URL:            http://www.gnome.org/projects/evolution/
22 BuildRequires:  autoconf >= 2.62
23 BuildRequires:  automake >= 1:1.11
24 BuildRequires:  docbook-dtd412-xml
25 BuildRequires:  gcr-devel >= 3.4.0
26 BuildRequires:  gettext-devel >= 0.18.1
27 BuildRequires:  glib2-devel >= 1:2.34.0
28 BuildRequires:  gnome-common >= 2.20.0
29 BuildRequires:  gnome-online-accounts-devel >= 3.8.0
30 BuildRequires:  gobject-introspection-devel >= 0.10.0
31 BuildRequires:  gperf
32 BuildRequires:  gtk+3-devel >= 3.2.0
33 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.14}
34 %{?with_kerberos5:BuildRequires:        heimdal-devel}
35 BuildRequires:  intltool >= 0.40.0
36 %{?with_uoa:BuildRequires:      json-glib-devel}
37 %{?with_uoa:BuildRequires:      libaccounts-glib-devel >= 1.4}
38 BuildRequires:  libgdata-devel >= 0.10.0
39 BuildRequires:  libgweather-devel >= 3.8
40 BuildRequires:  libical-devel >= 0.43
41 BuildRequires:  libsecret-devel >= 0.5
42 %{?with_uoa:BuildRequires:      libsignon-glib-devel >= 1.8}
43 BuildRequires:  libsoup-devel >= 2.40.3
44 BuildRequires:  libstdc++-devel
45 BuildRequires:  libtool >= 2:2.2
46 BuildRequires:  libxml2-devel >= 1:2.6.31
47 BuildRequires:  nspr-devel >= 4
48 BuildRequires:  nss-devel >= 3
49 %{?with_ldap:BuildRequires:     openldap-evolution-devel >= 2.4.6}
50 BuildRequires:  pkgconfig
51 %{?with_uoa:BuildRequires:      rest-devel >= 0.7}
52 BuildRequires:  rpmbuild(macros) >= 1.304
53 BuildRequires:  sed >= 4.0
54 BuildRequires:  sqlite3-devel >= 3.5
55 BuildRequires:  tar >= 1:1.22
56 %{?with_vala:BuildRequires:     vala >= 2:0.14.0}
57 BuildRequires:  xz
58 BuildRequires:  zlib-devel
59 Requires(post,postun):  glib2 >= 1:2.34.0
60 Requires:       %{name}-libs = %{version}-%{release}
61 Requires:       gnome-online-accounts-libs >= 3.8.0
62 Requires:       gtk+3 >= 3.2.0
63 Requires:       libgdata >= 0.10.0
64 Requires:       libgweather >= 3.8
65 # sr@Latn vs. sr@latin
66 Conflicts:      glibc-misc < 6:2.7
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %define         schemadir       /usr/share/openldap/schema
70
71 %description
72 The Evolution data server for the calendar and addressbook.
73
74 %description -l pl.UTF-8
75 Serwer danych Evolution dla kalendarza i książki adresowej.
76
77 %package -n openldap-schema-evolutionperson
78 Summary:        evolutionperson LDAP schema
79 Summary(pl.UTF-8):      Schemat LDAP evolutionperson
80 Group:          Networking/Daemons
81 Requires(post,postun):  sed >= 4.0
82 Requires:       openldap-servers
83 %if "%{_rpmversion}" >= "5"
84 BuildArch:      noarch
85 %endif
86
87 %description -n openldap-schema-evolutionperson
88 This package contains evolutionperson.schema for OpenLDAP server.
89
90 %description -n openldap-schema-evolutionperson -l pl.UTF-8
91 Ten pakiet zawiera evolutionperson.schema dla serwera OpenLDAP.
92
93 %package libs
94 Summary:        Evolution Data Server library
95 Summary(pl.UTF-8):      Biblioteka Evolution Data Server
96 Group:          X11/Libraries
97 Requires:       gcr-libs >= 3.4.0
98 Requires:       glib2 >= 1:2.34.0
99 Requires:       libical >= 0.43
100 Requires:       libsecret >= 0.5
101 Requires:       libsoup >= 2.40.3
102 Requires:       libxml2 >= 1:2.6.31
103 Requires:       sqlite3 >= 3.5
104
105 %description libs
106 This package contains Evolution Data Server library.
107
108 %description libs -l pl.UTF-8
109 Ten pakiet zawiera bibliotekę Evolution Data Server.
110
111 %package devel
112 Summary:        Evolution data server development files
113 Summary(pl.UTF-8):      Pliki programistyczne serwera danych evolution
114 Group:          X11/Development/Libraries
115 Requires:       %{name}-libs = %{version}-%{release}
116 Requires:       gcr-devel >= 3.4.0
117 Requires:       glib2-devel >= 1:2.34.0
118 %{?with_kerberos5:Requires:     heimdal-devel}
119 Requires:       libgdata-devel >= 0.10.0
120 Requires:       libical-devel >= 0.43
121 Requires:       libsecret-devel >= 0.5
122 Requires:       libsoup-devel >= 2.40.3
123 Requires:       libxml2-devel >= 1:2.6.31
124 Requires:       nspr-devel >= 4
125 Requires:       nss-devel >= 3
126 Requires:       sqlite3-devel >= 3.5
127
128 %description devel
129 This package contains the files necessary to develop applications
130 using Evolution's data server libraries.
131
132 %description devel -l pl.UTF-8
133 Ten pakiet zawiera pliki potrzebne do tworzenia aplikacji
134 korzystających z bibliotek serwera danych Evolution.
135
136 %package static
137 Summary:        Evolution data server static libraries
138 Summary(pl.UTF-8):      Statyczne biblioteki serwera danych Evolution
139 Group:          X11/Development/Libraries
140 Requires:       %{name}-devel = %{version}-%{release}
141
142 %description static
143 Evolution data server static libraries.
144
145 %description static -l pl.UTF-8
146 Statyczne biblioteki serwera danych Evolution.
147
148 %package apidocs
149 Summary:        Evolution data server API documentation
150 Summary(pl.UTF-8):      Dokumentacja API serwera danych Evolution
151 Group:          Documentation
152 Requires:       gtk-doc-common
153
154 %description apidocs
155 Evolution data server API documentation.
156
157 %description apidocs -l pl.UTF-8
158 Dokumentacja API serwera danych Evolution.
159
160 %package -n vala-evolution-data-server
161 Summary:        Evolution data server API for Vala language
162 Summary(pl.UTF-8):      API serwera danych Evolution dla języka Vala
163 Group:          Development/Libraries
164 Requires:       %{name}-devel = %{version}-%{release}
165 Requires:       vala >= 2:0.14.0
166
167 %description -n vala-evolution-data-server
168 Evolution data server API for Vala language.
169
170 %description -n vala-evolution-data-server -l pl.UTF-8
171 API serwera danych Evolution dla języka Vala.
172
173 %prep
174 %setup -q
175
176 # kill -L$withval/lib
177 %{__sed} -i -e 's/DB_LIBS="-L[^ "]* /DB_LIBS="/;s/ICONV_LIBS="[^ "]*/ICONV_LIBS="/' configure.ac
178
179 %build
180 %{__gtkdocize}
181 %{__intltoolize}
182 %{__libtoolize}
183 %{__aclocal} -I m4
184 %{__autoheader}
185 %{__autoconf}
186 %{__automake}
187
188 # Set LIBS so that configure will be able to link with static LDAP libraries,
189 # which depend on Cyrus SASL and OpenSSL.
190 if pkg-config openssl ; then
191         LIBS="-lsasl2 `pkg-config --libs openssl`"
192 else
193         LIBS="-lsasl2 -lssl -lcrypto"
194 fi
195 export LIBS
196
197 %configure \
198         %{?with_kerberos5:--with-krb5=%{_prefix} --with-krb5-libs=%{_libdir}} \
199         %{!?with_kerberos5:--with-krb5=no} \
200         %{?with_ldap:--with-openldap=%{_libdir}/evolution-openldap} \
201         %{?with_ldap:--with-static-ldap=yes} \
202         %{!?with_ldap:--with-openldap=no} \
203         --enable-smime \
204         --enable-ipv6 \
205         --enable-nntp \
206         %{__enable_disable apidocs gtk-doc} \
207         %{__enable_disable static_libs static} \
208         %{__enable_disable vala vala-bindings} \
209         %{!?with_uoa:--disable-uoa} \
210         --with-libdb=%{_libdir} \
211         --with-html-dir=%{_gtkdocdir} \
212         --disable-silent-rules
213
214 %{__make}
215
216 %install
217 rm -rf $RPM_BUILD_ROOT
218 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}-%{basever}
219 install -d $RPM_BUILD_ROOT%{schemadir}
220
221 %{__make} install \
222         DESTDIR=$RPM_BUILD_ROOT \
223         HTML_DIR=%{_gtkdocdir}
224
225 install addressbook/backends/ldap/evolutionperson.schema $RPM_BUILD_ROOT%{schemadir}
226
227 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/{camel-providers,calendar-backends,addressbook-backends,registry-modules}/*.{la,a}
228 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
229
230 %find_lang %{name}-%{basever}
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post
236 %glib_compile_schemas
237
238 %postun
239 %glib_compile_schemas
240
241 %post   libs -p /sbin/ldconfig
242 %postun libs -p /sbin/ldconfig
243
244 %post -n openldap-schema-evolutionperson
245 %openldap_schema_register %{schemadir}/evolutionperson.schema
246 %service -q ldap restart
247
248 %postun -n openldap-schema-evolutionperson
249 if [ "$1" = "0" ]; then
250         %openldap_schema_unregister %{schemadir}/evolutionperson.schema
251         %service -q ldap restart
252 fi
253
254 %files -f %{name}-%{basever}.lang
255 %defattr(644,root,root,755)
256 %doc AUTHORS ChangeLog NEWS* README
257 %attr(755,root,root) %{_libexecdir}/camel-index-control-%{apiver}
258 %attr(755,root,root) %{_libexecdir}/camel-lock-helper-%{apiver}
259 %attr(755,root,root) %{_libexecdir}/evolution-addressbook-factory
260 %attr(755,root,root) %{_libexecdir}/evolution-calendar-factory
261 %attr(755,root,root) %{_libexecdir}/evolution-scan-gconf-tree-xml
262 %attr(755,root,root) %{_libexecdir}/evolution-source-registry
263 %attr(755,root,root) %{_libexecdir}/evolution-user-prompter
264 %dir %{_libdir}/%{name}
265 %dir %{_libdir}/%{name}/addressbook-backends
266 %attr(755,root,root) %{_libdir}/%{name}/addressbook-backends/libebookbackendfile.so
267 %attr(755,root,root) %{_libdir}/%{name}/addressbook-backends/libebookbackendgoogle.so
268 %if %{with ldap}
269 %attr(755,root,root) %{_libdir}/%{name}/addressbook-backends/libebookbackendldap.so
270 %endif
271 %attr(755,root,root) %{_libdir}/%{name}/addressbook-backends/libebookbackendwebdav.so
272 %dir %{_libdir}/%{name}/calendar-backends
273 %attr(755,root,root) %{_libdir}/%{name}/calendar-backends/libecalbackendcaldav.so
274 %attr(755,root,root) %{_libdir}/%{name}/calendar-backends/libecalbackendcontacts.so
275 %attr(755,root,root) %{_libdir}/%{name}/calendar-backends/libecalbackendfile.so
276 %attr(755,root,root) %{_libdir}/%{name}/calendar-backends/libecalbackendhttp.so
277 %attr(755,root,root) %{_libdir}/%{name}/calendar-backends/libecalbackendweather.so
278 %dir %{_libdir}/%{name}/camel-providers
279 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamelimapx.so
280 %{_libdir}/%{name}/camel-providers/libcamelimapx.urls
281 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamellocal.so
282 %{_libdir}/%{name}/camel-providers/libcamellocal.urls
283 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamelnntp.so
284 %{_libdir}/%{name}/camel-providers/libcamelnntp.urls
285 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamelpop3.so
286 %{_libdir}/%{name}/camel-providers/libcamelpop3.urls
287 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamelsendmail.so
288 %{_libdir}/%{name}/camel-providers/libcamelsendmail.urls
289 %attr(755,root,root) %{_libdir}/%{name}/camel-providers/libcamelsmtp.so
290 %{_libdir}/%{name}/camel-providers/libcamelsmtp.urls
291 %dir %{_libdir}/evolution-data-server/registry-modules
292 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-cache-reaper.so
293 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-gnome-online-accounts.so
294 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-google-backend.so
295 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-outlook-backend.so
296 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-owncloud-backend.so
297 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-trust-prompt.so
298 %if %{with uoa}
299 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-ubuntu-online-accounts.so
300 %endif
301 %attr(755,root,root) %{_libdir}/evolution-data-server/registry-modules/module-yahoo-backend.so
302
303 %dir %{_libdir}/%{name}-%{basever}
304
305 %dir %{_datadir}/%{name}
306 %if %{with ldap}
307 %{_datadir}/%{name}/evolutionperson.schema
308 %endif
309 %{_pixmapsdir}/%{name}
310
311 %if %{with uoa}
312 %{_desktopdir}/evolution-data-server-uoa.desktop
313 %{_datadir}/accounts/applications/evolution-data-server.application
314 %{_datadir}/accounts/service_types/calendar.service-type
315 %{_datadir}/accounts/service_types/contacts.service-type
316 %{_datadir}/accounts/service_types/mail.service-type
317 %{_datadir}/accounts/services/google-calendar.service
318 %{_datadir}/accounts/services/google-contacts.service
319 %{_datadir}/accounts/services/google-gmail.service
320 %{_datadir}/accounts/services/windows-live-mail.service
321 %{_datadir}/accounts/services/yahoo-calendar.service
322 %{_datadir}/accounts/services/yahoo-mail.service
323 %endif
324
325 %{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.AddressBook.service
326 %{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.Calendar.service
327 %{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.Sources.service
328 %{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.UserPrompter.service
329
330 %{_datadir}/GConf/gsettings/evolution-data-server.convert
331 %{_datadir}/GConf/gsettings/libedataserver.convert
332 %{_datadir}/glib-2.0/schemas/org.gnome.evolution.eds-shell.gschema.xml
333 %{_datadir}/glib-2.0/schemas/org.gnome.evolution.shell.network-config.gschema.xml
334 %{_datadir}/glib-2.0/schemas/org.gnome.Evolution.DefaultSources.gschema.xml
335 %{_datadir}/glib-2.0/schemas/org.gnome.evolution-data-server.addressbook.gschema.xml
336 %{_datadir}/glib-2.0/schemas/org.gnome.evolution-data-server.calendar.gschema.xml
337
338 %files -n openldap-schema-evolutionperson
339 %defattr(644,root,root,755)
340 %{schemadir}/evolutionperson.schema
341
342 %files libs
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/libcamel-%{apiver}.so.*.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libcamel-%{apiver}.so.45
346 %attr(755,root,root) %{_libdir}/libebackend-%{apiver}.so.*.*.*
347 %attr(755,root,root) %ghost %{_libdir}/libebackend-%{apiver}.so.7
348 %attr(755,root,root) %{_libdir}/libebook-%{apiver}.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libebook-%{apiver}.so.14
350 %attr(755,root,root) %{_libdir}/libebook-contacts-%{apiver}.so.*.*.*
351 %attr(755,root,root) %ghost %{_libdir}/libebook-contacts-%{apiver}.so.0
352 %attr(755,root,root) %{_libdir}/libecal-%{apiver}.so.*.*.*
353 %attr(755,root,root) %ghost %{_libdir}/libecal-%{apiver}.so.16
354 %attr(755,root,root) %{_libdir}/libedata-book-%{apiver}.so.*.*.*
355 %attr(755,root,root) %ghost %{_libdir}/libedata-book-%{apiver}.so.20
356 %attr(755,root,root) %{_libdir}/libedata-cal-%{apiver}.so.*.*.*
357 %attr(755,root,root) %ghost %{_libdir}/libedata-cal-%{apiver}.so.23
358 %attr(755,root,root) %{_libdir}/libedataserver-%{apiver}.so.*.*.*
359 %attr(755,root,root) %ghost %{_libdir}/libedataserver-%{apiver}.so.18
360 %{_libdir}/girepository-1.0/EBook-%{apiver}.typelib
361 %{_libdir}/girepository-1.0/EBookContacts-%{apiver}.typelib
362 %{_libdir}/girepository-1.0/EDataServer-%{apiver}.typelib
363
364 %files devel
365 %defattr(644,root,root,755)
366 %attr(755,root,root) %{_libdir}/libcamel-%{apiver}.so
367 %attr(755,root,root) %{_libdir}/libebackend-%{apiver}.so
368 %attr(755,root,root) %{_libdir}/libebook-%{apiver}.so
369 %attr(755,root,root) %{_libdir}/libebook-contacts-%{apiver}.so
370 %attr(755,root,root) %{_libdir}/libecal-%{apiver}.so
371 %attr(755,root,root) %{_libdir}/libedata-book-%{apiver}.so
372 %attr(755,root,root) %{_libdir}/libedata-cal-%{apiver}.so
373 %attr(755,root,root) %{_libdir}/libedataserver-%{apiver}.so
374 %{_includedir}/evolution-data-server
375 %{_pkgconfigdir}/camel-%{apiver}.pc
376 %{_pkgconfigdir}/evolution-data-server-%{apiver}.pc
377 %{_pkgconfigdir}/libebackend-%{apiver}.pc
378 %{_pkgconfigdir}/libebook-%{apiver}.pc
379 %{_pkgconfigdir}/libebook-contacts-%{apiver}.pc
380 %{_pkgconfigdir}/libecal-%{apiver}.pc
381 %{_pkgconfigdir}/libedata-book-%{apiver}.pc
382 %{_pkgconfigdir}/libedata-cal-%{apiver}.pc
383 %{_pkgconfigdir}/libedataserver-%{apiver}.pc
384 %{_datadir}/gir-1.0/EBook-%{apiver}.gir
385 %{_datadir}/gir-1.0/EBookContacts-%{apiver}.gir
386 %{_datadir}/gir-1.0/EDataServer-%{apiver}.gir
387
388 %if %{with static_libs}
389 %files static
390 %defattr(644,root,root,755)
391 %{_libdir}/libcamel-%{apiver}.a
392 %{_libdir}/libebackend-%{apiver}.a
393 %{_libdir}/libebook-%{apiver}.a
394 %{_libdir}/libebook-contacts-%{apiver}.a
395 %{_libdir}/libecal-%{apiver}.a
396 %{_libdir}/libedata-book-%{apiver}.a
397 %{_libdir}/libedata-cal-%{apiver}.a
398 %{_libdir}/libedataserver-%{apiver}.a
399 %endif
400
401 %if %{with apidocs}
402 %files apidocs
403 %defattr(644,root,root,755)
404 %{_gtkdocdir}/camel
405 %{_gtkdocdir}/libebackend
406 %{_gtkdocdir}/libebook
407 %{_gtkdocdir}/libebook-contacts
408 %{_gtkdocdir}/libecal
409 %{_gtkdocdir}/libedata-book
410 %{_gtkdocdir}/libedata-cal
411 %{_gtkdocdir}/libedataserver
412 %endif
413
414 %if %{with vala}
415 %files -n vala-evolution-data-server
416 %defattr(644,root,root,755)
417 %{_datadir}/vala/vapi/libebook-%{apiver}.deps
418 %{_datadir}/vala/vapi/libebook-%{apiver}.vapi
419 %{_datadir}/vala/vapi/libebook-contacts-%{apiver}.deps
420 %{_datadir}/vala/vapi/libebook-contacts-%{apiver}.vapi
421 %{_datadir}/vala/vapi/libedataserver-%{apiver}.deps
422 %{_datadir}/vala/vapi/libedataserver-%{apiver}.vapi
423 %endif
This page took 0.105458 seconds and 3 git commands to generate.