/[packages]/cauldron/xerces-j2/current/SPECS/xerces-j2.spec
ViewVC logotype

Contents of /cauldron/xerces-j2/current/SPECS/xerces-j2.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32676 - (show annotations) (download)
Sat Jan 22 13:18:42 2011 UTC (10 years, 8 months ago) by dmorgan
File size: 7255 byte(s)
Fix JAXP provide
1 %define cvs_version 2_9_0
2 %define section free
3 %define gcj_support 1
4
5 Name: xerces-j2
6 Version: 2.9.0
7 Release: %mkrel 14
8 Epoch: 0
9 Summary: Java XML parser
10 License: Apache License
11 URL: http://xml.apache.org/xerces2-j/
12 Group: Development/Java
13 Source0: http://www.apache.org/dist/xml/xerces-j/Xerces-J-src.%{version}.tar.gz
14 Source1: http://www.apache.org/dist/xml/xerces-j/Xerces-J-src.%{version}.tar.gz.md5
15 Source2: http://www.apache.org/dist/xml/xerces-j/Xerces-J-src.%{version}.tar.gz.sig
16 Source3: %{name}-version.sh
17 Source4: %{name}-constants.sh
18 Source5: XJavac.java
19 Patch0: %{name}-build.patch
20 Patch1: %{name}-libgcj.patch
21 Provides: jaxp_parser_impl = 1.4
22 Requires: xalan-j2
23 Requires: xml-commons-jaxp-1.3-apis
24 Requires: xml-commons-resolver12 >= 0:1.1
25 Requires(post): update-alternatives
26 Requires(preun): update-alternatives
27 BuildRequires: java-devel
28 BuildRequires: ant >= 0:1.5
29 BuildRequires: java-rpmbuild >= 0:1.5
30 BuildRequires: jaxp_parser_impl
31 BuildRequires: xalan-j2
32 BuildRequires: xml-commons-resolver12 >= 0:1.3
33 BuildRequires: xml-commons-jaxp-1.3-apis
34 BuildRequires: coreutils
35 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
36 # RHEL3 and FC2
37 Obsoletes: xerces-j <= 0:2.2
38 %if %{gcj_support}
39 BuildRequires: java-gcj-compat-devel >= 0:1.0.31
40 %else
41 BuildArch: noarch
42 %endif
43
44 %description
45 Welcome to the future! Xerces2 is the next generation of high
46 performance, fully compliant XML parsers in the Apache Xerces family.
47 This new version of Xerces introduces the Xerces Native Interface (XNI),
48 a complete framework for building parser components and configurations
49 that is extremely modular and easy to program.
50
51 The Apache Xerces2 parser is the reference implementation of XNI but
52 other parser components, configurations, and parsers can be written
53 using the Xerces Native Interface. For complete design and
54 implementation documents, refer to the XNI Manual.
55
56 Xerces 2 is a fully conforming XML Schema processor. For more
57 information, refer to the XML Schema page.
58
59 Xerces 2 also provides a partial implementation of Document Object Model
60 Level 3 Core, Load and Save and Abstract Schemas [deprecated] Working
61 Drafts. For more information, refer to the DOM Level 3 Implementation
62 page.
63
64 %package javadoc-impl
65 Summary: Javadoc for %{name} implementation
66 Group: Development/Java
67
68 %description javadoc-impl
69 Javadoc for %{name} implementation.
70
71 %package javadoc-apis
72 Summary: Javadoc for %{name} apis
73 Group: Development/Java
74
75 %description javadoc-apis
76 Javadoc for %{name} apis.
77
78 %package javadoc-xni
79 Summary: Javadoc for %{name} xni
80 Group: Development/Java
81
82 %description javadoc-xni
83 Javadoc for %{name} xni.
84
85 %package javadoc-other
86 Summary: Javadoc for other %{name} components
87 Group: Development/Java
88
89 %description javadoc-other
90 Javadoc for other %{name} components.
91
92 %package demo
93 Summary: Demo for %{name}
94 Group: Development/Java
95 Requires: %{name} = %{epoch}:%{version}-%{release}
96
97 %description demo
98 Demonstrations and samples for %{name}.
99
100 %package scripts
101 Summary: Additional utility scripts for %{name}
102 Group: Development/Java
103 Requires: %{name} = %{epoch}:%{version}-%{release}
104 Requires: jpackage-utils >= 0:1.5
105
106 %description scripts
107 Additional utility scripts for %{name}.
108
109 %prep
110 %setup -q -n xerces-%{cvs_version}
111 %patch0 -p1 -b .build
112
113 mkdir -p tools/org/apache/xerces/util
114 cp -a %{SOURCE5} tools/org/apache/xerces/util
115 %patch1 -p0 -b .libgcj
116
117
118 %build
119 pushd tools
120 %{javac} -classpath $(build-classpath ant) org/apache/xerces/util/XJavac.java
121 mkdir bin && %{jar} cf bin/xjavac.jar org/apache/xerces/util/XJavac.class
122 popd
123
124 export CLASSPATH=
125 export OPT_JAR_LIST=:
126 %{ant} \
127 -Dbuild.compiler=modern \
128 -Dtools.dir=%{_javadir} \
129 -Djar.apis=xml-commons-jaxp-1.3-apis.jar \
130 -Djar.resolver=xml-commons-resolver12.jar \
131 -Djar.serializer=xalan-j2-serializer.jar \
132 clean jars javadocs
133 export GCJ_PROPERTIES=
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137
138 # jars
139 mkdir -p $RPM_BUILD_ROOT%{_javadir}
140 cp -p build/xercesImpl.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
141 (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
142
143 # javadoc
144 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version}
145 #cp -pr build/docs/javadocs/xerces2/* \
146 # $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version}
147 ln -s %{name}-impl-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl
148
149 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
150 #cp -pr build/docs/javadocs/api/* \
151 # $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
152 ln -s %{name}-apis-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis
153
154 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version}
155 #cp -pr build/docs/javadocs/xni/* \
156 # $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version}
157 ln -s %{name}-xni-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni
158
159 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version}
160 #cp -pr build/docs/javadocs/other/* \
161 # $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version}
162 ln -s %{name}-other-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other
163
164 rm -rf build/docs/javadocs
165
166 # scripts
167 mkdir -p $RPM_BUILD_ROOT%{_bindir}
168 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/%{name}-version
169 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/%{name}-constants
170
171 # demo
172 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
173 cp -p build/xercesSamples.jar \
174 $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-samples.jar
175 cp -pr data $RPM_BUILD_ROOT%{_datadir}/%{name}
176
177 %if %{gcj_support}
178 %{_bindir}/aot-compile-rpm
179 %endif
180
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %pre
186 rm -f %{_javadir}/xerces.jar
187
188 %post
189 %{_sbindir}/update-alternatives --install %{_javadir}/jaxp_parser_impl.jar \
190 jaxp_parser_impl %{_javadir}/%{name}.jar 40
191 %if %{gcj_support}
192 %{update_gcjdb}
193 %endif
194
195 %preun
196 {
197 [ $1 = 0 ] || exit 0
198 %{_sbindir}/update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar
199 } >/dev/null 2>&1 || :
200
201 %if %{gcj_support}
202 %postun
203 %{clean_gcjdb}
204
205 %post demo
206 %{update_gcjdb}
207
208 %postun demo
209 %{clean_gcjdb}
210 %endif
211
212 %files
213 %defattr(0644,root,root,0755)
214 %doc LICENSE LICENSE-SAX.html LICENSE.DOM-documentation.html
215 %doc LICENSE.DOM-software.html LICENSE.resolver.txt
216 %doc LICENSE.serializer.txt NOTICE NOTICE.resolver.txt
217 %doc NOTICE.serializer.txt README Readme.html
218 %{_javadir}/%{name}*.jar
219 %if %{gcj_support}
220 %dir %{_libdir}/gcj/%{name}
221 %attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
222 %endif
223
224 %files javadoc-impl
225 %defattr(0644,root,root,0755)
226 %doc %{_javadocdir}/%{name}-impl-%{version}
227 %ghost %doc %{_javadocdir}/%{name}-impl
228
229 %files javadoc-apis
230 %defattr(0644,root,root,0755)
231 %doc %{_javadocdir}/%{name}-apis-%{version}
232 %ghost %doc %{_javadocdir}/%{name}-apis
233
234 %files javadoc-other
235 %defattr(0644,root,root,0755)
236 %doc %{_javadocdir}/%{name}-other-%{version}
237 %ghost %doc %{_javadocdir}/%{name}-other
238
239 %files javadoc-xni
240 %defattr(0644,root,root,0755)
241 %doc %{_javadocdir}/%{name}-xni-%{version}
242 %ghost %doc %{_javadocdir}/%{name}-xni
243
244 %files demo
245 %defattr(0644,root,root,0755)
246 %{_datadir}/%{name}
247 %if %{gcj_support}
248 %attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-samples.jar.*
249 %endif
250
251 %files scripts
252 %defattr(0755,root,root,0755)
253 %{_bindir}/*
254
255

  ViewVC Help
Powered by ViewVC 1.1.28