Release 1.13.1 -- Bug Fixes I
[siplcs.git] / contrib / opensuse-build-service / pidgin-sipe.spec
blob8f04a82b7e2bd91814e4c0d1d9ef8bafd6779dbd
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.1
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 * Mon Apr 09 2012 J. D. User <jduser@noreply.com> 1.13.1
428 - update to 1.13.1
430 * Wed Mar 14 2012 J. D. User <jduser@noreply.com> 1.13.0
431 - update to 1.13.0
433 * Mon Dec 12 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
434 - we do support Microsoft Lync Server 2010 now.
436 * Tue Dec 06 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
437 - update GPL2 license name
439 * Sat Nov 12 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
440 - add BR gmime-devel for Fedora to have at least one verification platform
442 * Sun Nov 06 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
443 - fix Mandriva 2011 unresolvable BR
445 * Mon Oct 31 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
446 - add BR nss-devel
448 * Sat Oct 01 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
449 - add NSIS package for mingw builds
451 * Sat Oct 01 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
452 - add mingw64 build
454 * Wed Sep 28 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
455 - remove BR mingw32-mozilla-nss-devel, not needed for SSPI.
457 * Mon Sep 19 2011 J. D. User <jduser@noreply.com> 1.12.0-*git*
458 - update mingw32 build
459 - update descriptions
461 * Mon Aug 29 2011 J. D. User <jduser@noreply.com> 1.12.0
462 - update to 1.12.0
464 * Wed Jun 22 2011 J. D. User <jduser@noreply.com> 1.11.2-*git*
465 - add gstreamer-devel to enable Voice & Video features
467 * Sat Dec 11 2010 J. D. User <jduser@noreply.com> 1.11.2-*git*
468 - add optional subpackage for telepathy connection manager
470 * Tue Nov 02 2010 J. D. User <jduser@noreply.com> 1.11.2
471 - update to 1.11.2
473 * Sun Oct 24 2010 J. D. User <jduser@noreply.com> 1.11.1
474 - update to 1.11.1
476 * Fri Oct 15 2010 J. D. User <jduser@noreply.com> 1.11.0-*git*
477 - add mingw32 build configuration
479 * Sun Oct 03 2010 J. D. User <jduser@noreply.com> 1.11.0
480 - update to 1.11.0
482 * Thu Sep 02 2010 J. D. User <jduser@noreply.com> pre-1.11.0-*git*
483 - Mandriva config for OBS has changed
485 * Tue May 04 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
486 - add libnice build information discovered through OBS testing
488 * Mon Apr 12 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
489 - add NSS build information discovered through OBS testing
491 * Wed Apr 04 2010 pier11 <pier11@operamail.com> 1.10.0
492 - release
494 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
495 - Mandriva has too old libtool version
497 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
498 - SLE11, openSUSE 11.0/1 don't have pidgin/protocols/scalable directory
500 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.10.0-*git*
501 - OBS tests of pre-1.10.0 git-snapshot 4fa20cd65e5be0e469d4aa55d861f11c5b08b816
503 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
504 - added --enable/--disable build options
506 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
507 - removed --with-krb5 configure option as it is autodetected now
509 * Tue Mar 23 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
510 - add SVG icon
512 * Sat Mar 20 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
513 - add BR glib2-devel >= 2.12.0
515 * Wed Mar 17 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
516 - add tests to build
518 * Tue Mar 16 2010 J. D. User <jduser@noreply.com> 1.9.1
519 - update to 1.9.1
521 * Thu Mar 11 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
522 - add BR libxml2-devel
524 * Wed Mar 10 2010 pier11 <pier11@operamail.com> 1.9.0
525 - release
526 - dropped SLE 10 due to libpurple min version increase
527 - updated target distros in comment line
529 * Mon Mar 08 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
530 - increased libpurple build requisite to >= 2.4.0
532 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.9.0-*git*
533 - OBS tests of pre-1.9.0 git-snapshot 61ea0856855483b9e18f23a87afe47437e526f0e
535 * Sun Mar 07 2010 J. D. User <jduser@noreply.com> 1.8.1-*git*
536 - sync with RPM SPEC from contrib/rpm
538 * Sun Feb 08 2010 pier11 <pier11@operamail.com> 1.8.0
539 - source is an original 1.8.0 with patch: git(upstream) 9c34cc3557daa3d61a002002492c71d0343c8cae
540 - temp hack - renamed source in spec from .bz2 to .gz as the latter was prepared with the patch.
542 * Sun Nov 22 2009 pier11 <pier11@operamail.com> 1.7.1
543 - reinstated enable-quality-check
545 * Wed Nov 04 2009 John Beranek <john@redux.org.uk> 1.7.0
546 - Spec file modifications to allow SLES/D 10 and Mandriva 2009.1 builds
548 * Tue Nov 03 2009 John Beranek <john@redux.org.uk> 1.7.0
549 - Spec file modifications for openSUSE build service
551 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
552 - move non-Pidgin files to new sub-package purple-sipe
554 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
555 - remove directory for emoticon theme icons
557 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
558 - libpurple protocol plugins are located under %%{_libdir}/purple-2
560 * Mon Sep 28 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
561 - added directory for emoticon theme icons
563 * Wed Sep 09 2009 J. D. User <jduser@noreply.com> 1.6.3
564 - update to 1.6.3
566 * Fri Aug 28 2009 J. D. User <jduser@noreply.com> 1.6.2-*git*
567 - reduce libpurple-devel requirement to >= 2.3.1
569 * Mon Aug 24 2009 J. D. User <jduser@noreply.com> 1.6.2
570 - update to 1.6.2
572 * Fri Aug 21 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
573 - reduce libpurple-devel requirement to >= 2.4.1
575 * Mon Aug 17 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
576 - com_err.h only required for kerberos
578 * Tue Aug 11 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
579 - require libpurple-devel >= 2.5.0
581 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
582 - refactor configure parameters
583 - make kerberos configurable
584 - don't hard code prefix for git builds
586 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
587 - removed unnecessary zlib-devel
589 * Sat Aug 08 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
590 - fix prefix for git builds
592 * Sat Aug 01 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
593 - append -Wno-unused-parameter for GCC <4.4 compilation errors
595 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
596 - remove duplicate GPL2
598 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
599 - use "--with git" to build from git
600 - corrected download URL for release archive
601 - add missing BR gettext-devel
603 * Wed Jul 29 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
604 - use default rpmbuild CFLAGS also for git builds
605 - merge with SPEC files created by mricon & jberanek
607 * Tue Jul 28 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
608 - initial RPM SPEC example generated