Files
apache-commons-jxpath/apache-commons-jxpath.spec

84 lines
2.5 KiB
RPMSpec
Raw Normal View History

%define base_name jxpath
%define short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 1.3
Release: 0
Summary: Simple XPath interpreter
Group: Development/Libraries/Java
License: ASL 2.0
URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
# Depmap needed to bend servlet-api and jsp-api to tomcat6
Source1: %{short_name}.depmap
Patch0: %{short_name}-mockrunner.patch
Patch1: build.xml.patch
BuildArch: noarch
BuildRequires: ant
BuildRequires: jdom
BuildRequires: java-devel >= 1.6.0
BuildRequires: jpackage-utils
BuildRequires: junit
BuildRequires: apache-commons-beanutils
BuildRequires: servlet25
BuildRequires: jsp
BuildRequires: el_api
Requires: java >= 1.6.0
Requires: jpackage-utils
Requires: jdom >= 1.0
Requires: apache-commons-beanutils
Requires: apache-commons-logging
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# This should go away with F-17
Provides: jakarta-%{short_name} = %{version}-%{release}
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
%description
Defines a simple interpreter of an expression language called XPath.
JXPath applies XPath expressions to graphs of objects of all kinds:
JavaBeans, Maps, Servlet contexts, DOM etc, including mixtures thereof.
%prep
%setup -q -n %{short_name}-%{version}-src
%patch0 -p1
%patch1
%build
export CLASSPATH=$(build-classpath \
ant-launcher \
plexus/ \
junit \
jdom \
jsp \
apache-commons-beanutils \
target/commons-jxpath.jar \
):target/classes:target/test-classes
ant -Dmaven.mode.offline=true jar \
-lib /usr/share/java
%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
install -Dpm 644 target/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
done
popd # come back from javadir
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/*.jar
%changelog