]> git.pld-linux.org Git - packages/xapian-bindings.git/commitdiff
- updated to 1.4.4 auto/th/xapian-bindings-1.4.4-1
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 28 Apr 2017 19:36:33 +0000 (21:36 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 28 Apr 2017 19:36:33 +0000 (21:36 +0200)
- updated python-install patch
- added perl and python3 bindings
- php binding now supports php7

python-install.patch
xapian-bindings.spec

index 366bc0a671952fb53f645326e05283a26bc01ae5..3981dc957d9bd4899ebeeb6b715b0db9583a10a9 100644 (file)
@@ -1,11 +1,20 @@
---- xapian-bindings-1.2.21/configure.ac~       2015-05-21 14:57:01.000000000 +0900
-+++ xapian-bindings-1.2.21/configure.ac        2016-03-30 21:24:31.826127813 +0900
-@@ -312,7 +312,7 @@
+--- xapian-bindings-1.4.4/configure.ac.orig    2017-04-28 15:59:14.590553235 +0200
++++ xapian-bindings-1.4.4/configure.ac 2017-04-28 16:00:59.977218698 +0200
+@@ -369,7 +369,7 @@
        AC_MSG_RESULT(yes)
-       AC_MSG_CHECKING([for directory to install python bindings in])
-       if test -z "$PYTHON_LIB" ; then
--        PYTHON_LIB=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
-+        PYTHON_LIB=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(plat_specific=True,prefix="/usr").replace(os.sep,"/"))'`
+       AC_MSG_CHECKING([for directory to install python2 bindings in])
+       if test -z "$PYTHON2_LIB" ; then
+-        PYTHON2_LIB=`$PYTHON2 -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
++        PYTHON2_LIB=`$PYTHON2 -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(plat_specific=True,prefix="/usr").replace(os.sep,"/"))'`
        fi
-       AC_MSG_RESULT([$PYTHON_LIB])
-       AC_ARG_VAR(PYTHON_LIB, [Directory to install python bindings in])
+       AC_MSG_RESULT([$PYTHON2_LIB])
+       AC_ARG_VAR(PYTHON2_LIB, [Directory to install python2 bindings in])
+@@ -459,7 +459,7 @@
+       AC_MSG_RESULT(yes)
+       AC_MSG_CHECKING([for directory to install python3 bindings in])
+       if test -z "$PYTHON3_LIB" ; then
+-        PYTHON3_LIB=`$PYTHON3 -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
++        PYTHON3_LIB=`$PYTHON3 -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(plat_specific=True,prefix="/usr").replace(os.sep,"/"))'`
+       fi
+       AC_MSG_RESULT([$PYTHON3_LIB])
+       AC_ARG_VAR(PYTHON3_LIB, [Directory to install python3 bindings in])
index b0c6efcb4721fb912df153525d8cc73d654e2896..bbc305b4c0674acbf9bf3fb7a332f73a7c635236 100644 (file)
@@ -1,12 +1,12 @@
-# NOTE: for perl binding, see perl-Search-Xapian.spec
-# TODO: python3- after upgrade to 1.3.x/1.4.x
 #
 # Conditional build:
 %bcond_without dotnet          # C# bindings
 %bcond_without java            # Java bindings
 %bcond_without lua             # Lua bindings
+%bcond_without perl            # Perl bindings
 %bcond_without php             # PHP bindings
-%bcond_without python          # Python bindings
+%bcond_without python2         # Python 2 bindings
+%bcond_without python3         # Python 3 bindings
 %bcond_without ruby            # Ruby bindings
 %bcond_without tcl             # Tcl bindings
 
 %undefine      with_dotnet
 %endif
 
+%{?with_dotnet:%include        /usr/lib/rpm/macros.mono}
+%{?with_perl:%include  /usr/lib/rpm/macros.perl}
 Summary:       Bindings for Xapian
 Summary(pl.UTF-8):     Wiązania do Xapiana
 Name:          xapian-bindings
-Version:       1.2.23
+Version:       1.4.4
 Release:       1
 License:       GPL v2+
 Group:         Development/Languages
