OBS: add mingw32 build to RPM SPEC file
[siplcs.git] / contrib / opensuse-build-service / pidgin-sipe.spec
blobbe08372c23a05a9a593295a7f1acf67a287a81d8
2 # OBS SPEC file to generate a RPM for pidgin-sipe.
3 # It should work on Fedora 9/10/11/12, openSUSE 11.x, RHEL5/CentOS 5, SLES/D 11 and Mandriva 2009.1/2010.
6 # Check for mingw32 cross compilation build
8 # Manually add this repository to your private OBS project:
10 # <repository name="mingw32">
11 # <path repository="openSUSE_11.3" project="windows:mingw:win32"/>
12 # <arch>i586</arch>
13 # </repository>
15 # You might need to add & build mingw-pidgin package too.
17 %if "%{_repository}" == "mingw32"
18 %define purple_sipe_mingw32 1
19 %define __strip %{_mingw32_strip}
20 %define __objdump %{_mingw32_objdump}
21 %define _use_internal_dependency_generator 0
22 %define __find_requires %{_mingw32_findrequires}
23 %define __find_provides %{_mingw32_findprovides}
24 %define __os_install_post %{_mingw32_debug_install_post} \
25 %{_mingw32_install_post}
26 %endif
28 %define purple_plugin libpurple-plugin-sipe
30 %define purple_develname libpurple-devel
32 %if 0%{?mdkversion} >= 200910
33 %ifarch x86_64
34 %define purple_develname lib64purple-devel
35 %endif
36 %if 0%{?mdkversion} >= 201000
37 %ifnarch x86_64
38 %define has_libnice 1
39 %endif
40 %endif
41 %endif
43 %if 0%{?suse_version}
44 %define nss_develname mozilla-nss-devel
45 %if 0%{?suse_version} >= 1120
46 %define has_libnice 1
47 %endif
48 %else
49 %define nss_develname nss-devel
50 %endif
52 %if 0%{?suse_version} || 0%{?sles_version}
53 %define pkg_group Productivity/Networking/Instant Messenger
54 %endif
55 %if 0%{?fedora}
56 %define pkg_group Applications/Internet
57 %if 0%{?fedora} >= 11
58 %define has_libnice 1
59 %endif
60 %endif
61 %if 0%{?mdkversion}
62 %define pkg_group Networking/Instant messaging
63 %else
64 %define pkg_group Applications/Internet
65 %endif
67 Name: pidgin-sipe
68 Summary: Pidgin protocol plugin to connect to MS Office Communicator
69 Version: 1.11.0
70 Release: 1
71 Source: %{name}-%{version}.tar.gz
72 Group: %{pkg_group}
73 License: GPLv2+
74 URL: http://sipe.sourceforge.net/
76 BuildRoot: %{_tmppath}/%{name}-%{version}-build
78 %if 0%{?purple_sipe_mingw32}
80 # Windows cross-compilation build setup
82 BuildArch: noarch
84 BuildRequires: mingw32-filesystem >= 23
85 BuildRequires: mingw32-cross-gcc
86 BuildRequires: mingw32-cross-binutils
87 BuildRequires: mingw32-libpurple-devel >= 2.4.0
88 BuildRequires: mingw32-glib2-devel >= 2.12.0
89 # Required for successful autoreconf
90 BuildRequires: glib2-devel >= 2.12.0
91 BuildRequires: mingw32-libxml2-devel
92 BuildRequires: pkgconfig
93 BuildRequires: libtool
94 BuildRequires: intltool
95 BuildRequires: mingw32-gettext-runtime
97 # For directory ownership
98 BuildRequires: mingw32-pidgin
99 Requires: %{purple_plugin} = %{?epoch:%{epoch}:}%{version}-%{release}
101 # Handle .debug files
102 %{_mingw32_debug_package}
104 %else
106 # Standard Linux build setup
108 BuildRequires: %{purple_develname} >= 2.4.0
109 BuildRequires: glib2-devel >= 2.12.0
110 BuildRequires: libxml2-devel
111 #BuildRequires: %{nss_develname}
112 BuildRequires: libtool
113 BuildRequires: intltool
114 BuildRequires: gettext-devel
115 %if 0%{?has_libnice:1}
116 BuildRequires: libnice-devel
117 %endif
119 # Configurable components
120 %if !0%{?_without_kerberos:1}
121 BuildRequires: krb5-devel
122 %endif
124 # For directory ownership
125 BuildRequires: pidgin
126 Requires: %{purple_plugin} = %{?epoch:%{epoch}:}%{version}-%{release}
127 Requires: pidgin
128 %if 0%{?sles_version} == 10
129 BuildRequires: gnome-keyring-devel
130 %endif
132 # For OBS's "have choice for" for Fedora 11 (only)
133 %if 0%{?fedora_version} == 11
134 BuildRequires: libproxy-mozjs
135 BuildRequires: PolicyKit-gnome
136 %endif
138 # For OBS's "have choice for" for Mandriva 2010.1 (and up?)
139 %if 0%{?mdkversion} >= 201010
140 BuildRequires: polkit-gnome
141 %endif
143 # End Windows cross-compilation/Linux build setup
144 %endif
147 %description
148 A third-party plugin for the Pidgin multi-protocol instant messenger.
149 It implements the extended version of SIP/SIMPLE used by various products:
151 * Microsoft Office Communications Server (OCS 2007/2007 R2 and newer)
152 * Microsoft Live Communications Server (LCS 2003/2005)
153 * Reuters Messaging
155 With this plugin you should be able to replace your Microsoft Office
156 Communicator client with Pidgin.
158 This package provides the icon set for Pidgin.
161 %package -n %{purple_plugin}
162 Summary: Libpurple protocol plugin to connect to MS Office Communicator
163 Group: %{pkg_group}
164 License: GPLv2+
165 Obsoletes: purple-sipe
167 %description -n %{purple_plugin}
168 A third-party plugin for the Pidgin multi-protocol instant messenger.
169 It implements the extended version of SIP/SIMPLE used by various products:
171 * Microsoft Office Communications Server (OCS 2007/2007 R2 and newer)
172 * Microsoft Live Communications Server (LCS 2003/2005)
173 * Reuters Messaging
175 This package provides the protocol plugin for libpurple clients.
178 %prep
179 %setup -q
181 %build
182 %if 0%{?purple_sipe_mingw32}
184 # Windows cross-compilation build
186 %{?env_options}
187 echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}
188 autoreconf --verbose --install --force
189 MINGW32_LDFLAGS="-Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -lws2_32"
190 %{_mingw32_configure} \
191 --enable-purple \
192 --disable-telepathy
193 %{_mingw32_make} %{_smp_mflags}
195 %else
197 # Standard Linux build
199 %if 0%{?sles_version} == 10
200 export CFLAGS="%optflags -I%{_includedir}/gssapi"
201 %endif
202 %if 0%{?mdkversion}
203 autoreconf --verbose --install --force
204 %endif
205 %configure \
206 --enable-purple \
207 --disable-telepathy
208 make %{_smp_mflags}
209 make %{_smp_mflags} check
211 # End Windows cross-compilation/Linux build setup
212 %endif
215 %install
216 %if 0%{?purple_sipe_mingw32}
218 # Windows cross-compilation install
220 %{_mingw32_makeinstall}
221 rm -f %{buildroot}%{_mingw32_libdir}/purple-2/*.dll.a
223 %else
225 # Standard Linux install
227 %makeinstall
229 # End Windows cross-compilation/Linux build setup
230 %endif
232 find %{buildroot} -type f -name "*.la" -delete -print
233 # SLES11 defines suse_version = 1110
234 %if 0%{?suse_version} && 0%{?suse_version} < 1120
235 rm -r %{buildroot}/%{_datadir}/pixmaps/pidgin/protocols/scalable
236 %endif
237 %find_lang %{name}
240 %clean
241 rm -rf %{buildroot}
244 %files -n %{purple_plugin} -f %{name}.lang
245 %defattr(-,root,root,-)
246 %doc AUTHORS ChangeLog COPYING NEWS README TODO
247 %if 0%{?purple_sipe_mingw32}
248 %{_mingw32_libdir}/purple-2/libsipe.dll
249 %else
250 %{_libdir}/purple-2/libsipe.so
251 %endif
254 %files
255 %defattr(-,root,root,-)
256 %doc AUTHORS COPYING
257 %if 0%{?purple_sipe_mingw32}
258 %{_mingw32_datadir}/pixmaps/pidgin/protocols/*/sipe.png
259 %{_mingw32_datadir}/pixmaps/pidgin/protocols/*/sipe.svg
260 %else
261 %{_datadir}/pixmaps/pidgin/protocols/*/sipe.png
262 # SLES11 defines suse_version = 1110
263 %if !0%{?suse_version} || 0%{?suse_version} >= 1120
264 %{_datadir}/pixmaps/pidgin/protocols/*/sipe.svg
265 %endif
266 %endif
269 %changelog
270 * Fri Oct 15 2010 J. D. User <jduser@noreply.com> 1.11.0-*git*
271 - add mingw32 build configuration
273 * Sun Oct 03 2010 J. D. User <jduser@noreply.com> 1.11.0
274 - update to 1.11.0
276 * Thu Sep 02 2010 J. D. User <jduser@noreply.com> pre-1.11.0-*git*
277 - Mandriva config for OBS has changed
279 * Tue May 04 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
280 - add libnice build information discovered through OBS testing
282 * Mon Apr 12 2010 J. D. User <jduser@noreply.com> 1.10.0-*git*
283 - add NSS build information discovered through OBS testing
285 * Wed Apr 04 2010 pier11 <pier11@operamail.com> 1.10.0
286 - release
288 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
289 - Mandriva has too old libtool version
291 * Fri Apr 02 2010 J. D. User <jduser@noreply.com> pre-1.10.0-*git*
292 - SLE11, openSUSE 11.0/1 don't have pidgin/protocols/scalable directory
294 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.10.0-*git*
295 - OBS tests of pre-1.10.0 git-snapshot 4fa20cd65e5be0e469d4aa55d861f11c5b08b816
297 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
298 - added --enable/--disable build options
300 * Sun Mar 28 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
301 - removed --with-krb5 configure option as it is autodetected now
303 * Tue Mar 23 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
304 - add SVG icon
306 * Sat Mar 20 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
307 - add BR glib2-devel >= 2.12.0
309 * Wed Mar 17 2010 J. D. User <jduser@noreply.com> 1.9.1-*git*
310 - add tests to build
312 * Tue Mar 16 2010 J. D. User <jduser@noreply.com> 1.9.1
313 - update to 1.9.1
315 * Thu Mar 11 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
316 - add BR libxml2-devel
318 * Wed Mar 10 2010 pier11 <pier11@operamail.com> 1.9.0
319 - release
320 - dropped SLE 10 due to libpurple min version increase
321 - updated target distros in comment line
323 * Mon Mar 08 2010 J. D. User <jduser@noreply.com> 1.9.0-*git*
324 - increased libpurple build requisite to >= 2.4.0
326 * Sun Mar 07 2010 pier11 <pier11@operamail.com> pre-1.9.0-*git*
327 - OBS tests of pre-1.9.0 git-snapshot 61ea0856855483b9e18f23a87afe47437e526f0e
329 * Sun Mar 07 2010 J. D. User <jduser@noreply.com> 1.8.1-*git*
330 - sync with RPM SPEC from contrib/rpm
332 * Sun Feb 08 2010 pier11 <pier11@operamail.com> 1.8.0
333 - source is an original 1.8.0 with patch: git(upstream) 9c34cc3557daa3d61a002002492c71d0343c8cae
334 - temp hack - renamed source in spec from .bz2 to .gz as the latter was prepared with the patch.
336 * Sun Nov 22 2009 pier11 <pier11@operamail.com> 1.7.1
337 - reinstated enable-quality-check
339 * Wed Nov 04 2009 John Beranek <john@redux.org.uk> 1.7.0
340 - Spec file modifications to allow SLES/D 10 and Mandriva 2009.1 builds
342 * Tue Nov 03 2009 John Beranek <john@redux.org.uk> 1.7.0
343 - Spec file modifications for openSUSE build service
345 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
346 - move non-Pidgin files to new sub-package purple-sipe
348 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
349 - remove directory for emoticon theme icons
351 * Sun Oct 11 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
352 - libpurple protocol plugins are located under %%{_libdir}/purple-2
354 * Mon Sep 28 2009 J. D. User <jduser@noreply.com> 1.6.3-*git*
355 - added directory for emoticon theme icons
357 * Wed Sep 09 2009 J. D. User <jduser@noreply.com> 1.6.3
358 - update to 1.6.3
360 * Fri Aug 28 2009 J. D. User <jduser@noreply.com> 1.6.2-*git*
361 - reduce libpurple-devel requirement to >= 2.3.1
363 * Mon Aug 24 2009 J. D. User <jduser@noreply.com> 1.6.2
364 - update to 1.6.2
366 * Fri Aug 21 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
367 - reduce libpurple-devel requirement to >= 2.4.1
369 * Mon Aug 17 2009 J. D. User <jduser@noreply.com> 1.6.1-*git*
370 - com_err.h only required for kerberos
372 * Tue Aug 11 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
373 - require libpurple-devel >= 2.5.0
375 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
376 - refactor configure parameters
377 - make kerberos configurable
378 - don't hard code prefix for git builds
380 * Sun Aug 09 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
381 - removed unnecessary zlib-devel
383 * Sat Aug 08 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
384 - fix prefix for git builds
386 * Sat Aug 01 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
387 - append -Wno-unused-parameter for GCC <4.4 compilation errors
389 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
390 - remove duplicate GPL2
392 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
393 - use "--with git" to build from git
394 - corrected download URL for release archive
395 - add missing BR gettext-devel
397 * Wed Jul 29 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
398 - use default rpmbuild CFLAGS also for git builds
399 - merge with SPEC files created by mricon & jberanek
401 * Tue Jul 28 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
402 - initial RPM SPEC example generated