1 |
# Copyright (c) 2000-2009, JPackage Project |
2 |
# All rights reserved. |
3 |
# |
4 |
# Redistribution and use in source and binary forms, with or without |
5 |
# modification, are permitted provided that the following conditions |
6 |
# are met: |
7 |
# |
8 |
# 1. Redistributions of source code must retain the above copyright |
9 |
# notice, this list of conditions and the following disclaimer. |
10 |
# 2. Redistributions in binary form must reproduce the above copyright |
11 |
# notice, this list of conditions and the following disclaimer in the |
12 |
# documentation and/or other materials provided with the |
13 |
# distribution. |
14 |
# 3. Neither the name of the JPackage Project nor the names of its |
15 |
# contributors may be used to endorse or promote products derived |
16 |
# from this software without specific prior written permission. |
17 |
# |
18 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
21 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 |
# |
30 |
|
31 |
Summary: Extract class/interface/method definitions from sources |
32 |
Name: qdox |
33 |
Version: 1.12.1 |
34 |
Release: %mkrel 3 |
35 |
Epoch: 0 |
36 |
License: ASL 2.0 |
37 |
URL: http://qdox.codehaus.org/ |
38 |
Group: Development/Java |
39 |
Source0: http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}/%{name}-%{version}-project.tar.bz2 |
40 |
Source1: qdox-MANIFEST.MF |
41 |
|
42 |
BuildRequires: jpackage-utils >= 0:1.7.4 |
43 |
BuildRequires: java-devel >= 1:1.6.0 |
44 |
BuildRequires: ant >= 0:1.6 |
45 |
BuildRequires: ant-junit >= 0:1.6 |
46 |
BuildRequires: junit >= 0:3.8.1 |
47 |
BuildRequires: byaccj |
48 |
BuildRequires: jflex |
49 |
BuildRequires: maven-local |
50 |
BuildRequires: maven-assembly-plugin |
51 |
BuildRequires: maven-compiler-plugin |
52 |
BuildRequires: maven-changes-plugin |
53 |
BuildRequires: maven-clean-plugin |
54 |
BuildRequires: maven-plugin-cobertura |
55 |
BuildRequires: maven-dependency-plugin |
56 |
BuildRequires: maven-deploy-plugin |
57 |
BuildRequires: maven-install-plugin |
58 |
BuildRequires: maven-jar-plugin |
59 |
BuildRequires: maven-javadoc-plugin |
60 |
BuildRequires: maven-site-plugin |
61 |
BuildRequires: maven-surefire-plugin |
62 |
BuildRequires: maven-surefire-provider-junit |
63 |
BuildRequires: maven-release-plugin |
64 |
BuildRequires: zip |
65 |
|
66 |
Requires: java >= 1:1.6.0 |
67 |
|
68 |
BuildArch: noarch |
69 |
Obsoletes: qdox-manual <= 0:1.9.2 |
70 |
|
71 |
|
72 |
%description |
73 |
QDox is a high speed, small footprint parser |
74 |
for extracting class/interface/method definitions |
75 |
from source files complete with JavaDoc @tags. |
76 |
It is designed to be used by active code |
77 |
generators or documentation tools. |
78 |
|
79 |
%package javadoc |
80 |
Summary: Javadoc for %{name} |
81 |
Group: Documentation |
82 |
Requires: jpackage-utils |
83 |
|
84 |
%description javadoc |
85 |
API docs for %{name}. |
86 |
|
87 |
|
88 |
%prep |
89 |
%setup -q |
90 |
find -name *.jar -delete |
91 |
rm -rf bootstrap |
92 |
|
93 |
# Ant changed groupId |
94 |
%pom_remove_dep ant:ant |
95 |
%pom_add_dep org.apache.ant:ant |
96 |
|
97 |
%pom_remove_dep jmock:jmock |
98 |
# We don't need these plugins |
99 |
%pom_remove_plugin :maven-antrun-plugin |
100 |
%pom_remove_plugin :maven-jflex-plugin |
101 |
%pom_remove_plugin :maven-resources-plugin |
102 |
%pom_remove_plugin :xsite-maven-plugin |
103 |
%pom_xpath_remove pom:build/pom:extensions |
104 |
|
105 |
%build |
106 |
# Generate scanner (upstream does this with maven-jflex-plugin) |
107 |
jflex \ |
108 |
-d src/java \ |
109 |
--skel src/grammar/skeleton.inner \ |
110 |
src/grammar/lexer.flex |
111 |
|
112 |
# Generate parser (upstream does this with maven-antrun-plugin) |
113 |
dir=src/java/com/thoughtworks/qdox/parser/impl |
114 |
mkdir -p $dir |
115 |
(cd ./$dir |
116 |
byaccj \ |
117 |
-v \ |
118 |
-Jnorun \ |
119 |
-Jnoconstruct \ |
120 |
-Jclass=Parser \ |
121 |
-Jsemantic=Value \ |
122 |
-Jpackage=com.thoughtworks.qdox.parser.impl \ |
123 |
../../../../../../grammar/parser.y) |
124 |
|
125 |
# Build artifact |
126 |
mvn-rpmbuild \ |
127 |
-Dmaven.test.skip=true \ |
128 |
install \ |
129 |
javadoc:aggregate |
130 |
|
131 |
# Inject OSGi manifests |
132 |
mkdir -p META-INF |
133 |
cp -p %{SOURCE1} META-INF/MANIFEST.MF |
134 |
touch META-INF/MANIFEST.MF |
135 |
zip -u target/%{name}-%{version}.jar META-INF/MANIFEST.MF |
136 |
|
137 |
%install |
138 |
# jars |
139 |
mkdir -p $RPM_BUILD_ROOT%{_javadir} |
140 |
cp -p target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar |
141 |
|
142 |
# poms |
143 |
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} |
144 |
install -m 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom |
145 |
|
146 |
%add_maven_depmap -a qdox:qdox |
147 |
|
148 |
# javadoc |
149 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
150 |
cp -pr target/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
151 |
|
152 |
%files |
153 |
%doc LICENSE.txt README.txt |
154 |
%{_javadir}/%{name}.jar |
155 |
%{_mavenpomdir}/* |
156 |
%{_mavendepmapfragdir}/* |
157 |
|
158 |
%files javadoc |
159 |
%doc LICENSE.txt |
160 |
%doc %{_javadocdir}/%{name} |
161 |
|