java-qdox/java-qdox.spec

171 lines
4.5 KiB
RPMSpec
Raw Normal View History

%define maven 0
Name: java-qdox
Version: 1.11
Release: 1mamba
Summary: Quick JavaDoc Scanner
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://qdox.codehaus.org/
# jsvn co https://svn.codehaus.org/qdox/tags/qdox-1.11
# tar czvf qdox-1.10.1-src-svn.tar.gz qdox-1.11
Source0: qdox-1.11-src-svn.tar.gz
Source1: java-qdox-LocatedDef.java
Source2: java-qdox-build.xml
License: Apache Software License Version 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
%if %maven
#BuildRequires: apache-maven
#BuildRequires: apache-maven-plugin-ant
#BuildRequires: apache-maven-plugin-antrun
#BuildRequires: apache-maven-plugin-changes
#BuildRequires: apache-maven-plugin-compiler
#BuildRequires: apache-maven-plugin-dependency
#BuildRequires: apache-maven-plugin-deploy
#BuildRequires: apache-maven-plugin-install
#BuildRequires: apache-maven-plugin-jar
#BuildRequires: apache-maven-plugin-javadoc
#BuildRequires: apache-maven-plugin-resources
#BuildRequires: apache-maven-plugin-site
#BuildRequires: cobertura-maven-plugin
#BuildRequires: jflex-maven-plugin
#BuildRequires: maven-project-info-reports-plugin
#BuildRequires: maven-release-plugin
#BuildRequires: maven-surefire-plugin
#BuildRequires: maven-wagon-webdav
##BuildRequires: xsite-maven-plugin 1.0 todo
%endif
BuildRequires: byaccj
BuildRequires: java_cup
BuildRequires: java-jflex143
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: java-jmock1
Requires: jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
QDox is a high speed, small footprint parser for
extracting class/interface/method definitions
from source files complete with JavaDoc @tags.
It is designed to be used by active code
generators or documentation tools.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
QDox - Quick JavaDoc Scanner.
This package contains documentation for %{name}.
%prep
%setup -q -n qdox-%{version}
chmod -Rf a+rX,u+w,g-w,o-w bootstrap
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
rm -r bootstrap/*.exe
rm -r bootstrap/yacc.*
ln -s /usr/bin/byaccj bootstrap/yacc.linux
ln -s $(build-classpath jflex/jflex) bootstrap
#cp -p %{S:1} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java
sed -e "s/@VERSION@/%{version}/g" %{S:2} > build.xml
rm src/test/com/thoughtworks/qdox/JavaDocBuilderTest.java
%build
mkdir -p target/src/java/com/thoughtworks/qdox/parser/impl
export CLASSPATH=""
CLASSPATH=$CLASSPATH:$(build-classpath java_cup jflex/jflex jmock1)
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 ant/ant-junit):target/classes:target/test-classes
pushd src
pushd grammar
%{_bindir}/jflex143 \
-d ../java/com/thoughtworks/qdox/parser/impl \
lexer.flex \
--skel skeleton.inner
popd
%{_bindir}/byaccj \
-v \
-Jnorun \
-Jnoconstruct \
-Jclass=Parser \
-Jsemantic=Value \
-Jpackage=com.thoughtworks.qdox.parser.impl \
../src/grammar/parser.y
mv Parser.java java/com/thoughtworks/qdox/parser/impl
popd
ant -Dbuild.sysclasspath=only jar javadoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -m 644 target/qdox-%{version}.jar \
%{buildroot}%{_javadir}/qdox-%{version}.jar
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-qdox.pom
%add_to_maven_depmap com.thoughtworks.qdox qdox %{version} JPP qdox
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}.jar; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_javadocdir}/qdox-%{version}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/qdox-%{version}
ln -s qdox-%{version} %{buildroot}%{_javadocdir}/qdox
#%{_bindir}/aot-compile-rpm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/qdox-%{version}.jar
%{_javadir}/qdox.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt README.txt
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/qdox-%{version}
%{_javadocdir}/qdox
%changelog
* Wed May 05 2010 gil <puntogil@libero.it> 1.11-1mamba
- update to 1.11
* Tue Feb 16 2010 gil <puntogil@libero.it> 1.10.1-1mamba
- update to 1.10.1
- edit spec file
* Mon Sep 28 2009 gil <puntogil@libero.it> 1.10-1mamba
- update to 1.10
* Fri Jun 05 2009 gil <puntogil@libero.it> 1.9.1-1mamba
- update to 1.9.1
* Mon Mar 02 2009 gil <puntogil@libero.it> 1.6.1-1mamba
- package created by autospec