Репозиторий Sisyphus
Последнее обновление: 28 марта 2020 | Пакетов: 17545 | Посещений: 17771072
en ru br
Репозитории ALT
S:1.1.6-alt1_19jpp8
5.1: 1.1-alt1_3jpp5
4.1: 1.1-alt1_1jpp1.7
4.0: 1.1-alt1_1jpp1.7
3.0: 1.1-alt0.1beta2
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: jaxen

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

Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# If you want repolib package to be built,

# issue the following: 'rpmbuild --with repolib'

%define _with_repolib 1
%define _without_sf_plugins 1

%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}

%define repodir %{_javadir}/repository.jboss.com/jaxen/1.1-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src

# If you don't want to build with maven, and use straight ant instead,

# give rpmbuild option '--without maven'

%define _without_maven 1
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

# If you don't want the manual to be built, give rpmbuild option '--without manual'

%define with_manual %{!?_without_manual:1}%{?_without_manual:0}
%define without_manual %{?_without_manual:1}%{!?_without_manual:0}

# Specify --without sf_plugins to build wihout them

%define with_sf_plugins %{!?_without_sf_plugins:1}%{?_without_sf_plugins:0}
%define without_sf_plugins %{?_without_sf_plugins:1}%{!?_without_sf_plugins:0}


Name: jaxen
Version: 1.1
Release: alt1_3jpp5
Epoch: 0
Summary:        An XPath engine written in Java
License:        Open Source
Url:            http://jaxen.codehaus.org/
Group:          Development/Java
Source0: http://dist.codehaus.org/jaxen/distributions/jaxen-1.1-src.tar.gz
Source1:        pom-maven2jpp-mapdeps.xsl
Source2:        %{name}-%{version}-jpp-depmap.xml
Source3:        %{name}-%{version}-jpp-disable-mojo-depmap.xml
Source4:        %{name}-%{version}-build.xml
Source5: jaxen-component-info.xml

Patch0: jaxen-rhel4-deps.patch
Patch1:         %{name}-%{version}-fix-css-path.patch
Patch2:         %{name}-%{version}-disable-mojo-plugins.patch
Patch3: jaxen-1.1-duplicated-tag-reports.patch

Requires: dom4j >= 0:1.6.1
Requires: jdom >= 0:1.0-0.rc1.1jpp
Requires: xalan-j2
Requires: xerces-j2
Requires: xom
BuildRequires: ant >= 0:1.6 jpackage-utils >= 0:1.6 junit
BuildRequires: ant-nodeps
%if %{with_maven}
BuildRequires: maven >= 0:1.1 saxon saxon-scripts
BuildRequires: maven-plugins-base >= 0:1.1
BuildRequires: maven-plugin-changes >= 0:1.1
BuildRequires: maven-plugin-changelog >= 0:1.1
BuildRequires: maven-plugin-checkstyle >= 0:1.1
BuildRequires: maven-plugin-file-activity >= 0:1.1
BuildRequires: maven-plugin-developer-activity >= 0:1.1
BuildRequires: maven-plugin-jdepend >= 0:1.1
BuildRequires: maven-plugin-jxr >= 0:1.1
BuildRequires: maven-plugin-license >= 0:1.1
BuildRequires: maven-plugin-linkcheck >= 0:1.1
BuildRequires: maven-plugin-pmd >= 0:1.1
BuildRequires: maven-plugin-tasklist >= 0:1.1
BuildRequires: maven-plugin-test >= 0:1.1
BuildRequires: maven-plugin-xdoc >= 0:1.1
BuildRequires: xml-commons-jaxp-1.3-apis
%if %{with_sf_plugins}
BuildRequires: sf-cobertura-maven-plugin
BuildRequires: sf-findbugs-maven-plugin
%endif
%endif
BuildRequires: dom4j >= 0:1.6.1
BuildRequires: jdom >= 0:1.0-0.rc1.1jpp
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xom
Provides: jaxen-bootstrap
Obsoletes: jaxen-bootstrap
BuildArch: noarch

%description
Jaxen is an XPath engine written in Java to work against a variety of XML
based object models such as DOM, dom4j and JDOM together with Java
Beans.

%if %{with_repolib}
%package repolib
Summary: Artifacts to be uploaded to a repository library
Group: Development/Java

%description repolib
Artifacts to be uploaded to a repository library.
This package is not meant to be installed but so its contents
can be extracted through rpm2cpio
%endif

%if %{with_maven}
%if %{with_manual}
%package manual
Summary: Documents for %{name}
Group: Development/Documentation
BuildArch: noarch

%description manual
%{summary}.
%endif
%endif

%package demo
Summary: Samples for %{name}
Group: Development/Documentation
Requires: jaxen = 0:%{version}-%{release}

%description demo
%{summary}.

%package javadoc
Summary: Javadoc for %{name}
Group: Development/Documentation
BuildArch: noarch

%description javadoc
%{summary}.

%prep
cat <<EOT

               If you dont want to build with maven,
               give rpmbuild option '--without maven'

               If you dont want the manual to be built,
               give rpmbuild option '--without manual'

EOT

%setup -q -n %{name}-%{version}
find . -name "*.jar" -exec rm -f {} \;
%if %{with_maven}
cp %{SOURCE4} build.xml
%endif

%patch0 -b .sav
%patch1 -b .sav
%if %{without_sf_plugins}
%patch2 -b .sav
%endif

%patch3 -p1

tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/ at TAG at /$tag/g" %{SOURCE5}

%build
%if %{with_maven}
for p in $(find . -name project.xml); do
   pushd $(dirname $p)
   cp project.xml project.xml.orig
   /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE1} map=%{SOURCE2}
   popd
done

%if %{without_sf_plugins}
for p in $(find . -name project.xml); do
   pushd $(dirname $p)
   cp project.xml project.xml.orig
   /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE1} map=%{SOURCE3}
   popd
done
%endif

mkdir .maven

%if %{with_manual}
maven \
       -Dmaven.repo.remote=file:/usr/share/maven/repository \
       -Dmaven.home.local=$(pwd)/.maven \
       jar javadoc xdoc
%else
maven \
       -Dmaven.repo.remote=file:/usr/share/maven/repository \
       -Dmaven.home.local=$(pwd)/.maven \
       jar javadoc
%endif
%else
ant jar javadoc
%endif


%install

# jars

install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/jaxen-1.1.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar

(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)

# javadoc

install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
rm -rf target/docs/apidocs
%else
cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%endif
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

# manual

install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
%if %{with_manual}
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif
%endif

# demo

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples
cp -pr src/java/samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples


%if %{with_repolib}
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
install -m 755 %{PATCH2} $RPM_BUILD_ROOT%{repodirsrc}
cp $RPM_BUILD_ROOT%{_javadir}/jaxen.jar $RPM_BUILD_ROOT%{repodirlib}
%if %{with_maven}
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{repodirsrc}
%endif
%endif

%files
%{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*
# hack; explicitly added docdir if not owned
%doc %dir %{_docdir}/%{name}-%{version}

%if %{with_maven}
%if %{with_manual}
%files manual
%{_docdir}/%{name}-%{version}
%endif
%endif

%files javadoc
%{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%files demo
%{_datadir}/%{name}-%{version}


%if %{with_repolib}
%files repolib
%{repodir}
%endif

%changelog

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

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