%global archive_version 3.0
%global snapshot 20140621git152f8964c
%global build_php_binding 0
%{?filter_setup:
%filter_provides_in %{python2_sitearch}.*\.so$
%filter_provides_in %{php_extdir}.*\.so$
%filter_provides_in %{_docdir}
%filter_requires_in %{_docdir}
%filter_setup
}
Name: zorba
Version: 3.0.0
Release: 44.%{snapshot}%{?dist}
Summary: General purpose XQuery processor implemented in C++
Group: System Environment/Libraries
# binaries/XQuery modules: ASL 2.0 and BSD
# xsd schema files: W3C
# modules/functx/functx.xq: LGPLv2
License: ASL 2.0 and BSD and W3C and LGPLv2
URL: http://www.zorba-xquery.com
Source0: https://github.com/28msec/zorba/releases/%{name}-%{archive_version}-%{snapshot}.zip
# adapt path to php API wrapper
Patch0: zorba-php-wrapper.patch
Patch1: zorba-binding-names.patch
# add pthread to linker flags in order to build xqdb successfully
Patch2: zorba-pthread.patch
# rhbz#1069294
Patch3: zorba-check-dll_path.patch
# add missing #include statements
Patch4: zorba-missing-includes.patch
# disable PHP bindings due to lacking PHP7 support of swig
Patch5: zorba-no-php-binding.patch
# add missing icu namespace to ICU types
Patch6: zorba-icu-namespace.patch
# added missing include path required to build Java and Python bindings
Patch7: zorba-swig-include.patch
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: flex
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: graphviz-devel
BuildRequires: help2man
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: libcurl-devel
BuildRequires: libedit-devel
BuildRequires: libicu-devel
BuildRequires: libtidy-devel
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel
%if 0%{?build_php_binding}
BuildRequires: php-cli
%endif
BuildRequires: php-devel
BuildRequires: python2-devel
BuildRequires: swig
BuildRequires: tex(dvips)
BuildRequires: tex(latex)
BuildRequires: xerces-c-devel
BuildRequires: xqc
%description
Zorba is a general purpose XQuery processor implementing in C++ the W3C family
of specifications. It is not an XML database. The query processor has been
designed to be embeddable in a variety of environments such as other
programming languages extended with XML processing capabilities, browsers,
database servers, XML message dispatchers, or smart phones. Its architecture
employs a modular design, which allows customizing the Zorba query processor to
the environment's needs. In particular the architecture of the query processor
allows a pluggable XML store (e.g. main memory, DOM stores, persistent
disk-based large stores, S3 stores).
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: cmake
Requires: xqc
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation for the Zorba XQuery processor
Group: Documentation
BuildArch: noarch
%description doc
This package provides documentation for the %{name} command-line client and
the programming APIs.
# Language bindings
%package -n python2-zorba
%{?python_provide:%python_provide python2-zorba}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python language binding for %{name}
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-zorba
This package provides the Python module to use the %{name} API.
%if 0%{?build_php_binding}
%package php
Summary: PHP language binding for %{name}
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
%description php
This package provides the PHP module to use the %{name} API.
%endif
%package java
Summary: Java language binding for %{name}
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: java-headless >= 1:1.6.0
Requires: jpackage-utils
%description java
This package provides the Java module to use the %{name} API.
%prep
%setup -q -n %{name}-%{archive_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# xqc.h is provided by xqc package
rm -f src/include/xqc.h
find \( -name "*.h" -o -name "*.cpp" \) -exec chmod 644 {} \;
# avoid doxygen issue (can't run 'dot' when absolute path is given)
find doc -name 'doxy.config.in' -exec sed -i 's/@DOXYGEN_DOT_EXECUTABLE_PATH@/dot/' {} \;
# Fix detection of unicode/coll.h
sed -i 's|\(CHECK_INCLUDE_FILE\)S\( ("unicode/coll.h"\)|\1_CXX\2|' CMakeLists.txt
# Fix build with newer glibc
sed -i '/# include <xlocale.h>/d' src/util/locale.cpp
%build
mkdir -p build
cd build
# The grammar file fails to compile with bison 3.0.
# Thus, prevent running bison and use the bundled bison output instead.
%cmake -DZORBA_LIB_DIRNAME:STRING='%{_lib}' -DCMAKE_CXX_FLAGS_RELEASE:STRING='-DNDEBUG' -DCMAKE_C_FLAGS_RELEASE='-DNDEBUG' -DBISON_EXECUTABLE=/dummy ..
make VERBOSE=1 %{?_smp_mflags}
make zorbacmd_man
make doc
%install
make install DESTDIR=%{buildroot} INSTALL="install -p" -C build
# move cmake files to cmake module directory
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/
mv %{buildroot}%{_datadir}/cmake/zorba-%{version}/* %{buildroot}%{_datadir}/cmake/Modules/
# move Java extension module to proper directory
mkdir -p %{buildroot}%{_libdir}/zorba-java/
cp -p build/swig/java/zorba_api.jar %{buildroot}%{_libdir}/zorba-java/zorba.jar
mv %{buildroot}%{_datadir}/java/*.so %{buildroot}%{_libdir}/zorba-java/
mv %{buildroot}%{_datadir}/java/zorba_xqj.jar %{buildroot}%{_libdir}/zorba-java/
rm -f %{buildroot}%{_datadir}/java/*
%if 0%{?build_php_binding}
# move PHP extension module to proper directories
mkdir -p %{buildroot}%{php_extdir}
mkdir -p %{buildroot}%{_datadir}/php/zorba
mv %{buildroot}%{_datadir}/php5/*.php %{buildroot}%{_datadir}/php/zorba
mv %{buildroot}%{_datadir}/php5/libzorba_api.so %{buildroot}%{php_extdir}
%endif
# move Python extension module to proper directory
mkdir -p %{buildroot}%{python2_sitearch}
mv %{buildroot}%{_datadir}/python/* %{buildroot}%{python2_sitearch}
# remove rpaths from binaries
chrpath --delete %{buildroot}%{_bindir}/zorba
chrpath --delete %{buildroot}%{_bindir}/testdriver
chrpath --delete %{buildroot}%{_bindir}/xqdb
find %{buildroot} -name "*.so" -exec chrpath --delete {} \;
find %{buildroot} -name "*.so" -exec chmod 755 {} \;
rm -f %{buildroot}%{_includedir}/xqc.h
# move header file to proper location
mv %{buildroot}%{_includedir}/util/curl_streambuf.h %{buildroot}%{_includedir}/zorba/util/
# move docs to temporary directory used in -doc package
mkdir doc.tmp
mv %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/* doc.tmp
rm -rf %{buildroot}/%{_defaultdocdir}/%{name}-%{version}/
rm -f doc.tmp/*.txt
# install man page
install -D -m644 build/doc/zorba.1 %{buildroot}%{_mandir}/man1/zorba.1
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc ChangeLog AUTHORS.txt LICENSE.txt NOTICE.txt README.txt
%{_bindir}/zorba
%{_bindir}/testdriver
%{_bindir}/xqdb
%{_libdir}/libzorba_simplestore.so.*
%{_libdir}/zorba/
%{_libdir}/libutil-curl.so
%{_mandir}/man1/zorba.1*
%dir %{_datadir}/zorba/
%dir %{_datadir}/zorba/uris/
%{_datadir}/zorba/uris/core/
%{_datadir}/zorba/uris/io/
%dir %{_datadir}/zorba-%{version}/
%{_datadir}/zorba-%{version}/fots_driver
%files devel
%{_libdir}/libzorba_simplestore.so
%{_includedir}/zorba/
%{_datadir}/cmake/Modules/*
%files -n python2-zorba
%{python2_sitearch}/_zorba_api.so
%{python2_sitearch}/zorba_api.py*
%if 0%{?build_php_binding}
%files php
%dir %{_datadir}/php/zorba/
%{_datadir}/php/zorba/zorba_api_wrapper.php
%{_datadir}/php/zorba/XQueryProcessor.php
%{php_extdir}/libzorba_api.so
%endif
%files java
%{_libdir}/zorba-java/
%files doc
%doc LICENSE.txt
%doc doc.tmp/*
%changelog
* Thu Mar 21 2019 Martin Gieseking <martin.gieseking@uos.de> - 3.0.0-44.20140621git152f8964c
- Dropped Ruby language bindings.
- Added patch to build Java and Python bindings with current Swig version.
- Fixed installation path of Python module.
* Mon Jul 16 2018 Martin Gieseking <martin.gieseking@uos.de> - 3.0.0-43.20140621git152f8964c
- Added patch that prefixes ICU types with the missing icu namespace.
- Added explicit BR: gcc, gcc-c++.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-42.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 3.0.0-41.20140621git152f8964c
- Rebuild for ICU 62
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 3.0.0-40.20140621git152f8964c
- Rebuild for ICU 61.1
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-39.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Feb 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.0.0-38.20140621git152f8964c
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Jan 05 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.0-37.20140621git152f8964c
- F-28: rebuild for ruby25
* Thu Nov 30 2017 Pete Walter <pwalter@fedoraproject.org> - 3.0.0-36.20140621git152f8964c
- Rebuild for ICU 60.1
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0.0-35.20140621git152f8964c
- Add Provides for the old name without %%_isa
* Thu Aug 10 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0.0-34.20140621git152f8964c
- Python 2 binary package renamed to python2-zorba
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-33.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-32.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 3.0.0-31.20140621git152f8964c
- Rebuild due to bug in RPM (RHBZ #1468476)
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-30.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
* Mon Feb 06 2017 Kalev Lember <klember@redhat.com> - 3.0.0-29.20140621git152f8964c
- Rebuilt for Boost 1.63
* Sun Feb 05 2017 Martin Gieseking <martin.gieseking@uos.de> - 3.0.0-28.20140621git152f8964c
- Rebuilt for Ruby 2.4.0
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 3.0.0-27.20140621git152f8964c
- Rebuilt for Boost 1.63
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-26.20140621git152f8964c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Jul 07 2016 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-25.20140621git152f8964c
- diabled PHP bindings because swig doesn't support PHP7 yet
* Fri Apr 15 2016 David Tardon <dtardon@redhat.com> - 3.0.0-24.20140621git152f8964c
- rebuild for ICU 57.1
* Mon Feb 15 2016 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-23.20140621git152f8964c
- Added missing include statements required by GCC 6
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-22.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Jan 16 2016 Jonathan Wakely <jwakely@redhat.com> - 3.0.0-21.20140621git152f8964c
- Rebuilt for Boost 1.60
* Thu Jan 14 2016 Vít Ondruch <vondruch@redhat.com> - 3.0.0-20.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
* Wed Nov 18 2015 Rex Dieter <rdieter@fedoraproject.org> 3.0.0-19
- rebuild (tidy)
* Wed Oct 28 2015 David Tardon <dtardon@redhat.com> - 3.0.0-18.20140621git152f8964c
- rebuild for ICU 56.1
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 3.0.0-17.20140621git152f8964c
- Rebuilt for Boost 1.59
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-16.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 3.0.0-15.20140621git152f8964c
- rebuild for Boost 1.58
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-14.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.0.0-13.20140621git152f8964c
- Rebuilt for GCC 5 C++11 ABI change
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 3.0.0-12.20140621git152f8964c
- Rebuild for boost 1.57.0
* Sat Jan 17 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.0-11.20140621git152f8964c
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
* Tue Aug 26 2014 David Tardon <dtardon@redhat.com> - 3.0.0-10.20140621git152f8964c
- rebuild for ICU 53.1
* Wed Aug 20 2014 Kevin Fenzi <kevin@scrye.com> - 3.0.0-9.20140621git152f8964c
- Rebuild for rpm bug 1131892
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-8.20140621git152f8964c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 21 2014 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-6.20140621git152f8964c
- Snapshot build to fix another memory issue (https://bugs.launchpad.net/zorba/+bug/1317976)
- Added manpage for zorba binary
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> 3.0.0-6.20140619gitf34ab6d76
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
* Thu Jun 19 2014 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-5.20140619gitf34ab6d76
- Snapshot build to fix several tests
* Thu Jun 19 2014 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-5.20140619git858e97125
- Snapshot build to fix several severe memory issues
* Tue Jun 10 2014 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-4
- https://bugs.launchpad.net/zorba/+bug/1317976
- Applied patch to fix double memory deallocations
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 3.0.0-2
- Rebuild for boost 1.55.0
* Wed Feb 26 2014 Martin Gieseking <martin.gieseking@uos.de> 3.0.0-1
- Updated to release 3.0.0
- Replaced Requires: java with Requires: java-headless
* Tue Feb 25 2014 Kyle McMartin <kyle@redhat.com>
- fix strtok(NULL, ...) on armv7hl and aarch64 (and ppc64 and s390x...)
* Fri Feb 14 2014 David Tardon <dtardon@redhat.com> - 2.9.1-4
- rebuild for new ICU
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 2.9.1-2
- Rebuild for boost 1.54.0
* Mon Jun 17 2013 Martin Gieseking <martin.gieseking@uos.de> 2.9.1-1
- Updated to release 2.9.1.
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 2.8.0-4
- rebuild for http://fedoraproject.org/wiki/Features/Php55
* Mon Mar 18 2013 Vít Ondruch <vondruch@redhat.com> - 2.8.0-3
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
* Fri Mar 15 2013 Martin Gieseking <martin.gieseking@uos.de> 2.8.0-2
- Replaced Requires: ruby(abi) with Requires: ruby(release) according to new guidelines draft
* Thu Mar 14 2013 Martin Gieseking <martin.gieseking@uos.de> 2.8.0-1
- Updated to release 2.8.0.
* Tue Jan 29 2013 Martin Gieseking <martin.gieseking@uos.de> 2.7.0-2
- Rebuilt due to soname bump of libicu.
* Wed Oct 10 2012 Martin Gieseking <martin.gieseking@uos.de> 2.7.0-1
- Updated to new upstream release.
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 15 2012 Martin Gieseking <martin.gieseking@uos.de> 2.5.0-1
- Updated to new upstream release.
- Removed patch that fixed missing includes (has been applied upstream).
* Mon Apr 23 2012 Martin Gieseking <martin.gieseking@uos.de> 2.2.0-3
- Rebuilt due to soname bump of libicu
* Sun Mar 25 2012 Martin Gieseking <martin.gieseking@uos.de> 2.2.0-2
- Update dependency of Ruby ABI to version 1.9.1
* Fri Mar 23 2012 Martin Gieseking <martin.gieseking@uos.de> 2.2.0-1
- Updated to new upstream release
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-5
- Rebuilt for c++ ABI breakage
* Tue Feb 07 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.1.0-4
- Rebuilt for Ruby 1.9.3.
* Thu Jan 19 2012 Remi Collet <remi@fedoraproject.org> - 2.1.0-3
- build against php 5.4
* Wed Jan 04 2012 Martin Gieseking <martin.gieseking@uos.de> 2.1.0-2
- added missing #include <unistd.h> to successfully build the package with gcc 4.7.x
* Sat Dec 10 2011 Martin Gieseking <martin.gieseking@uos.de> 2.1.0-1
- updated to new upstream release
* Sun Nov 13 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.3-1
- updated to new upstream release
- updated Source0 as the upstream repository moved to launchpad
* Mon Sep 19 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.2-2
- rebuilt for broken dependencies
* Sat Sep 10 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.2-1
- updated to new upstream release
- dropped patches applied upstream
* Mon Sep 05 2011 Martin Gieseking <martin.gieseking@uos.de> 2.0.1-1
- updated to new upstream release
- the new release no longer provides and depends on jsonxx, thus removed the virtual Provides for the bundled library
* Thu Mar 03 2011 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-3
- added virtual Provides for bundled jsonxx library
- added patch to replace calls of deprecated Boost functions in Fedora >= 15
* Fri Jan 28 2011 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-2
- explicitely BR java/java-devel epoch/version >= 1:1.6.0
- removed BR: php
- move Provides filters to the top
- changed license to ASL 2.0 and BSD
- removed -O3 from CFLAGS/CXXFLAGS
- preserve timestamps of zorba.jar and css files
- link private json library statically
- added missing %%defattr in php subpackage
* Tue Nov 30 2010 Martin Gieseking <martin.gieseking@uos.de> 1.4.0-1
- initial Fedora package