]> git.pld-linux.org Git - packages/java-xmlgraphics-batik.git/blob - java-xmlgraphics-batik.spec
- dependencies
[packages/java-xmlgraphics-batik.git] / java-xmlgraphics-batik.spec
1 # TODO:
2 # - generate docs without using forrest. It seems to be possible.
3 # - do not use pdf-transcoder.jar from batik sources. See comments in %%prep
4 #
5 # Conditional build:
6 %bcond_with     docs            # build with docs (require apache-forrest)
7 #
8 Summary:        Java SVG support
9 Summary(pl.UTF-8):      Wsparcie dla SVG dla języka Java
10 Name:           batik
11 Version:        1.7
12 Release:        0.1
13 License:        Apache
14 Group:          Applications/Publishing/XML/Java
15 Source0:        http://www.apache.org/dist/xmlgraphics/batik/%{name}-src-%{version}.zip
16 # Source0-md5:  c117ca2241907f62a2b3031167ebf917
17 Patch0:         %{name}-nodocs.patch
18 URL:            http://xml.apache.org/batik/
19 %{?with_docs:BuildRequires:     apache-forrest}
20 BuildRequires:  jdk >= 1.4
21 BuildRequires:  jpackage-utils
22 BuildRequires:  rhino
23 BuildRequires:  unzip
24 BuildRequires:  xalan-c
25 BuildRequires:  xalan-j
26 BuildRequires:  xml-commons-external
27 Requires:       jre >= 1.4
28 Requires:       rhino
29 Requires:       xalan-c
30 Requires:       xalan-j
31 Requires:       xml-commons-external
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Java SVG support.
37
38 %description -l pl.UTF-8
39 Wsparcie dla SVG dla języka Java.
40
41 %package doc
42 Summary:        Documentation for the Batik library
43 Summary(pl.UTF-8):      Dokumentacja dla biblioteki Batik
44 Group:          Documentation
45
46 %description doc
47 Documentation for the Batik library.
48
49 %description doc -l pl.UTF-8
50 Dokumentacja dla biblioteki Batik.
51
52 %prep
53 %setup -q
54
55 %if %{without docs}
56 %patch0 -p0
57 %endif
58
59 #
60 # We do want to use system libs
61 # problem:
62 #   pdf-transcoder.jar is provided by fop, but this spec is BR for for. So we
63 #   have to use pdf-transcoder.jar from batik sources.
64 #
65
66 br_jars='js xalan xercesImpl xml-apis xml-apis-ext'
67 rm lib/js.jar lib/xalan*.jar lib/xerces*.jar lib/xml-apis*.jar
68 for jar in $br_jars; do
69   ln -s $(find-jar $jar) lib
70 done
71
72 %build
73 unset CLASSPATH || :
74 export JAVA_HOME="%{java_home}"
75
76 #sh build.sh dist-tgz # does not work :-(
77 sh build.sh dist-zip
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_javadir}/%{name}/lib
82
83 cd %{name}-%{version}
84 for jar in batik*.jar; do
85   base=$(basename $jar .jar)
86   install $jar $RPM_BUILD_ROOT%{_javadir}/$base-%{version}.jar
87   ln -s $base-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/$base.jar
88 done
89
90 cd lib
91 for jar in batik*.jar; do
92   install $jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$jar
93 done
94
95 #
96 # get rid of this jar!!! see TODO
97 #
98 install pdf-transcoder.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/pdf-transcoder.jar
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %files
104 %defattr(644,root,root,755)
105 %doc CHANGES KEYS NOTICE README
106 %dir %{_javadir}/batik*.jar
107 %{_javadir}/%{name}
108
109 %if %{with docs}
110 %files doc
111 %defattr(644,root,root,755)
112 %doc %{name}-%{version}/docs/* %{name}-%{version}/samples
113 %endif
This page took 0.031312 seconds and 4 git commands to generate.