- Remove maven conditionals
- Drop javadoc to bootstrap OBS-URL: https://build.opensuse.org/package/show/Java:packages/qdox?expand=0&rev=18
This commit is contained in:
parent
13b9500d52
commit
adaf7877ce
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 9 10:30:22 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Remove maven conditionals
|
||||||
|
- Drop javadoc to bootstrap
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 28 08:39:19 UTC 2014 - coolo@suse.com
|
Thu Aug 28 08:39:19 UTC 2014 - coolo@suse.com
|
||||||
|
|
||||||
|
122
qdox.spec
122
qdox.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qdox
|
# spec file for package qdox
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,18 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%bcond_with maven
|
|
||||||
%bcond_with junit_test
|
|
||||||
# If you want repolib package to be built,
|
|
||||||
# issue the following: 'rpmbuild --with repolib'
|
|
||||||
%define _with_repolib 1
|
|
||||||
%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
|
|
||||||
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}
|
|
||||||
%define repodir %{_javadir}/repository.jboss.com/qdox/1.6.1-brew
|
%define repodir %{_javadir}/repository.jboss.com/qdox/1.6.1-brew
|
||||||
%define repodirlib %{repodir}/lib
|
%define repodirlib %{repodir}/lib
|
||||||
%define repodirsrc %{repodir}/src
|
%define repodirsrc %{repodir}/src
|
||||||
%define section free
|
|
||||||
|
|
||||||
Name: qdox
|
Name: qdox
|
||||||
Version: 1.12.1
|
Version: 1.12.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -45,34 +36,16 @@ Source4: qdox-1.6-jpp-depmap.xml
|
|||||||
Source5: qdox-LocatedDef.java
|
Source5: qdox-LocatedDef.java
|
||||||
Source6: qdox-build.xml
|
Source6: qdox-build.xml
|
||||||
Source7: qdox-component-info.xml
|
Source7: qdox-component-info.xml
|
||||||
BuildRequires: gpg2
|
|
||||||
BuildRequires: javapackages-tools
|
|
||||||
BuildRequires: xz
|
|
||||||
%if %with maven
|
|
||||||
BuildRequires: jmock >= 1.0
|
|
||||||
BuildRequires: maven >= 1.1
|
|
||||||
BuildRequires: maven-plugin-license
|
|
||||||
BuildRequires: maven-plugin-test
|
|
||||||
BuildRequires: maven-plugin-xdoc
|
|
||||||
BuildRequires: maven-plugins-base
|
|
||||||
BuildRequires: mockobjects >= 0.09
|
|
||||||
BuildRequires: saxon9
|
|
||||||
BuildRequires: saxon9-scripts
|
|
||||||
%endif
|
|
||||||
BuildRequires: ant >= 1.6
|
BuildRequires: ant >= 1.6
|
||||||
#BuildRequires: ant-junit >= 1.6
|
|
||||||
BuildRequires: byaccj
|
BuildRequires: byaccj
|
||||||
%if %{with junit_test}
|
BuildRequires: gpg2
|
||||||
BuildRequires: java-cup
|
|
||||||
BuildRequires: jflex
|
|
||||||
BuildRequires: jmock
|
|
||||||
BuildRequires: junit >= 3.8.1
|
|
||||||
%else
|
|
||||||
BuildRequires: java-cup-bootstrap
|
BuildRequires: java-cup-bootstrap
|
||||||
|
BuildRequires: javapackages-tools
|
||||||
BuildRequires: jflex-bootstrap
|
BuildRequires: jflex-bootstrap
|
||||||
%endif
|
BuildRequires: xz
|
||||||
BuildArch: noarch
|
Obsoletes: %{name}-javadoc
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
QDox is a high speed, small footprint parser for extracting
|
QDox is a high speed, small footprint parser for extracting
|
||||||
@ -80,10 +53,6 @@ class/interface/method definitions from source files complete with
|
|||||||
JavaDoc @tags. It is designed to be used by active code generators or
|
JavaDoc @tags. It is designed to be used by active code generators or
|
||||||
documentation tools.
|
documentation tools.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with_repolib}
|
|
||||||
|
|
||||||
%package repolib
|
%package repolib
|
||||||
Summary: Artifacts to be uploaded to a repository library
|
Summary: Artifacts to be uploaded to a repository library
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
@ -94,10 +63,6 @@ class/interface/method definitions from source files complete with
|
|||||||
JavaDoc @tags. It is designed to be used by active code generators or
|
JavaDoc @tags. It is designed to be used by active code generators or
|
||||||
documentation tools.
|
documentation tools.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Extract class/interface/method definitions from sources
|
Summary: Extract class/interface/method definitions from sources
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
@ -108,50 +73,20 @@ class/interface/method definitions from source files complete with
|
|||||||
JavaDoc @tags. It is designed to be used by active code generators or
|
JavaDoc @tags. It is designed to be used by active code generators or
|
||||||
documentation tools.
|
documentation tools.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
# % patch1 -p1
|
# % patch1 -p1
|
||||||
# % patch2 -p1
|
# % patch2 -p1
|
||||||
cp -p %{SOURCE5} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java
|
cp -p %{SOURCE5} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java
|
||||||
sed -e "s/@VERSION@/%{version}/g" %{SOURCE6} > build.xml
|
sed -e "s/@VERSION@/%{version}/g" %{SOURCE6} > build.xml
|
||||||
%if %{with_repolib}
|
|
||||||
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
|
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
|
||||||
sed -i "s/@TAG@/$tag/g" %{SOURCE7}
|
sed -i "s/@TAG@/$tag/g" %{SOURCE7}
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %with maven
|
|
||||||
export DEPCAT=$(pwd)/qdox-1.6-depcat.new.xml
|
|
||||||
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
|
|
||||||
echo '<depset>' >> $DEPCAT
|
|
||||||
for p in $(find . -name project.xml); do
|
|
||||||
pushd $(dirname $p)
|
|
||||||
%{_bindir}/saxon9 project.xml %{SOURCE1} >> $DEPCAT
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
echo >> $DEPCAT
|
|
||||||
echo '</depset>' >> $DEPCAT
|
|
||||||
%{_bindir}/saxon9 $DEPCAT %{SOURCE2} > qdox-1.6-depmap.new.xml
|
|
||||||
for p in $(find . -name project.xml); do
|
|
||||||
pushd $(dirname $p)
|
|
||||||
cp project.xml project.xml.orig
|
|
||||||
%{_bindir}/saxon9 -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
export MAVEN_HOME_LOCAL=$(pwd)/.maven
|
|
||||||
export CLASSPATH=$(build-classpath junit)
|
|
||||||
maven \
|
|
||||||
-Dmaven.repo.remote=file:/usr/share/maven-1.0/repository \
|
|
||||||
-Dmaven.home.local=$MAVEN_HOME_LOCAL \
|
|
||||||
-Dqdox.byaccj.executable=byaccj \
|
|
||||||
jar javadoc
|
|
||||||
%else
|
|
||||||
export OPT_JAR_LIST="junit ant/ant-junit"
|
export OPT_JAR_LIST="junit ant/ant-junit"
|
||||||
mkdir -p target/src/java/com/thoughtworks/qdox/parser/impl
|
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)
|
export CLASSPATH=`pwd`/target/classes:`pwd`/target/test-classes:$(build-classpath java-cup jflex jmock)
|
||||||
%{java} JFlex.Main \
|
java JFlex.Main \
|
||||||
-d src/java/com/thoughtworks/qdox/parser/impl \
|
-d src/java/com/thoughtworks/qdox/parser/impl \
|
||||||
--skel src/grammar/skeleton.inner \
|
--skel src/grammar/skeleton.inner \
|
||||||
src/grammar/lexer.flex
|
src/grammar/lexer.flex
|
||||||
@ -165,37 +100,21 @@ pushd target
|
|||||||
../src/grammar/parser.y
|
../src/grammar/parser.y
|
||||||
popd
|
popd
|
||||||
mv target/Parser.java src/java/com/thoughtworks/qdox/parser/impl
|
mv target/Parser.java src/java/com/thoughtworks/qdox/parser/impl
|
||||||
%if ! %{with junit_test}
|
|
||||||
rm -f src/java/com/thoughtworks/qdox/junit/APITestCase.java
|
rm -f src/java/com/thoughtworks/qdox/junit/APITestCase.java
|
||||||
%endif
|
ant -Dbuild.sysclasspath=only jar
|
||||||
ant -Dbuild.sysclasspath=only jar javadoc
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?suse_version} == 1110
|
|
||||||
export NO_BRP_CHECK_BYTECODE_VERSION=true
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
mkdir -p %{buildroot}%{_javadir}
|
||||||
cp -p target/%{name}-%{version}.jar \
|
cp -p target/%{name}-%{version}.jar \
|
||||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||||
# javadoc
|
install -d -m 755 %{buildroot}%{repodir}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
install -d -m 755 %{buildroot}%{repodirlib}
|
||||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
install -p -m 644 %{SOURCE7} %{buildroot}%{repodir}/component-info.xml
|
||||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
install -d -m 755 %{buildroot}%{repodirsrc}
|
||||||
%if %{with_repolib}
|
install -p -m 644 %{SOURCE0} %{buildroot}%{repodirsrc}
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
|
cp -p %{buildroot}%{_javadir}/qdox.jar %{buildroot}%{repodirlib}
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
|
|
||||||
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{repodir}/component-info.xml
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
|
|
||||||
install -p -m 644 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
|
|
||||||
cp -p $RPM_BUILD_ROOT%{_javadir}/qdox.jar $RPM_BUILD_ROOT%{repodirlib}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
@ -203,17 +122,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_javadir}/%{name}.jar
|
%{_javadir}/%{name}.jar
|
||||||
%{_javadir}/%{name}-%{version}.jar
|
%{_javadir}/%{name}-%{version}.jar
|
||||||
|
|
||||||
%files javadoc
|
|
||||||
%defattr(0644,root,root,0755)
|
|
||||||
%{_javadocdir}/%{name}-%{version}
|
|
||||||
%{_javadocdir}/%{name}
|
|
||||||
%if %{with_repolib}
|
|
||||||
|
|
||||||
%files repolib
|
%files repolib
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%{repodir}
|
%{repodir}
|
||||||
%dir %{_datadir}/java/repository.jboss.com/%{name}
|
%dir %{_datadir}/java/repository.jboss.com/%{name}
|
||||||
%dir %{_datadir}/java/repository.jboss.com/
|
%dir %{_datadir}/java/repository.jboss.com/
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user