1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
7 # We are using 'temporarily' the windbus project, which is a port of
8 # dbus and dbus-c++ to Windows. At some point it is expected these
9 # will be merged back into the main dbus tree.
11 # In Fedora native, dbus and dbus-c++ are separate packages. Here it
12 # is convenient to combine them into a single specfile / separate sub-
19 Release: 0.2.%{date}svn%{?dist}
20 Summary: MinGW Windows port of DBus
22 License: GPLv2+ or AFL
23 Group: Development/Libraries
24 URL: http://sourceforge.net/projects/windbus
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
27 # svn co https://windbus.svn.sourceforge.net/svnroot/windbus windbus
28 # tar zcf windbus-%{version}-%{date}.tar.gz trunk
29 # tar zcf windbus-c++-%{version}-%{date}.tar.gz dbuscxx
30 Source0: windbus-%{version}-%{date}.tar.gz
31 Source1: windbus-c++-%{version}-%{date}.tar.gz
33 # This patch is extremely hacky, and not upstream.
35 # windbus seems to prefer to use cmake to build instead of the
36 # original dbus autotools. This patch hacks up the autotools
37 # files to work instead. Really instead of just replacing the
38 # *unix*.c files with *win*.c we ought to include both and add
39 # proper #ifdef WIN32...#endif around the code.
40 Patch0: mingw32-dbus-1.2.4-20081031-mingw32.patch
42 # This patch is almost, but not quite working. For some reason
43 # the implementation of _dbus_poll (from the C library above) cannot
44 # be accessed by the C++ library.
45 Patch1: mingw32-dbus-1.2.4-20081031-c++-mingw32.patch
49 BuildRequires: mingw32-filesystem >= 33
50 BuildRequires: mingw32-gcc
51 BuildRequires: mingw32-gcc-c++
52 BuildRequires: mingw32-binutils
53 BuildRequires: mingw32-glib2
54 BuildRequires: mingw32-gtk2
55 BuildRequires: mingw32-gtkmm24
56 BuildRequires: mingw32-expat
57 BuildRequires: libtool, automake, autoconf
59 # This keeps dbus-c++ subpackage happy while building. We have
60 # hacked the Makefile to give the correct location of the libraries.
61 BuildRequires: dbus-devel
67 D-BUS is a system for sending messages between applications. It is
68 used both for the systemwide message bus service, and as a
69 per-user-login-session messaging facility.
73 Summary: MinGW Windows port of DBus
75 Group: Development/Libraries
78 Native C++ bindings for D-Bus for use in C++ programs.
99 # Avoid a test which fails when cross-compiling:
100 export ac_cv_have_abstract_sockets=no
102 # For unknown reasons, the configure script chokes if you
103 # pass --build explicitly. We also need to pass -DDBUS_WIN
105 PKG_CONFIG_PATH="%{_mingw32_libdir}/pkgconfig" \
106 CC="%{_mingw32_cc}" \
107 CFLAGS="%{_mingw32_cflags} -DDBUS_WIN -DDBUS_BUILD_TESTS" \
109 --host=%{_mingw32_host} \
110 --target=%{_mingw32_target} \
111 --prefix=%{_mingw32_prefix} \
117 %{_mingw32_configure}
118 # XXX Does not quite work yet.
124 rm -rf $RPM_BUILD_ROOT
126 make DESTDIR=$RPM_BUILD_ROOT install
129 # Remove static libraries but DON'T remove *.dll.a files.
130 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libdbus-1.a
132 # Remove manpages because they duplicate what's in the
133 # Fedora native package already.
134 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man1
138 rm -rf $RPM_BUILD_ROOT
142 %defattr(-,root,root)
143 %{_mingw32_bindir}/dbus-daemon.exe
144 %{_mingw32_bindir}/i686-pc-mingw32-dbus-monitor.exe
145 %{_mingw32_bindir}/i686-pc-mingw32-dbus-send.exe
146 %{_mingw32_bindir}/libdbus-1-3.dll
147 %{_mingw32_libdir}/dbus-1.0/
148 %{_mingw32_libdir}/libdbus-1.dll.a
149 %{_mingw32_libdir}/libdbus-1.la
150 %{_mingw32_libdir}/pkgconfig/dbus-1.pc
151 %{_mingw32_sysconfdir}/dbus-1/
152 %{_mingw32_sysconfdir}/rc.d/init.d/i686-pc-mingw32-messagebus
153 %{_mingw32_includedir}/dbus-1.0/
157 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-0.2.20081031svn
158 - Requires pkgconfig.
160 * Mon Nov 3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-0.1.20081031svn
161 - Initial RPM release.