%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define rev 338 # How to fetch the sources from svn: # # svn checkout --revision=%{rev} http://svn.osafoundation.org/pylucene/trunk # svn export trunk PyLucene-svn%{rev} # tar -czf PyLucene-svn%{rev}.tar.gz PyLucene-svn%{rev} # rm -rf trunk PyLucene-svn%{rev} # # svn checkout --revision=549438 http://svn.apache.org/repos/asf/lucene/java/trunk # svn export trunk lucene-java-2.2.0-549438 # tar -czf lucene-java-2.2.0-549438.tar.gz lucene-java-2.2.0-549438 # rm -rf trunk lucene-java-2.2.0-549438 Name: PyLucene Version: 2.2.0 Release: 2.svn%{rev}%{?dist} Summary: Python search engine library Group: Development/Languages License: MIT license URL: http://pylucene.osafoundation.org Source0: %{name}-svn%{rev}.tar.gz Source1: lucene-java-2.2.0-549438.tar.gz Patch0: pylucene_dev-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant python-devel %description PyLucene is a GCJ-compiled version of Java Lucene integrated with Python. Its goal is to allow you to use Lucene's text indexing and searching capabilities from Python. It is designed to be API compatible with the latest version of Java Lucene. %package docs Summary: PyLucene documentation Group: Documentation %description docs PyLucene is a GCJ-compiled version of Java Lucene integrated with Python. Its goal is to allow you to use Lucene's text indexing and searching capabilities from Python. This package contains the documentation and samples for PyLucene. %prep # PyLucene does not use autoconf, so we need a custom mechanism to tell the # Makefile if it should use 'lib' oder 'lib64'. export LIBDIR_NAME=`echo %{_libdir} | sed -e "s/^.*\/\(lib6\?4\?\).*$/\1/"` %setup -q -n %{name}-svn%{rev} # -D Do not delete the directory before unpacking. # -a # will untar Source# after cd'ing into the directory. %setup -D -a 1 -n %{name}-svn%{rev} %patch0 %build export LIBDIR_NAME=`echo %{_libdir} | sed -e "s/^.*\/\(lib6\?4\?\).*$/\1/"` make %install rm -rf $RPM_BUILD_ROOT export LIBDIR_NAME=`echo %{_libdir} | sed -e "s/^.*\/\(lib6\?4\?\).*$/\1/"` make install DESTDIR=%{buildroot} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGES LICENSE README # For arch-specific packages: sitearch %{python_sitearch}/* %files docs %doc samples %changelog * Sat Sep 22 2007 Felix Schwarz - 2.2.0-2.svn338 - (build) requirements corrected - package will built correctly on i386 and x86_64 * Fri Sep 21 2007 Felix Schwarz - 2.2.0-1.svn338 - switched to latest trunk version (r338) because stable version does not work with gcj 4.1 * Thu Sep 20 2007 Felix Schwarz - 2.2.0-1.1 - initial spec file creation