-Source0:       http://oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: 013ef1b953cec486bc67a98a0f364e32
+Source0:       https://oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: 55f2678a029baa4f897f583e86e33ed8
 Patch0:                python-install.patch
-URL:           http://www.xapian.org/
+URL:           https://xapian.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1:1.11.2
 %{?with_java:BuildRequires:    jdk >= 1.2}
@@ -33,10 +35,11 @@ BuildRequires:      libtool >= 2:2.2.6
 %{?with_lua:BuildRequires:     lua51-devel >= 5.1.5-2}
 # 2.6.x should be sufficient, but 2.11.1 complaints about write permissions to /usr/share/.mono/keypairs
 %{?with_dotnet:BuildRequires:  mono-devel >= 2.11.4}
+%{?with_perl:BuildRequires:    perl-devel >= 1:5.8.0}
 %{?with_php:BuildRequires:     %{php_name}-devel >= 4:5.0.4}
-%{?with_php:BuildRequires:     %{php_name}-devel < 4:7}
 BuildRequires: pkgconfig
-%{?with_python:BuildRequires:  python-devel >= 1:2.3}
+%{?with_python2:BuildRequires: python-devel >= 1:2.6}
+%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
 BuildRequires: python-modules >= 1:2.3
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.665
@@ -47,6 +50,14 @@ BuildRequires:       rpmbuild(macros) >= 1.665
 BuildRequires: xapian-core-devel >= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%if %{with php}
+%if "%{php_major_version}" >= "7"
+%define                phpbindname     php7
+%else
+%define                phpbindname     php
+%endif
+%endif
+
 %description
 Xapian is an Open Source Probabilistic Information Retrieval Library.
 It offers a highly adaptable toolkit that allows developers to easily
@@ -66,6 +77,7 @@ Summary:      Files needed for developing C# applications which use Xapian
 Summary(pl.UTF-8):     Pliki do tworzenia aplikacji C# wykorzystujących Xapiana
 Group:         Development/Languages
 Requires:      mono >= 2.6.7
+Requires:      xapian-core-libs >= %{version}
 Obsoletes:     csharp-xapian
 
 %description -n dotnet-xapian
@@ -88,6 +100,7 @@ Summary(pl.UTF-8):   Pliki do tworzenia aplikacji Javy wykorzystujących Xapiana
 Group:         Libraries/Java
 Requires:      jpackage-utils
 Requires:      jre
+Requires:      xapian-core-libs >= %{version}
 
 %description -n java-xapian
 Xapian is an Open Source Probabilistic Information Retrieval
@@ -108,6 +121,7 @@ Summary:    Files needed for developing Lua scripts which use Xapian
 Summary(pl.UTF-8):     Pliki do tworzenia skryptów w języku Lua wykorzystujących Xapiana
 Group:         Development/Languages
 Requires:      lua51-libs
+Requires:      xapian-core-libs >= %{version}
 
 %description -n lua-xapian
 Xapian is an Open Source Probabilistic Information Retrieval
@@ -123,10 +137,28 @@ programistom łatwo dodawać do aplikacji zaawansowane możliwości
 indeksowania i wyszukiwania. Ten pakiet zawiera pliki potrzebne przy
 tworzeniu skryptów w języku Lua wykorzystujących Xapiana.
 
+%package -n perl-Xapian
+Summary:       Xapian - Perl XS frontend to the Xapian C++ search library
+Summary(pl.UTF-8):     Xapian - interfejs Perlowy XS do biblioteki wyszukiwania Xapian
+Group:         Development/Languages/Perl
+Requires:      xapian-core-libs >= %{version}
+
+%description -n perl-Xapian
+This module wraps most methods of most Xapian classes. The missing
+classes and methods should be added in the future. It also provides a
+simplified, more 'perlish' interface to some common operations.
+
+%description -n perl-Xapian -l pl.UTF-8
+Ten moduł obudowuje większość metod z większości klas Xapiana.
+Brakujące klasy i metody powinny być dodane w przyszłości. Moduł
+udostępnia także uproszczony, bardziej perlowy interfejs do niektórych
+popularnych operacji.
+
 %package -n %{php_name}-xapian
 Summary:       Files needed for developing PHP scripts which use Xapian
 Summary(pl.UTF-8):     Pliki do tworzenia skryptów w PHP wykorzystujących Xapiana
 Group:         Development/Languages/PHP
