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.1.%{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
65 D-BUS is a system for sending messages between applications. It is
66 used both for the systemwide message bus service, and as a
67 per-user-login-session messaging facility.
71 Summary: MinGW Windows port of DBus
73 Group: Development/Libraries
76 Native C++ bindings for D-Bus for use in C++ programs.
97 # Avoid a test which fails when cross-compiling:
98 export ac_cv_have_abstract_sockets=no
100 # For unknown reasons, the configure script chokes if you
101 # pass --build explicitly. We also need to pass -DDBUS_WIN
103 PKG_CONFIG_PATH="%{_mingw32_libdir}/pkgconfig" \
104 CC="%{_mingw32_cc}" \
105 CFLAGS="%{_mingw32_cflags} -DDBUS_WIN -DDBUS_BUILD_TESTS" \
107 --host=%{_mingw32_host} \
108 --target=%{_mingw32_target} \
109 --prefix=%{_mingw32_prefix} \
115 %{_mingw32_configure}
116 # XXX Does not quite work yet.
122 rm -rf $RPM_BUILD_ROOT
124 make DESTDIR=$RPM_BUILD_ROOT install
127 # Remove static libraries but DON'T remove *.dll.a files.
128 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libdbus-1.a
130 # Remove manpages because they duplicate what's in the
131 # Fedora native package already.
132 rm -r $RPM_BUILD_ROOT%{_mingw32_mandir}/man1
136 rm -rf $RPM_BUILD_ROOT
140 %defattr(-,root,root)
141 %{_mingw32_bindir}/dbus-daemon.exe
142 %{_mingw32_bindir}/i686-pc-mingw32-dbus-monitor.exe
143 %{_mingw32_bindir}/i686-pc-mingw32-dbus-send.exe
144 %{_mingw32_bindir}/libdbus-1-3.dll
145 %{_mingw32_libdir}/dbus-1.0/
146 %{_mingw32_libdir}/libdbus-1.dll.a
147 %{_mingw32_libdir}/libdbus-1.la
148 %{_mingw32_libdir}/pkgconfig/dbus-1.pc
149 %{_mingw32_sysconfdir}/dbus-1/
150 %{_mingw32_sysconfdir}/rc.d/init.d/i686-pc-mingw32-messagebus
151 %{_mingw32_includedir}/dbus-1.0/
156 * Mon Nov 3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-0.1.20081031svn
157 - Initial RPM release.