Release 1.13.2 -- Bug Fixes II
[siplcs.git] / contrib / opensuse-build-service / pidgin-sipe.spec
blob074827a8919fe504818a0f04ef6d9544e389c08b
2 # OBS SPEC file to generate a RPM for pidgin-sipe.
4 # It has support for:
6 # RedHat family (CentOS, Fedora, RHEL)
7 # Mandriva
8 # SUSE family (openSUSE, SLED, SLES)
9 # Windows (mingw32, mingw64)
12 # Build options
13 %define build_telepathy 0
15 # Check for mingw32 cross compilation build
17 # Manually add this repository to your private OBS project:
19 # <repository name="mingw32">
20 # <path repository="openSUSE_11.4" project="windows:mingw:win32"/>
21 # <arch>i586</arch>
22 # </repository>
24 %if "%{_repository}" == "mingw32"
25 %define purple_sipe_mingw32 1
26 %define mingw_prefix mingw32-
27 %define mingw_cache %{_mingw32_cache}
28 %define mingw_configure %{_mingw32_configure}
29 %define mingw_datadir %{_mingw32_datadir}
30 %define mingw_debug_package %{_mingw32_debug_package}
31 %define mingw_ldflags MINGW32_LDFLAGS
32 %define mingw_libdir %{_mingw32_libdir}
33 %define mingw_make %{_mingw32_make}
34 %define mingw_makeinstall %{_mingw32_makeinstall}
35 %define __strip %{_mingw32_strip}
36 %define __objdump %{_mingw32_objdump}
37 %define _use_internal_dependency_generator 0
38 %define __find_requires %{_mingw32_findrequires}
39 %define __find_provides %{_mingw32_findprovides}
40 %define __os_install_post %{_mingw32_debug_install_post} \
41 %{_mingw32_install_post}
42 %endif
44 # Check for mingw64 cross compilation build
46 # Manually add this repository to your private OBS project:
48 # <repository name="mingw64">
49 # <path repository="openSUSE_11.4" project="windows:mingw:win64"/>
50 # <arch>i586</arch>
51 # </repository>
53 %if "%{_repository}" == "mingw64"
54 %define purple_sipe_mingw64 1
55 %define mingw_prefix mingw64-
56 %define mingw_cache %{_mingw64_cache}
57 %define mingw_configure %{_mingw64_configure}
58 %define mingw_datadir %{_mingw64_datadir}
59 %define mingw_debug_package %{_mingw64_debug_package}
60 %define mingw_ldflags MINGW64_LDFLAGS
61 %define mingw_libdir %{_mingw64_libdir}
62 %define mingw_make %{_mingw64_make}
63 %define mingw_makeinstall %{_mingw64_makeinstall}
64 %define __strip %{_mingw64_strip}
65 %define __objdump %{_mingw64_objdump}
66 %define _use_internal_dependency_generator 0
67 %define __find_requires %{_mingw64_findrequires}
68 %define __find_provides %{_mingw64_findprovides}
69 %define __os_install_post %{_mingw64_debug_install_post} \
70 %{_mingw64_install_post}
71 %endif
73 %define purple_plugin %{?mingw_prefix:%{mingw_prefix}}libpurple-plugin-sipe
74 %define telepathy_plugin %{?mingw_prefix:%{mingw_prefix}}telepathy-plugin-sipe
75 %define nsis_package %{?mingw_prefix:%{mingw_prefix}}pidgin-sipe-nsis
78 %define purple_develname libpurple-devel
80 %if 0%{?mdkversion} >= 200910
81 %ifarch x86_64
82 %define purple_develname lib64purple-devel
83 %endif
84 %if 0%{?mdkversion} >= 201000
85 %ifnarch x86_64
86 %define has_libnice 1
87 %endif
88 %endif
89 %endif
91 %if 0%{?suse_version}
92 %define nss_develname mozilla-nss-devel
93 %if 0%{?suse_version} >= 1120
94 %define has_libnice 1
95 %if 0%{?suse_version} > 1140
96 %define has_gstreamer 1
97 %endif
98 %endif
99 %else
100 %define nss_develname nss-devel
101 %endif
103 %if 0%{?suse_version} || 0%{?sles_version}
104 %define pkg_group Productivity/Networking/Instant Messenger
105 %endif
106 %if 0%{?fedora}
107 %define pkg_group Applications/Internet
108 %define has_gmime 1
109 %if 0%{?fedora} >= 11
110 %define has_libnice 1
111 %if 0%{?fedora} >= 15
112 %define has_gstreamer 1
113 %endif
114 %endif
115 %endif
116 %if 0%{?mdkversion}
117 %define pkg_group Networking/Instant messaging
118 %else
119 %define pkg_group Applications/Internet
120 %endif
122 %if 0%{?purple_sipe_mingw32}
123 Name: mingw32-pidgin-sipe
124 %else
125 %if 0%{?purple_sipe_mingw64}
126 Name: mingw64-pidgin-sipe
127 %else
128 Name: pidgin-sipe
129 %endif
130 %endif
131 Summary: Pidgin protocol plugin to connect to MS Office Communicator
132 Version: 1.13.2
133 Release: 1
134 Source: pidgin-sipe-%{version}.tar.gz
135 Group: %{pkg_group}
136 License: GPL-2.0+
137 URL: http://sipe.sourceforge.net/
139 BuildRoot: %{_tmppath}/%{name}-%{version}-build
141 %if 0%{?mingw_prefix:1}
143 # Windows cross-compilation build setup
145 BuildArch: noarch
146 #!BuildIgnore: post-build-checks
148 BuildRequires: %{mingw_prefix}filesystem >= 23
149 BuildRequires: %{mingw_prefix}cross-gcc
150 BuildRequires: %{mingw_prefix}cross-binutils
151 BuildRequires: %{mingw_prefix}gettext-runtime
152 BuildRequires: %{mingw_prefix}cross-pkg-config
153 BuildRequires: %{mingw_prefix}glib2-devel >= 2.12.0
154 BuildRequires: %{mingw_prefix}libxml2-devel
155 BuildRequires: %{mingw_prefix}mozilla-nss-devel
156 BuildRequires: %{mingw_prefix}libpurple-devel >= 2.4.0
157 BuildRequires: %{mingw_prefix}cross-nsis
159 # For directory ownership
160 BuildRequires: %{mingw_prefix}pidgin
162 %else
164 # Standard Linux build setup
166 BuildRequires: %{purple_develname} >= 2.4.0
167 BuildRequires: libxml2-devel
168 BuildRequires: %{nss_develname}
169 BuildRequires: gettext-devel
170 %if 0%{?has_gmime:1}
171 BuildRequires: gmime-devel
172 %endif
173 # The following two are required to enable Voice & Video features
174 %if 0%{?has_libnice:1}
175 BuildRequires: libnice-devel
176 %endif
177 %if 0%{?has_gstreamer:1}
178 BuildRequires: gstreamer-devel
179 %endif
181 # Configurable components
182 %if !0%{?_without_kerberos:1}
183 BuildRequires: krb5-devel
184 %endif
186 # For directory ownership
187 BuildRequires: pidgin
188 %if %{build_telepathy}
189 BuildRequires: pkgconfig(telepathy-glib)
190 %endif
191 Requires: pidgin
192 %if 0%{?sles_version} == 10
193 BuildRequires: gnome-keyring-devel
194 %endif
196 # For OBS's "have choice for" for Fedora 11 (only)
197 %if 0%{?fedora_version} == 11
198 BuildRequires: libproxy-mozjs
199 BuildRequires: PolicyKit-gnome
200 %endif
202 # For OBS's "have choice for" for Mandriva 2010.1 (and up?)
203 %if 0%{?mdkversion} >= 201010
204 BuildRequires: polkit-gnome
205 %endif
207 # For OBS's "have choice for" for Mandriva 2011 (and up?)
208 %if 0%{?mdkversion} >= 201100
209 BuildRequires: packagekit-gstreamer-plugin
210 BuildRequires: gnome-packagekit-common
211 %endif
213 # End Windows cross-compilation/Linux build setup
214 %endif
216 Requires: %{purple_plugin} = %{?epoch:%{epoch}:}%{version}-%{release}
217 BuildRequires: libtool
218 BuildRequires: intltool
219 BuildRequires: glib2-devel >= 2.12.0
222 %description
223 A third-party plugin for the Pidgin multi-protocol instant messenger.
224 It implements the extended version of SIP/SIMPLE used by various products:
226 * Microsoft Lync Server 2010
227 * Microsoft Office Communications Server (OCS 2007/2007 R2)
228 * Microsoft Live Communications Server (LCS 2003/2005)
229 * Reuters Messaging
231 With this plugin you should be able to replace your Microsoft Office
232 Communicator client with Pidgin.
234 This package provides the icon set for Pidgin.
237 %package -n %{purple_plugin}
238 Summary: Libpurple protocol plugin to connect to MS Office Communicator
239 Group: %{pkg_group}
240 License: GPL-2.0+
241 Obsoletes: purple-sipe
243 %description -n %{purple_plugin}
244 A third-party plugin for the Pidgin multi-protocol instant messenger.
245 It implements the extended version of SIP/SIMPLE used by various products:
247 * Microsoft Lync Server 2010
248 * Microsoft Office Communications Server (OCS 2007/2007 R2)
249 * Microsoft Live Communications Server (LCS 2003/2005)
250 * Reuters Messaging
252 This package provides the protocol plugin for libpurple clients.
255 %if %{build_telepathy}
256 %package -n %{telepathy_plugin}
257 Summary: Telepathy connection manager for MS Office Communicator
258 Group: %{pkg_group}
259 License: GPL-2.0+
261 %description -n %{telepathy_plugin}
262 A third-party plugin for the Pidgin multi-protocol instant messenger.
263 It implements the extended version of SIP/SIMPLE used by various products:
265 * Microsoft Lync Server 2010
266 * Microsoft Office Communications Server (OCS 2007/2007 R2)
267 * Microsoft Live Communications Server (LCS 2003/2005)
268 * Reuters Messaging
270 This package provides the connection manager for the telepathy multi-protocol
271 instant messaging core.
272 %endif
275 %if 0%{?mingw_prefix:1}
276 %package -n %{nsis_package}
277 Summary: Windows Pidgin protocol plugin to connect to MS Office Communicator
278 Group: %{pkg_group}
279 License: GPL-2.0+
281 %description -n %{nsis_package}
282 A third-party plugin for the Pidgin multi-protocol instant messenger.
283 It implements the extended version of SIP/SIMPLE used by various products:
285 * Microsoft Lync Server 2010
286 * Microsoft Office Communications Server (OCS 2007/2007 R2)
287 * Microsoft Live Communications Server (LCS 2003/2005)
288 * Reuters Messaging
290 This package contains the NSIS installer package of the protocol plugin
291 for Pidgin on Windows.
292 %endif
295 %{mingw_debug_package}
298 %prep
299 %setup -q -n pidgin-sipe-%{version}
301 %build
302 %if 0%{?mingw_prefix:1}
304 # Windows cross-compilation build
306 %{?env_options}
307 echo "lt_cv_deplibs_check_method='pass_all'" >>%{mingw_cache}
308 autoreconf --verbose --install --force
309 %{mingw_ldflags}="-Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -lws2_32"
310 %{mingw_configure} \
311 --enable-purple \
312 %if %{build_telepathy}
313 --enable-telepathy
314 %else
315 --disable-telepathy
316 %endif
317 %{mingw_make} %{_smp_mflags} || %{mingw_make}
319 %else
321 # Standard Linux build
323 %if 0%{?sles_version} == 10
324 export CFLAGS="%optflags -I%{_includedir}/gssapi"
325 %endif
326 %if 0%{?mdkversion}
327 autoreconf --verbose --install --force
328 %endif
329 %configure \
330 --enable-purple \
331 %if %{build_telepathy}
332 --enable-telepathy
333 %else
334 --disable-telepathy
335 %endif
336 make %{_smp_mflags}
337 make %{_smp_mflags} check
339 # End Windows cross-compilation/Linux build setup
340 %endif
343 %install
344 %if 0%{?mingw_prefix:1}
346 # Windows cross-compilation install
348 %{mingw_makeinstall}
349 rm -f %{buildroot}%{mingw_libdir}/purple-2/*.dll.a
351 # generate NSIS installer package
352 perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \
353 <contrib/opensuse-build-service/pidgin-sipe.nsi.template \
354 >%{buildroot}/pidgin-sipe.nsi
356 set -e; \
357 cd %{buildroot}; \
358 makensis \
359 -DVERSION=%{version} \
360 -DMINGW_LIBDIR=%{buildroot}%{mingw_libdir} \
361 -DMINGW_DATADIR=%{buildroot}%{mingw_datadir} \
362 pidgin-sipe.nsi \
364 rm -f %{buildroot}/pidgin-sipe.nsi
366 %else
368 # Standard Linux install
370 %makeinstall
372 # End Windows cross-compilation/Linux build setup
373 %endif
375 find %{buildroot} -type f -name "*.la" -delete -print
376 # SLES11 defines suse_version = 1110
377 %if 0%{?suse_version} && 0%{?suse_version} < 1120
378 rm -r %{buildroot}/%{_datadir}/pixmaps/pidgin/protocols/scalable
379 %endif
380 %find_lang pidgin-sipe
383 %clean
384 rm -rf %{buildroot}
387 %files -n %{purple_plugin} -f pidgin-sipe.lang
388 %defattr(-,root,root,-)
389 %doc AUTHORS ChangeLog COPYING NEWS README TODO
390 %if 0%{?mingw_prefix:1}
391 %{mingw_libdir}/purple-2/libsipe.dll
392 %else
393 %{_libdir}/purple-2/libsipe.so
394 %endif
397 %files
398 %defattr(-,root,root,-)
399 %doc AUTHORS COPYING
400 %if 0%{?mingw_prefix:1}
401 %{mingw_datadir}/pixmaps/pidgin/protocols/*/sipe.png
402 %{mingw_datadir}/pixmaps/pidgin/protocols/*/sipe.svg
403 %else
404 %{_datadir}/pixmaps/pidgin/protocols/*/sipe.png
405 # SLES11 defines suse_version = 1110
406 %if !0%{?suse_version} || 0%{?suse_version} >= 1120
407 %{_datadir}/pixmaps/pidgin/protocols/*/sipe.svg
408 %endif
409 %endif
412 %if %{build_telepathy}
413 %files -n %{telepathy_plugin}
414 %defattr(-, root, root)
415 %{_libexecdir}/telepathy-sipe
416 %endif
419 %if 0%{?mingw_prefix:1}
420 %files -n %{nsis_package}
421 %defattr(-, root, root)
422 /pidgin-sipe-%{version}.exe
423 %endif
426 %changelog
427 * Sun Jun 10 2012 J. D. User <jduser@noreply.com> 1.13.2
428 - update to 1.13.2
430 * Mon Apr 09 2012 J. D. User <jduser@noreply.com> 1.13.1
431 - update to 1.13.1
433 * Wed Mar 14 2012 J. D. User <jduser@noreply.com> 1.13.0
434 - update to 1.13.0
436 * Mon Dec 12 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
437 - we do support Microsoft Lync Server 2010 now.
439 * Tue Dec 06 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
440 - update GPL2 license name
442 * Sat Nov 12 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
443 - add BR gmime-devel for Fedora to have at least one verification platform
445 * Sun Nov 06 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
446 - fix Mandriva 2011 unresolvable BR
448 * Mon Oct 31 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
449 - add BR nss-devel
451 * Sat Oct 01 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
452 - add NSIS package for mingw builds
454 * Sat Oct 01 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
455 - add mingw64 build
457 * Wed Sep 28 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
458 - remove BR mingw32-mozilla-nss-devel, not needed for SSPI.
460 * Mon Sep 19 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
461 - update mingw32 build
462 - update descriptions
464 * Mon Aug 29 2011 J. D. User <jduser@noreply.com> 1.12.0
465 - update to 1.12.0
467 * Wed Jun 22 2011 J. D. User <jduser@noreply.com> 1.11.2-*git*
468 - add gstreamer-devel to enable Voice & Video features
470 * Sat Dec 11 2010 J. D. User <jduser@noreply.com> 1.11.2-*git*
471 - add optional subpackage for telepathy connection manager
473 * Tue Nov 02 2010 J. D. User <jduser@noreply.com> 1.11.2
474 - update to 1.11.2
476 * Sun Oct 24 2010 J. D. User <jduser@noreply.com> 1.11.1
477 - update to 1.11.1
479 * Fri Oct 15 2010 J. D. User <jduser@noreply.com> 1.11.0-*git*
480 - add mingw32 build configuration
482 * Sun Oct 03 2010 J. D. User <jduser@noreply.com> 1.11.0
483 - update to 1.11.0
485 * Thu Sep 02 2010 J. D. User <jduser@noreply.com> pre-1.11.0-*git*
486 - Mandriva config for OBS has changed
488 * Tue May 04 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
489 - add libnice build information discovered through OBS testing
491 * Mon Apr 12 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
492 - add NSS build information discovered through OBS testing
494 * Wed Apr 04 2010 pier11 <pier11@operamail.com> 1.10.0
495 - release
497 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
498 - Mandriva has too old libtool version
500 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
501 - SLE11, openSUSE 11.0/1 don't have pidgin/protocols/scalable directory
503 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.10.0-*git*
504 - OBS tests of pre-1.10.0 git-snapshot 4fa20cd65e5be0e469d4aa55d861f11c5b08b816
506 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
507 - added --enable/--disable build options
509 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
510 - removed --with-krb5 configure option as it is autodetected now
512 * Tue Mar 23 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
513 - add SVG icon
515 * Sat Mar 20 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
516 - add BR glib2-devel >= 2.12.0
518 * Wed Mar 17 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
519 - add tests to build
521 * Tue Mar 16 2010 J. D. User <jduser@noreply.com> 1.9.1
522 - update to 1.9.1
524 * Thu Mar 11 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
525 - add BR libxml2-devel
527 * Wed Mar 10 2010 pier11 <pier11@operamail.com> 1.9.0
528 - release
529 - dropped SLE 10 due to libpurple min version increase
530 - updated target distros in comment line
532 * Mon Mar 08 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
533 - increased libpurple build requisite to >= 2.4.0
535 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.9.0-*git*
536 - OBS tests of pre-1.9.0 git-snapshot 61ea0856855483b9e18f23a87afe47437e526f0e
538 * Sun Mar 07 2010 J. D. User <jduser@noreply.com> 1.8.1-*git*
539 - sync with RPM SPEC from contrib/rpm
541 * Sun Feb 08 2010 pier11 <pier11@operamail.com> 1.8.0
542 - source is an original 1.8.0 with patch: git(upstream) 9c34cc3557daa3d61a002002492c71d0343c8cae
543 - temp hack - renamed source in spec from .bz2 to .gz as the latter was prepared with the patch.
545 * Sun Nov 22 2009 pier11 <pier11@operamail.com> 1.7.1
546 - reinstated enable-quality-check
548 * Wed Nov 04 2009 John Beranek <john@redux.org.uk> 1.7.0
549 - Spec file modifications to allow SLES/D 10 and Mandriva 2009.1 builds
551 * Tue Nov 03 2009 John Beranek <john@redux.org.uk> 1.7.0
552 - Spec file modifications for openSUSE build service
554 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
555 - move non-Pidgin files to new sub-package purple-sipe
557 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
558 - remove directory for emoticon theme icons
560 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
561 - libpurple protocol plugins are located under %%{_libdir}/purple-2
563 * Mon Sep 28 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
564 - added directory for emoticon theme icons
566 * Wed Sep 09 2009 J. D. User <jduser@noreply.com> 1.6.3
567 - update to 1.6.3
569 * Fri Aug 28 2009 J. D. User <jduser@noreply.com> 1.6.2-*git*
570 - reduce libpurple-devel requirement to >= 2.3.1
572 * Mon Aug 24 2009 J. D. User <jduser@noreply.com> 1.6.2
573 - update to 1.6.2
575 * Fri Aug 21 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
576 - reduce libpurple-devel requirement to >= 2.4.1
578 * Mon Aug 17 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
579 - com_err.h only required for kerberos
581 * Tue Aug 11 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
582 - require libpurple-devel >= 2.5.0
584 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
585 - refactor configure parameters
586 - make kerberos configurable
587 - don't hard code prefix for git builds
589 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
590 - removed unnecessary zlib-devel
592 * Sat Aug 08 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
593 - fix prefix for git builds
595 * Sat Aug 01 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
596 - append -Wno-unused-parameter for GCC <4.4 compilation errors
598 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
599 - remove duplicate GPL2
601 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
602 - use "--with git" to build from git
603 - corrected download URL for release archive
604 - add missing BR gettext-devel
606 * Wed Jul 29 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
607 - use default rpmbuild CFLAGS also for git builds
608 - merge with SPEC files created by mricon & jberanek
610 * Tue Jul 28 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
611 - initial RPM SPEC example generated