+Requires:      xapian-core-libs >= %{version}
 %{?requires_php_extension}
 
 %description -n %{php_name}-xapian
@@ -144,10 +176,11 @@ indeksowania i wyszukiwania. Ten pakiet zawiera pliki potrzebne przy
 tworzeniu skryptów w PHP wykorzystujących Xapiana.
 
 %package -n python-xapian
-Summary:       Files needed for developing Python scripts which use Xapian
-Summary(pl.UTF-8):     Pliki do tworzenia skryptów w Pythonie wykorzystujących Xapiana
+Summary:       Files needed for developing Python scripts which use Xapian
+Summary(pl.UTF-8):     Pliki do tworzenia skryptów w Pythonie wykorzystujących Xapiana
 Group:         Development/Languages/Python
-%pyrequires_eq python-modules
+Requires:      python-modules >= 1:2.6
+Requires:      xapian-core-libs >= %{version}
 
 %description -n python-xapian
 Xapian is an Open Source Probabilistic Information Retrieval
@@ -163,10 +196,32 @@ programistom łatwo dodawać do aplikacji zaawansowane możliwości
 indeksowania i wyszukiwania. Ten pakiet zawiera pliki potrzebne przy
 tworzeniu skryptów w Pythonie wykorzystujących Xapiana.
 
+%package -n python3-xapian
+Summary:       Files needed for developing Python 3 scripts which use Xapian
+Summary(pl.UTF-8):     Pliki do tworzenia skryptów w Pythonie 3 wykorzystujących Xapiana
+Group:         Development/Languages/Python
+Requires:      python3-modules >= 1:3.2
+Requires:      xapian-core-libs >= %{version}
+
+%description -n python3-xapian
+Xapian is an Open Source Probabilistic Information Retrieval
+framework. It offers a highly adaptable toolkit that allows developers
+to easily add advanced indexing and search facilities to applications.
+This package provides the files needed for developing Python scripts
+which use Xapian.
+
+%description -n python3-xapian -l pl.UTF-8
+Xapian to mająca otwarte źródła biblioteka do uzyskiwania informacji
+probabilistycznych. Oferuje wysoce adoptowalne narzędzia pozwalające
+programistom łatwo dodawać do aplikacji zaawansowane możliwości
+indeksowania i wyszukiwania. Ten pakiet zawiera pliki potrzebne przy
+tworzeniu skryptów w Pythonie wykorzystujących Xapiana.
+
 %package -n ruby-xapian
 Summary:       Files needed for developing Ruby scripts which use Xapian
 Summary(pl.UTF-8):     Pliki do tworzenia skryptów w języku Ruby wykorzystujących Xapiana
 Group:         Development/Languages
+Requires:      xapian-core-libs >= %{version}
 
 %description -n ruby-xapian
 Xapian is an Open Source Probabilistic Information Retrieval
@@ -187,6 +242,7 @@ Summary:    Files needed for developing Tcl scripts which use Xapian
 Summary(pl.UTF-8):     Pliki do tworzenia skryptów w Tcl-u wykorzystujących Xapiana
 Group:         Development/Languages/Tcl
 Requires:      tcl >= 8.1
+Requires:      xapian-core-libs >= %{version}
 
 %description -n tcl-xapian
 Xapian is an Open Source Probabilistic Information Retrieval
@@ -213,19 +269,24 @@ tworzeniu skryptów w Tcl-u wykorzystujących Xapiana.
 %{__autoheader}
 %{__automake}
 CLASSPATH="." \
-RUBY_LIB=%{ruby_vendorlibdir} \
-RUBY_LIB_ARCH=%{ruby_vendorarchdir} \
 %configure \
+       PERL_ARCH=%{perl_vendorarch} \
+       PERL_LIB=%{perl_vendorlib} \
+       RUBY_LIB=%{ruby_vendorlibdir} \
+       RUBY_LIB_ARCH=%{ruby_vendorarchdir} \
        %{?with_lua:LUA=/usr/bin/lua5.1 LUA_INC=/usr/include/lua51} \
        %{?with_dotnet:--with-csharp} \
        %{?with_java:--with-java} \
        %{?with_lua:--with-lua} \
