Репозиторий Sisyphus
Последнее обновление: 19 октября 2019 | Пакетов: 17506 | Посещений: 15294051
en ru br
Репозитории ALT
4.0: 2.1.0-alt4jvm4.2
3.0: 1.4.3-alt1

Группа :: Работа с текстами
Пакет: lucene

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: lucene
Version: 2.1.0
Release: alt4jvm4.2

%def_disable check
# previously used by eclipse but no longer needed
%def_disable devel
%def_enable debug
%def_enable demo
%def_enable contrib
# TODO: build with contrib-db
%def_disable contribdb

%define pkgdocdir %_docdir/%name-%version

Summary: High-performance, full-featured text search engine
Group: Text tools
License: Apache Software License
Url: http://lucene.apache.org/
Packager: Eugene Ostapets <eostapets at altlinux.ru>
Epoch:          0

Source0:        http://www.apache.org/dist/lucene/java/%name-%version-src.tar.gz

# WARNING: they report incorrect version; good to cheat eclipse 3.3.0 build.

Source1: lucene-1.9-OSGi-MANIFEST.MF
Source2: lucene-1.9-analysis-OSGi-MANIFEST.MF
Patch11: lucene-2.1.0-alt-remove-contribs.patch

BuildArch: noarch

BuildPreReq: rpm-build-java
BuildRequires: jpackage-utils zip
BuildRequires: /proc
BuildRequires: ant >= 1.5
BuildRequires: javacc
BuildRequires: unzip

%if_enabled contrib
BuildRequires:  java-javadoc
BuildRequires:  jline
BuildRequires:  jtidy
BuildRequires:  regexp
BuildRequires:  jakarta-commons-digester
# hack: replace with java-devel or jpackage-generic-compat when jpackage-utils 1.7.3 alt6 will appear
BuildRequires:  jpackage-1.4-compat
BuildRequires: java-devel

Jakarta Lucene is a high-performance, full-featured text search engine
written entirely in Java. It is a technology suitable for nearly any
application that requires full-text search, especially cross-platform.

%package manual
Summary: Documentation for Lucene
Group: Development/Java
Requires: %name-javadoc = %version-%release

%description manual
Documentation for Lucene, a text search engine
written in Java.

%package javadoc
Summary: Javadoc for Lucene
Group: Development/Java

%description javadoc
Javadoc-generated HTML documentation for Lucene, a text search engine
written in Java.

%package demo
Summary: Lucene demonstrations and samples
Group: Development/Java
Requires: %name = %version-%release

%description demo
Demonstrations and samples for Lucene, a text search engine
written in Java.

%if_enabled devel
%package devel
Summary:        Lucene source code
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description devel
Source code for use by Java debuggers, such as Eclipse.

%if_enabled contrib
%package contrib
Summary:        Lucene contributed extensions
Group:          Development/Java
Requires:       %{name} = %{epoch}:%{version}-%{release}

%description contrib

%setup -q -n %name-%version
find . -name '*.jar' -delete
%patch11 -p1

export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=$(build-classpath jline jtidy regexp commons-digester junit)

%if_enabled contribdb
rm -r contrib/db
pushd contrib
#keep analyzers (required for eclipse)
#keep ant
# others require lots of deps
rm -r javascript miscellaneous similarity surround \
xml-query-parser gdata-server lucli queries snowball \
swing benchmark highlighter memory regex spellchecker wordnet

ant -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 \
   -Dversion=%version \
   -Djavacc.zip=%_javadir/javacc.jar \
%if_disabled debug
   -Djavac.debug=off \
%if_enabled contrib
   jar-core javadocs
%if_enabled demo
ant -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 jar-demo
%if_enabled check
export CLASSPATH=$(build-classpath jline jtidy regexp commons-digester junit)
ant test

mkdir META-INF
zip -u build/lucene-core-%{version}.jar META-INF/MANIFEST.MF
%if_enabled contrib
zip -u build/contrib/analyzers/lucene-analyzers-%{version}.jar META-INF/MANIFEST.MF

# jars
mkdir -p %buildroot%_javadir
install -m644 build/%name-core-%version.jar \
%if_enabled demo
# demo
#install -p -m644  build/%name-demos-%version-dev.jar \
install -p -m644  build/%name-demos-2.1.1-dev.jar \
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

%if_enabled contrib
# contrib jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib
# skipped highlighter lucli memory misc queries similarity snowball spellchecker surround swing wordnet xml-query-parser
for c in analyzers ant ; do
   install -m 0644 build/contrib/$c/%{name}-${c}-%{version}.jar \
(cd $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

%if_enabled contribdb
# bdb contrib jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib-db
install -m 0644 build/contrib/db/bdb/%{name}-bdb-%{version}.jar \
install -m 0644 build/contrib/db/bdb-je/%{name}-bdb-je-%{version}.jar \
(cd $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib-db && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

%if_enabled webapp
# TODO: webapp: luceneweb.war / where do we install 'em?
# webapp
install -d -m755 %buildroot%_datadir/%{name}-%{version}
install -m 0644 build/%{name}web.war \

# manual

install -d -m755 %buildroot%pkgdocdir
install -p -m644 README.txt LICENSE.txt CHANGES.txt %buildroot%pkgdocdir/
cp -a docs/* %buildroot%pkgdocdir/

# javadoc

%__mkdir_p %buildroot%_javadocdir
%__cp -a build/docs/api/* \
%__ln_s $(relative %_javadocdir %pkgdocdir/) %buildroot%pkgdocdir/api

%if_enabled devel
# devel
%define appsourcedir  %{_usrsrc}/%{name}
%define appsourcefile %{name}-%{version}
pushd ..
 find $currdir -type f -name \*.java -o -name \*.jj | xargs tar uf $currdir/temp-sources.tar
mkdir temp-sources
pushd temp-sources
 tar xf ../temp-sources.tar
 jar cf %{appsourcefile}.jar $currdir
 mkdir -p $RPM_BUILD_ROOT%{appsourcedir}
 mv %{appsourcefile}.jar $RPM_BUILD_ROOT%{appsourcedir}/
rm -r temp-sources temp-sources.tar

%if_enabled webapp
%dir %pkgdocdir

%files manual

%files javadoc

%if_enabled demo
%files demo

%if_enabled devel
%files devel

%if_enabled contrib
%files contrib


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin