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}
10 Summary: XQilla is an XQuery and XPath 2.0 library, built on top of Xerces-C
13 Group: Development/Libraries
15 URL: http://xqilla.sourceforge.net/HomePage
16 Source0: http://downloads.sourceforge.net/xqilla/XQilla-%{version}.tar.gz
17 Source1: http://www.apache.org/dist/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz
19 # Patch from Xerces-C.
20 Patch1000: xerces-c-dllwrap.patch
22 # Use ifdef WIN32 instead of MSVC-specific tests.
23 Patch1001: xqilla-xmark-test-win32.patch
25 # XQC (the C API) does not work. The library part compiles OK but for
26 # reasons unknown the symbols never get added to the libxqilla.dll.a
27 # implib. The patch disables those sample programs.
28 Patch1002: xqilla-no-xqc-tests.patch
30 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
33 BuildRequires: mingw32-filesystem >= 35
34 BuildRequires: mingw32-gcc
35 BuildRequires: mingw32-gcc-c++
36 BuildRequires: mingw32-binutils
38 BuildRequires: mingw32-xerces-c >= 2.8.0
40 BuildRequires: autoconf, automake, libtool
41 BuildRequires: doxygen, graphviz
45 XQilla is an XQuery and XPath 2.0 implementation written in C++ and based
46 on Xerces-C. It implements the DOM 3 XPath API, as well as having it's own
47 more powerful API. It conforms to the W3C proposed recomendation of XQuery
52 %setup -q -a 1 -n XQilla-%{version}
54 pushd xerces-c-src_2_8_0
63 # XQilla requires a _built_ copy of Xerces-C. Thus we have to build
64 # one first, copying much of the code from 'mingw32-xerces-c.spec'.
65 # Native Fedora package instead patches the configure script to look
66 # at the installed copy.
67 pushd xerces-c-src_2_8_0
68 export XERCESCROOT="$PWD"
69 cd $XERCESCROOT/src/xercesc
70 CXXFLAGS="%{_mingw32_cflags}" \
71 CFLAGS="%{_mingw32_cflags}" \
80 -P %{_mingw32_prefix} \
81 -C --libdir="%{_mingw32_libdir}" -C --host=%{_mingw32_host}
82 %{__make} DLLWRAP=%{_mingw32_dllwrap}
87 libtoolize --force --copy
88 automake --add-missing --copy --force
91 MINGW32_CFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \
92 MINGW32_CXXFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \
93 %{_mingw32_configure} \
96 --with-xerces=$(pwd)/xerces-c-src_2_8_0
101 rm -rf $RPM_BUILD_ROOT
103 export CPPROG="cp -p"
104 make install DESTDIR=$RPM_BUILD_ROOT
105 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';'
106 mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
107 cp -pr ChangeLog LICENSE $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
108 cp -pr docs/dom3-api docs/simple-api \
109 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
110 for file in `find $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}`; do\
111 if ! [ -s "$file" ]; then rm -f "$file"; fi;
116 rm -rf $RPM_BUILD_ROOT
120 %defattr(-,root,root)
122 %{_mingw32_bindir}/i686-pc-mingw32-xqilla.exe
123 %{_mingw32_bindir}/libxqilla-5.dll
124 %{_mingw32_libdir}/libxqilla.dll.a
125 %{_mingw32_includedir}/xqc.h
126 %{_mingw32_includedir}/xqilla/
130 * Wed Feb 18 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-1
131 - Initial RPM release.