packages java-xqjapi.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome   %{_jvmdir}/jdk
Name:          java-xqjapi
Version:       20080114
Release:       3mamba
Summary:       JSR 225: XQuery API for Java™ (XQJ)
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://jcp.org/aboutJava/communityprocess/final/jsr225/index.html
Source0:       http://www.oracle.com/technology/tech/xml/xquery/xqj/xqjri-%{version}.zip
Source1:       http://www.oracle.com/technology/tech/xml/xquery/xqj/xqjtck-%{version}.zip
License:       BSD, GPL
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
JSR 225: XQuery API for Java™ (XQJ).

%package -n java-xqjtck
Group:         Development/Libraries/Java
Summary:       Technology Compatibility Kit (TCK) for XQuery API for Java™ (XQJ)

%description -n java-xqjtck
XQJ TCK is the Technology Compatibility Kit (TCK) for XQuery API for Java™ (XQJ).

This TCK is used to test whether or not an XQJ implementation complies with the XQJ specification.

%package javadoc
Group:         Documentation
Summary:       Javadoc for %{name}

%description javadoc
JSR 225: XQuery API for Java™ (XQJ).

This package contains javadoc for %{name}

%package -n java-xqjtck-javadoc
Group:         Documentation
Summary:       Javadoc for %{name}

%description -n java-xqjtck-javadoc
JSR 225: XQuery API for Java™ (XQJ).

This package contains javadoc for %{name}

%prep
%setup -q -c -n xqjapi-%{version}

for f in $(find . -name "*.jar"); do
	rm -rf $f
done

mkdir -p classes
mkdir -p xqjtck/classes
unzip -q %{SOURCE1} -d xqjtck

%build
export JAVA_HOME=%javahome

pushd src
  find . -name "*.java" > ../file.list
  %javahome/bin/javac -d ../classes \
    -encoding iso-8859-1 \
    @.../file.list

  %javahome/bin/javadoc -d ../javadoc \
    -encoding iso-8859-1 \
      @.../file.list
popd

%javahome/bin/jar cvf xqjapi.jar -C classes .

pushd xqjtck/src
  find . -name "*.java" > ../file.list
  %javahome/bin/javac -d ../classes \
    -classpath $(build-classpath junit-3.8.2):../../classes \
    -encoding iso-8859-1 \
    @.../file.list

  %javahome/bin/javadoc -d ../../javadoc-tck \
    -classpath $(build-classpath junit-3.8.2):../../classes \
    -encoding iso-8859-1 \
      @.../file.list
popd

%javahome/bin/jar cvf xqjtck.jar -C xqjtck/classes .

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}

install -m 644 xqjapi.jar %{buildroot}%{_javadir}/xqjapi-%{version}.jar
install -m 644 xqjtck.jar %{buildroot}%{_javadir}/xqjtck-%{version}.jar

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/xqjapi-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/xqjapi-%{version}
ln -sf xqjapi-%{version}  %{buildroot}%{_javadocdir}/xqjapi

mkdir -p %{buildroot}%{_javadocdir}/xqjtck-%{version}
cp -pr javadoc-tck/* %{buildroot}%{_javadocdir}/xqjtck-%{version}
ln -sf xqjtck-%{version}  %{buildroot}%{_javadocdir}/xqjtck

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/xqjapi-%{version}.jar
%{_javadir}/xqjapi.jar
%doc xqjtck/JSR225Licenses.html

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/xqjapi-%{version}
%{_javadocdir}/xqjapi

%files -n java-xqjtck
%defattr(-,root,root)
%{_javadir}/xqjtck-%{version}.jar
%{_javadir}/xqjtck.jar
%doc xqjtck/JSR225Licenses.html
%doc xqjtck/readme.html

%files -n java-xqjtck-javadoc
%defattr(-,root,root)
%{_javadocdir}/xqjtck-%{version}
%{_javadocdir}/xqjtck

%changelog
* Thu Mar 24 2011 gil <puntogil@...> 20080114-3mamba
- rebuilt with java-gcj-compat support

* Wed Nov 24 2010 gil <puntogil@...> 20080114-2mamba
- rebuilt devel

* Fri Jan 22 2010 gil <puntogil@...> 20080114-1mamba
- package created by autospec