-       %{?with_python:--with-python} \
-       %{?with_php:--with-php} \
+       %{?with_perl:--with-perl} \
+       %{?with_python2:--with-python} \
+       %{?with_python3:--with-python3} \
+       %{?with_php:--with-%{phpbindname}} \
        %{?with_ruby:--with-ruby} \
        %{?with_tcl:--with-tcl}
 
-%{__make}
+%{__make} \
+       JAVA_CPPFLAGS="-I%{_jvmdir}/java/include"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -237,16 +298,23 @@ rm -rf $RPM_BUILD_ROOT
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %if %{with java}
-install -D java/built/xapian_jni.jar $RPM_BUILD_ROOT%{_javadir}/xapian_jni-%{version}.jar
-ln -sf xapian_jni-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/xapian_jni.jar
+install -D java/built/xapian.jar $RPM_BUILD_ROOT%{_javadir}/xapian-%{version}.jar
+ln -sf xapian-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/xapian.jar
 %endif
 
-for binding in %{?with_dotnet:csharp} %{?with_php:php} %{?with_python:python} %{?with_ruby:ruby} %{?with_tcl:tcl8}; do
+for binding in %{?with_dotnet:csharp} %{?with_perl:perl} %{?with_php:%{phpbindname}} %{?with_python2:python} %{?with_python3:python3} %{?with_ruby:ruby} %{?with_tcl:tcl8}; do
        install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
-       cp -a $binding/docs/{index.html,examples} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
+       [ ! -f $binding/docs/index.html ] || cp -p $binding/docs/index.html $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
+       cp -pr $binding/docs/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$binding
 done
 
+%if %{with python2}
 %py_postclean
+%endif
+%if %{with python3}
+install -d $RPM_BUILD_ROOT%{py3_sitedir}/xapian/__pycache__
+%{__mv} $RPM_BUILD_ROOT%{py3_sitedir}/xapian/*.py[co] $RPM_BUILD_ROOT%{py3_sitedir}/xapian/__pycache__
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -270,8 +338,8 @@ rm -rf $RPM_BUILD_ROOT
 %files -n java-xapian
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_jnidir}/libxapian_jni.so
-%{_javadir}/xapian_jni-%{version}.jar
-%{_javadir}/xapian_jni.jar
+%{_javadir}/xapian-%{version}.jar
+%{_javadir}/xapian.jar
 %endif
 
 %if %{with lua}
@@ -280,6 +348,16 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/lua/5.1/xapian.so
 %endif
 
+%if %{with perl}
+%files -n perl-Xapian
+%defattr(644,root,root,755)
+%{perl_vendorlib}/Xapian.pm
+%dir %{perl_vendorlib}/Xapian
+%{perl_vendorlib}/Xapian/*.pm
+%dir %{perl_vendorarch}/auto/Xapian
+%attr(755,root,root) %{perl_vendorarch}/auto/Xapian/Xapian.so
+%endif
+
 %if %{with php}
 %files -n %{php_name}-xapian
 %defattr(644,root,root,755)
@@ -287,7 +365,7 @@ rm -rf $RPM_BUILD_ROOT
 %{php_data_dir}/xapian.php
 %endif
 
-%if %{with python}
+%if %{with python2}
 %files -n python-xapian
 %defattr(644,root,root,755)
 %dir %{py_sitedir}/xapian
@@ -295,6 +373,15 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitedir}/xapian/__init__.py[co]
 %endif
 
+%if %{with python3}
+%files -n python3-xapian
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/xapian
+%attr(755,root,root) %{py3_sitedir}/xapian/_xapian.cpython-*.so
+%{py3_sitedir}/xapian/__init__.py
+%{py3_sitedir}/xapian/__pycache__
+%endif
+
 %if %{with ruby}
 %files -n ruby-xapian
 %defattr(644,root,root,755)
This page took 0.056296 seconds and 4 git commands to generate.