]> git.pld-linux.org Git - packages/java-xerces.git/blob - java-xerces.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/java-xerces.git] / java-xerces.spec
1 #
2 # Conditional build:
3 %bcond_without  javadoc         # don't build javadoc
4
5 %define srcname xerces
6 Summary:        XML parser for Java
7 Summary(pl.UTF-8):      Analizator składniowy XML-a napisany w Javie
8 Name:           java-xerces
9 Version:        2.11.0
10 Release:        2
11 # appears that portions of the code are on other licenses.
12 # can it all be called "Apache 2.0"?
13 License:        Apache v2.0
14 Group:          Libraries/Java
15 Source0:        http://www.apache.org/dist/xerces/j/Xerces-J-src.%{version}.tar.gz
16 # Source0-md5:  d01fc11eacbe43b45681cb85ac112ebf
17 # Get Xerces-J-tools to avoid BuildRequires: xerces-j
18 Source1:        http://www.apache.org/dist/xerces/j/Xerces-J-tools.%{version}.tar.gz
19 # Source1-md5:  50700b3a6558202b056530babf80f1db
20 Patch0:         %{name}-jdk5.patch
21 URL:            http://xerces.apache.org/xerces-j/
22 BuildRequires:  ant >= 1.6.5
23 BuildRequires:  java(xml-commons-apis)
24 BuildRequires:  jdk
25 BuildRequires:  jpackage-utils
26 BuildRequires:  rpm-javaprov
27 BuildRequires:  rpmbuild(macros) >= 1.300
28 Requires:       java(xml-commons-apis)
29 Provides:       java(jaxp_parser_impl)
30 Provides:       xerces-j
31 Obsoletes:      xerces-j
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 XML parser for Java.
37
38 %description -l pl.UTF-8
39 Analizator składniowy XML-a napisany w Javie.
40
41 %package javadoc
42 Summary:        Documentation for Xerces - XML parser for Java
43 Summary(pl.UTF-8):      Dokumentacja do Xercesa - analizatora składniowego XML-a w Javie
44 Group:          Documentation
45 Requires:       jpackage-utils
46 Obsoletes:      xerces-j-doc
47 Obsoletes:      xerces-j-javadoc
48
49 %description javadoc
50 Documentation for Xerces - XML parser for Java.
51
52 %description javadoc -l pl.UTF-8
53 Dokumentacja do Xercesa - analizatora składniowego XML-a w Javie.
54
55 %description javadoc -l fr.UTF-8
56 Javadoc pour Xerces.
57
58 %prep
59 %setup -q -n xerces-%(echo %{version} | tr . _) -a1
60 %patch0 -p1
61
62 %build
63 required_jars='xml-commons-apis'
64 CLASSPATH=$(build-classpath $required_jars):./tools/xercesImpl.jar:./tools/bin/xjavac.jar
65 export CLASSPATH
66
67 %ant jars %{?with_javadoc:javadocs}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 # jars
72 install -d $RPM_BUILD_ROOT%{_javadir}
73 cp -a build/xercesImpl.jar $RPM_BUILD_ROOT%{_javadir}/xerces-j2-%{version}.jar
74 ln -sf xerces-j2-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/xerces-j2.jar
75 ln -sf xerces-j2-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/jaxp_parser_impl.jar
76 ln -sf xerces-j2-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/xercesImpl.jar
77
78 %if %{with javadoc}
79 # javadoc
80 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
81 cp -a build/docs/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
82 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post javadoc
89 ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
90
91 %files
92 %defattr(644,root,root,755)
93 %doc LICENSE* NOTICE* README Readme.html
94 %{_javadir}/jaxp_parser_impl.jar
95 %{_javadir}/xerces-j2-%{version}.jar
96 %{_javadir}/xerces-j2.jar
97 %{_javadir}/xercesImpl.jar
98
99 %if %{with javadoc}
100 %files javadoc
101 %defattr(644,root,root,755)
102 %{_javadocdir}/%{srcname}-%{version}
103 %ghost %{_javadocdir}/%{srcname}
104 %endif
This page took 0.06938 seconds and 4 git commands to generate.