File xjavadoc.spec of Package xjavadoc
#
# spec file for package xjavadoc (Version 1.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2008, JPackage Project
# All rights reserved.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define section free
Name: xjavadoc
Version: 1.1
Release: 2
Summary: The XJavaDoc engine
License: BSD
Url: http://xdoclet.sourceforge.net/xjavadoc/
Group: Development/Libraries/Java
Source0: %{name}-src-%{version}.tar.gz
# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xdoclet login
# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xdoclet export -r XJAVADOC_1_1 xjavadoc
Patch0: %{name}-build_xml.patch
Source1: xjavadoc-component-info.xml
BuildRequires: java-devel
BuildRequires: junit
BuildRequires: ant >= 1.5
BuildRequires: ant-nodeps
BuildRequires: ant-junit
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-collections
BuildRequires: xml-commons-apis
BuildRequires: log4j
BuildRequires: javacc
BuildRequires: xalan-j2
BuildRequires: jrefactory
Requires: jakarta-commons-logging
Requires: jakarta-commons-collections
Requires: xml-commons-apis
Requires: log4j
Requires: xalan-j2
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The XJavaDoc engine is a complete rewrite of Sun's
JavaDoc engine that is faster and more suited for
XDoclet (although it is completely standalone). It
scans java source code and makes information about
a class available via special java beans that are
part of the XJavaDoc core. These beans provide the
same information about a class as Sun's JavaDoc API,
and some nice extra features.
%package javadoc
License: BSD
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
The XJavaDoc engine is a complete rewrite of Sun's
JavaDoc engine that is faster and more suited for
XDoclet (although it is completely standalone). It
scans java source code and makes information about
a class available via special java beans that are
part of the XJavaDoc core. These beans provide the
same information about a class as Sun's JavaDoc API,
and some nice extra features.
%prep
%setup -q -n %{name}
find . -name "*.zip" -exec rm {} \;
find . -name "*.jar" -exec rm {} \;
%patch0 -b .sav
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" %{SOURCE1}
%build
build-jar-repository lib \
xalan-j2 \
xalan-j2-serializer \
junit \
javacc \
log4j \
commons-logging \
commons-collections \
xml-commons-apis \
jrefactory \
ant
#FIXME: Fix these binary deps
#BINCLASSPATH=$PWD/lib/ConfigLog4j.jar
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Djavacchome=%{_javadir} javadoc
%install
mkdir -p $RPM_BUILD_ROOT%{_javadir}
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
install -m 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
# version less symlinks
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
#javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt docs/architecture.txt
%{_javadir}/*.jar
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog