142 lines
4.9 KiB
RPMSpec
142 lines
4.9 KiB
RPMSpec
#
|
|
# spec file for package qdox
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define repodir %{_javadir}/repository.jboss.com/qdox/1.6.1-brew
|
|
%define repodirlib %{repodir}/lib
|
|
%define repodirsrc %{repodir}/src
|
|
Name: qdox
|
|
Version: 1.12.1
|
|
Release: 0
|
|
Summary: Extract class/interface/method definitions from sources
|
|
License: Apache-2.0
|
|
Group: Development/Libraries/Java
|
|
URL: http://qdox.codehaus.org/
|
|
# svn checkout https://svn.codehaus.org/qdox/tags/qdox-1.12.1 qdox-1.12.1
|
|
# tar --exclude-vcs -cJf qdox-1.12.1.tar.xz qdox-1.12.1
|
|
Source0: qdox-%{version}.tar.xz
|
|
Source1: pom-maven2jpp-depcat.xsl
|
|
Source2: pom-maven2jpp-newdepmap.xsl
|
|
Source3: pom-maven2jpp-mapdeps.xsl
|
|
Source4: qdox-1.6-jpp-depmap.xml
|
|
Source5: qdox-LocatedDef.java
|
|
Source6: qdox-build.xml
|
|
Source7: qdox-component-info.xml
|
|
BuildRequires: ant >= 1.6
|
|
BuildRequires: byaccj
|
|
BuildRequires: gpg2
|
|
BuildRequires: java-cup-bootstrap
|
|
BuildRequires: javapackages-local
|
|
BuildRequires: jflex-bootstrap
|
|
BuildRequires: xz
|
|
Obsoletes: %{name}-javadoc
|
|
BuildArch: noarch
|
|
|
|
%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 repolib
|
|
Summary: Artifacts to be uploaded to a repository library
|
|
Group: Development/Libraries/Java
|
|
|
|
%description repolib
|
|
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
|
|
Summary: Extract class/interface/method definitions from sources
|
|
Group: Development/Libraries/Java
|
|
|
|
%description javadoc
|
|
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.
|
|
|
|
%prep
|
|
%setup -q
|
|
# % patch1 -p1
|
|
# % patch2 -p1
|
|
cp -p %{SOURCE5} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java
|
|
sed -e "s/@VERSION@/%{version}/g" %{SOURCE6} > build.xml
|
|
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
|
|
sed -i "s/@TAG@/$tag/g" %{SOURCE7}
|
|
|
|
%build
|
|
export OPT_JAR_LIST="junit ant/ant-junit"
|
|
mkdir -p target/src/java/com/thoughtworks/qdox/parser/impl
|
|
export CLASSPATH=`pwd`/target/classes:`pwd`/target/test-classes:$(build-classpath java-cup jflex jmock)
|
|
java JFlex.Main \
|
|
-d src/java/com/thoughtworks/qdox/parser/impl \
|
|
--skel src/grammar/skeleton.inner \
|
|
src/grammar/lexer.flex
|
|
pushd target
|
|
%{_bindir}/byaccj \
|
|
-Jnorun \
|
|
-Jnoconstruct \
|
|
-Jclass=Parser \
|
|
-Jsemantic=Value \
|
|
-Jpackage=com.thoughtworks.qdox.parser.impl \
|
|
../src/grammar/parser.y
|
|
popd
|
|
mv target/Parser.java src/java/com/thoughtworks/qdox/parser/impl
|
|
rm -f src/java/com/thoughtworks/qdox/junit/APITestCase.java
|
|
ant -Dant.build.javac.source=6 -Dant.build.javac.target=6 -Dbuild.sysclasspath=only jar
|
|
|
|
%install
|
|
# jars
|
|
install -d -m 0755 %{buildroot}%{_javadir}
|
|
install -pm 644 target/%{name}-%{version}.jar \
|
|
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
|
install -d -m 755 %{buildroot}%{repodir}
|
|
install -d -m 755 %{buildroot}%{repodirlib}
|
|
install -p -m 644 %{SOURCE7} %{buildroot}%{repodir}/component-info.xml
|
|
install -d -m 755 %{buildroot}%{repodirsrc}
|
|
install -p -m 644 %{SOURCE0} %{buildroot}%{repodirsrc}
|
|
cp -p %{buildroot}%{_javadir}/qdox.jar %{buildroot}%{repodirlib}
|
|
|
|
# pom
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
|
|
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%license LICENSE.txt
|
|
%{_javadir}/%{name}.jar
|
|
%{_javadir}/%{name}-%{version}.jar
|
|
%{_mavenpomdir}/*
|
|
%if %{defined _maven_repository}
|
|
%{_mavendepmapfragdir}/%{name}
|
|
%else
|
|
%{_datadir}/maven-metadata/%{name}.xml*
|
|
%endif
|
|
|
|
%files repolib
|
|
%defattr(0644,root,root,0755)
|
|
%{repodir}
|
|
%dir %{_datadir}/java/repository.jboss.com/%{name}
|
|
%dir %{_datadir}/java/repository.jboss.com/
|
|
|
|
%changelog
|