2009-08-18 15:19:05 +00:00
|
|
|
# Copyright (c) 2000-2009, JPackage Project
|
2007-03-12 15:15:35 +00:00
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
# If you don't want to build with maven, and use straight ant instead,
|
|
|
|
# give rpmbuild option '--without maven'
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
%define with_maven 0
|
|
|
|
%define without_maven 1
|
2008-10-24 19:44:10 +00:00
|
|
|
|
|
|
|
%define section free
|
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
Summary: Extract class/interface/method definitions from sources
|
2007-03-12 15:15:35 +00:00
|
|
|
Name: qdox
|
2009-08-18 15:19:05 +00:00
|
|
|
Version: 1.9.2
|
2009-09-19 06:13:51 +00:00
|
|
|
Release: 2%{?dist}
|
2007-03-12 15:15:35 +00:00
|
|
|
Epoch: 0
|
2008-10-24 19:44:10 +00:00
|
|
|
License: ASL 2.0
|
2007-03-12 15:15:35 +00:00
|
|
|
URL: http://qdox.codehaus.org/
|
2009-08-18 15:19:05 +00:00
|
|
|
Group: Development/Libraries
|
|
|
|
Source0: %{name}-%{version}-src.tar.gz
|
|
|
|
# svn export http://svn.codehaus.org/qdox/tags/qdox-1.8/
|
|
|
|
|
|
|
|
Source1: build.xml.tar.gz
|
|
|
|
Source2: qdox-settings.xml
|
|
|
|
|
|
|
|
BuildRequires: jpackage-utils >= 0:1.7.4
|
|
|
|
BuildRequires: java-devel = 0:1.5.0
|
2007-03-12 15:15:35 +00:00
|
|
|
BuildRequires: ant >= 0:1.6
|
|
|
|
BuildRequires: ant-junit >= 0:1.6
|
|
|
|
BuildRequires: junit >= 0:3.8.1
|
|
|
|
BuildRequires: byaccj
|
2008-10-24 19:44:10 +00:00
|
|
|
BuildRequires: jflex
|
2009-08-18 15:19:05 +00:00
|
|
|
%if %{with_maven}
|
|
|
|
BuildRequires: maven2 >= 2.0.7
|
|
|
|
BuildRequires: maven2-plugin-ant
|
|
|
|
BuildRequires: maven2-plugin-antrun
|
|
|
|
BuildRequires: maven2-plugin-compiler
|
|
|
|
BuildRequires: maven2-plugin-dependency
|
|
|
|
BuildRequires: maven2-plugin-install
|
|
|
|
BuildRequires: maven2-plugin-jar
|
|
|
|
BuildRequires: maven2-plugin-javadoc
|
|
|
|
BuildRequires: maven2-plugin-release
|
|
|
|
BuildRequires: maven2-plugin-resources
|
|
|
|
BuildRequires: maven2-plugin-surefire
|
|
|
|
BuildRequires: jmock >= 0:1.0
|
2008-10-24 19:44:10 +00:00
|
|
|
%endif
|
2009-08-18 15:19:05 +00:00
|
|
|
|
|
|
|
Requires: java >= 0:1.5.0
|
|
|
|
Requires(post): jpackage-utils >= 0:1.7.4
|
|
|
|
Requires(postun): jpackage-utils >= 0:1.7.4
|
|
|
|
|
|
|
|
BuildArch: noarch
|
2008-10-24 19:44:10 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|
|
|
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%description
|
2009-08-18 15:19:05 +00:00
|
|
|
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.
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2009-08-18 15:19:05 +00:00
|
|
|
Group: Documentation
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
%{summary}.
|
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
%if %{with_maven}
|
|
|
|
%package manual
|
|
|
|
Summary: Documents for %{name}
|
|
|
|
Group: Documentation
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
%{summary}.
|
|
|
|
%endif
|
|
|
|
|
2007-03-12 15:15:35 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}
|
2009-08-18 15:19:05 +00:00
|
|
|
for j in $(find . -name "*.jar"); do
|
|
|
|
mv $j $j.no
|
|
|
|
done
|
|
|
|
rm bootstrap/yacc.linux
|
|
|
|
ln -s /usr/bin/byaccj bootstrap/yacc.linux
|
|
|
|
ln -s $(build-classpath jflex) bootstrap
|
|
|
|
#ln -s $(build-classpath java-cup) bootstrap
|
|
|
|
mkdir -p .m2/repository/JPP/maven2/default_poms
|
|
|
|
tar xzf %{SOURCE1}
|
|
|
|
|
|
|
|
cp %{SOURCE2} settings.xml
|
|
|
|
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
|
|
|
|
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
|
|
|
|
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%build
|
2009-08-18 15:19:05 +00:00
|
|
|
%if %{with_maven}
|
|
|
|
mkdir external_repo
|
|
|
|
ln -s %{_javadir} external_repo/JPP
|
|
|
|
|
|
|
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
|
|
mkdir -p $MAVEN_REPO_LOCAL
|
|
|
|
|
|
|
|
mvn-jpp \
|
|
|
|
-e \
|
|
|
|
-s settings.xml \
|
|
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
|
|
ant:ant install javadoc:javadoc
|
2008-10-24 19:44:10 +00:00
|
|
|
|
|
|
|
%else
|
2009-08-18 15:19:05 +00:00
|
|
|
mkdir -p src/java/com/thoughtworks/qdox/parser/impl
|
|
|
|
export CLASSPATH=$(build-classpath jmock jflex):target/classes:target/test-classes
|
|
|
|
java JFlex.Main \
|
2008-10-24 19:44:10 +00:00
|
|
|
-d src/java/com/thoughtworks/qdox/parser/impl \
|
|
|
|
src/grammar/lexer.flex
|
2009-08-18 15:19:05 +00:00
|
|
|
pushd src
|
|
|
|
byaccj \
|
2008-10-24 19:44:10 +00:00
|
|
|
-Jnorun \
|
|
|
|
-Jnoconstruct \
|
|
|
|
-Jclass=Parser \
|
|
|
|
-Jsemantic=Value \
|
|
|
|
-Jpackage=com.thoughtworks.qdox.parser.impl \
|
2009-08-18 15:19:05 +00:00
|
|
|
grammar/parser.y
|
2008-10-24 19:44:10 +00:00
|
|
|
popd
|
2009-08-18 15:19:05 +00:00
|
|
|
mv src/Parser.java src/java/com/thoughtworks/qdox/parser/impl
|
|
|
|
#TODO reenable test when jmock is imported
|
|
|
|
ant -Dbuild.sysclasspath=only -Dmaven.test.skip=true -Dmaven.mode.offline=true jar javadoc
|
2008-10-24 19:44:10 +00:00
|
|
|
%endif
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# jars
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
2008-10-24 19:44:10 +00:00
|
|
|
cp -p target/%{name}-%{version}.jar \
|
2007-03-12 15:15:35 +00:00
|
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
2008-10-24 19:44:10 +00:00
|
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
2007-03-12 15:15:35 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
|
|
|
|
%add_to_maven_depmap com.thoughtworks.qdox qdox %{version} JPP %{name}
|
|
|
|
|
|
|
|
|
|
|
|
# poms
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
|
|
|
install -m 644 pom.xml \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
|
|
|
|
|
2007-03-12 15:15:35 +00:00
|
|
|
# javadoc
|
2008-10-24 19:44:10 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
|
|
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
2007-03-12 15:15:35 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
# manual
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
|
|
cp LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
|
|
%if %{with_maven}
|
|
|
|
rm -rf target/site/apidocs
|
|
|
|
cp -pr target/site $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
2008-10-24 19:44:10 +00:00
|
|
|
%endif
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2008-10-24 19:44:10 +00:00
|
|
|
%post
|
2009-08-18 15:19:05 +00:00
|
|
|
%update_maven_depmap
|
2008-10-24 19:44:10 +00:00
|
|
|
|
|
|
|
%postun
|
2009-08-18 15:19:05 +00:00
|
|
|
%update_maven_depmap
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2007-03-12 15:15:35 +00:00
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
2009-08-18 15:19:05 +00:00
|
|
|
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
|
2007-03-12 15:15:35 +00:00
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%{_javadir}/%{name}-%{version}.jar
|
2009-08-18 15:19:05 +00:00
|
|
|
%{_datadir}/maven2/poms/*
|
|
|
|
%{_mavendepmapfragdir}/*
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
2009-08-18 15:19:05 +00:00
|
|
|
%doc %{_javadocdir}/%{name}-%{version}
|
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%if %{with_maven}
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc %{_docdir}/%{name}-%{version}/site
|
|
|
|
%endif
|
2007-03-12 15:15:35 +00:00
|
|
|
|
|
|
|
%changelog
|
2009-09-19 06:13:51 +00:00
|
|
|
* Sat Sep 19 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.9.2-2
|
|
|
|
- Remove not needed sources.
|
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Tue Aug 18 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.9.2-1
|
|
|
|
- Update to 1.9.2.
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Fri Apr 03 2009 Ralph Apel <r.apel at r-apel.de> 0:1.8-1.jpp5
|
|
|
|
- 1.8 as qdox18 because of qdox frozen at 1.6.1 in JPP-5
|
|
|
|
|
|
|
|
* Tue Jul 01 2008 Ralph Apel <r.apel at r-apel.de> 0:1.6.3-5.jpp5
|
|
|
|
- Restore to devel
|
|
|
|
- Drop mockobjects BR
|
|
|
|
|
|
|
|
* Fri Jun 13 2008 Ralph Apel <r.apel at r-apel.de> 0:1.6.3-4.jpp5
|
|
|
|
- Add com.thoughtworks.qdox groupId to depmap frag
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Tue Feb 26 2008 Ralph Apel <r.apel at r-apel.de> 0:1.6.3-3jpp
|
|
|
|
- Add settings file
|
|
|
|
- Fix pom marking jmock dependency as of scope test
|
|
|
|
- Fix -jpp-depmap.xml for asm2-parent
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Mon Nov 26 2007 Ralph Apel <r.apel at r-apel.de> 0:1.6.3-2jpp
|
|
|
|
- Fix maven macro value
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Thu Nov 22 2007 Ralph Apel <r.apel at r-apel.de> 0:1.6.3-1jpp
|
|
|
|
- Upgrade to 1.6.3
|
2008-10-24 19:44:10 +00:00
|
|
|
|
2009-08-18 15:19:05 +00:00
|
|
|
* Wed May 30 2007 Ralph Apel <r.apel at r-apel.de> 0:1.6.2-1jpp
|
|
|
|
- Upgrade to 1.6.2
|
|
|
|
- Activate tests while building with ant
|
|
|
|
- Make Vendor, Distribution based on macro
|
|
|
|
- Install depmap frags, poms
|
|
|
|
|
|
|
|
* Thu Mar 22 2007 Vivek Lakshmanan <vivekl@redhat.com> 0:1.6.1-1jpp.ep1.4
|
|
|
|
- Rebuild with fixed component-info.xml
|
2008-07-09 21:54:46 +00:00
|
|
|
|
2008-10-24 19:44:10 +00:00
|
|
|
* Fri Feb 23 2007 Ralph Apel <r.apel at r-apel.de> 0:1.5-3jpp
|
|
|
|
- Add option to build without maven
|
|
|
|
- Omit tests when building without maven
|
|
|
|
- Add gcj_support option
|
2008-02-22 23:06:01 +00:00
|
|
|
|
2007-03-12 15:15:35 +00:00
|
|
|
* Mon Feb 20 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.5-2jpp
|
|
|
|
- Rebuild for JPP-1.7, adapting to maven-1.1
|
|
|
|
|
|
|
|
* Wed Nov 16 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.5-1jpp
|
|
|
|
- Upgrade to 1.5
|
|
|
|
- Build is now done with maven and requires jflex and byaccj
|
|
|
|
|
|
|
|
* Wed Aug 25 2004 Fernando Nasser <fnasser@redhat.com> - 0:1.4-3jpp
|
|
|
|
- Rebuild with Ant 1.6.2
|
|
|
|
|
|
|
|
* Fri Aug 06 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.4-2jpp
|
|
|
|
- Upgrade to ant-1.6.X
|
|
|
|
|
|
|
|
* Mon Jun 07 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.4-1jpp
|
|
|
|
- Upgrade to 1.4
|
|
|
|
- Drop Requires: mockobjects (Build/Test only)
|
|
|
|
|
|
|
|
* Tue Feb 24 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.3-1jpp
|
|
|
|
- First JPackage release
|