/[packages]/cauldron/icu4j/current/SPECS/icu4j.spec
ViewVC logotype

Contents of /cauldron/icu4j/current/SPECS/icu4j.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 114975 - (show annotations) (download)
Mon Jun 27 22:14:54 2011 UTC (12 years, 9 months ago) by gil
File size: 8223 byte(s)
add sub package extra (icu4j-charsets is required by apache harmony)
1 # Copyright (c) 2000-2007, 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 %global with_eclipse 1
31
32 %global with_extra 1
33
34 %global section free
35
36 # Note: this next section looks weird having an arch specified in a
37 # noarch specfile but the parts of the build
38 # All arches line up between Eclipse and Linux kernel names except i386 -> x86
39 %ifarch %{ix86}
40 %global eclipse_arch x86
41 %else
42 %global eclipse_arch %{_arch}
43 %endif
44
45
46 %define section free
47
48 %define eclipse_name eclipse
49 %define eclipse_base %{_libdir}/%{eclipse_name}
50
51 # Note: this next section looks weird having an arch specified in a
52 # noarch specfile but the parts of the build
53 # All arches line up between Eclipse and Linux kernel names except i386 -> x86
54 %ifarch %{ix86}
55 %define eclipse_arch x86
56 %else
57 %define eclipse_arch %{_arch}
58 %endif
59
60 Name: icu4j
61 Version: 4.2.1
62 Release: %mkrel 3
63 Epoch: 1
64 Summary: International Components for Unicode for Java
65 License: MIT and EPL
66 URL: http://www-306.ibm.com/software/globalization/icu/index.jsp
67 Group: Development/Java
68 Source0: http://download.icu-project.org/files/icu4j/3.8.1/icu4j-4_2_1-src.jar
69 Source1: http://repo2.maven.org/maven2/com/ibm/icu/icu4j/4.0.1/%{name}-4.0.1.pom
70 Patch0: %{name}-crosslink.patch
71 # PDE Build is in a location the upstream build.xml doesn't check
72 Patch4: %{name}-pdebuildlocation.patch
73 BuildRequires: ant
74 BuildRequires: java-javadoc
75 BuildRequires: java-rpmbuild >= 0:1.5
76 BuildRequires: zip
77 Requires: jpackage-utils
78 %if %{with_eclipse}
79 BuildRequires: eclipse-pde >= 0:3.2.1
80 %endif
81 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
82
83 %description
84 The International Components for Unicode (ICU) library provides robust and
85 full-featured Unicode services on a wide variety of platforms. ICU supports
86 the most current version of the Unicode standard, and provides support for
87 supplementary characters (needed for GB 18030 repertoire support).
88
89 Java provides a very strong foundation for global programs, and IBM and the
90 ICU team played a key role in providing globalization technology into Sun's
91 Java. But because of its long release schedule, Java cannot always keep
92 up-to-date with evolving standards. The ICU team continues to extend Java's
93 Unicode and internationalization support, focusing on improving
94 performance, keeping current with the Unicode standard, and providing
95 richer APIs, while remaining as compatible as possible with the original
96 Java text and internationalization API design.
97
98 %package javadoc
99 Summary: Javadoc for %{name}
100 Group: Development/Java
101 Requires: jpackage-utils
102
103 %description javadoc
104 Javadoc for %{name}.
105
106 %if %{with_eclipse}
107 %package eclipse
108 Summary: Eclipse plugin for %{name}
109 Group: Development/Java
110 Requires: jpackage-utils
111
112 %description eclipse
113 Eclipse plugin support for %{name}.
114
115 %endif
116
117 %if %{with_extra}
118 %package extra
119 Summary: Extra %{name} libraries
120 Group: Development/Java
121 Requires: %{name} = %{version}-%{release}
122 Requires: jpackage-utils
123
124 %description extra
125 Extra %{name} libraries.
126
127 %endif
128
129 %prep
130 %setup -q -c
131 %patch0 -p0
132 %patch4 -p0
133
134 cp %{SOURCE1} .
135
136 %{__sed} -i 's/\r//' license.html
137 %{__sed} -i 's/\r//' APIChangeReport.html
138 %{__sed} -i 's/\r//' readme.html
139
140 sed --in-place "s/ .*bootclasspath=.*//g" build.xml
141 sed --in-place "s/<date datetime=.*when=\"after\"\/>//" build.xml
142 sed --in-place "/javac1.3/d" build.xml
143 sed --in-place "s:/usr/lib:%{_libdir}:g" build.xml
144
145 %build
146 %if %{with_eclipse}
147 %ant -Dj2se.apidoc=%{_javadocdir}/java -Declipse.home=%{eclipse_base} \
148 -Declipse.basews=gtk -Declipse.baseos=linux \
149 -Declipse.basearch=%{eclipse_arch} \
150 -Dicu4j.eclipse.build.version.string=4.2.1.v20100412 \
151 jar docs eclipsePDEBuild
152 %else
153 %ant -Dicu4j.javac.source=1.5 -Dicu4j.javac.target=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs
154 %endif
155
156 %if %{with_extra}
157 ant \
158 -Dicu4j.javac.source=1.5 \
159 -Dicu4j.javac.target=1.5 \
160 -Dj2se.apidoc=%{_javadocdir}/java \
161 richeditJar richeditDocs xliff cldrUtil icutzucheck jarTests jarDemos
162
163 pushd localespi
164 ant \
165 -Dicu4j.javac.source=1.5 \
166 -Dicu4j.javac.target=1.5 \
167 build-jar
168 popd
169 %endif
170
171 %install
172 %__rm -rf %{buildroot}
173
174 # jars
175 %__mkdir_p %{buildroot}%{_javadir}
176 %__cp -ap %{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
177
178 # required by apache harmony
179 %__cp -ap %{name}-charsets.jar %{buildroot}%{_javadir}/%{name}-charsets-%{version}.jar
180
181 %__cp -ap localespi/%{name}-localespi.jar %{buildroot}%{_javadir}/%{name}-localespi-%{version}.jar
182 %__cp -ap utilities.jar %{buildroot}%{_javadir}/%{name}-utilities-%{version}.jar
183 %__cp -ap xliff.jar %{buildroot}%{_javadir}/%{name}-xliff-%{version}.jar
184 %__cp -ap richedit/richedit.jar %{buildroot}%{_javadir}/%{name}-richedit-%{version}.jar
185 %__cp -ap icu4jtzu/icutzu.jar %{buildroot}%{_javadir}/%{name}-icutzu-%{version}.jar
186
187 (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do %__ln_s ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
188
189 # javadoc
190 %__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
191 %__cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
192 %__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
193
194 %if %{with_eclipse}
195 # eclipse
196 install -d -m755 %{buildroot}/%{eclipse_base}
197
198 unzip -qq -d %{buildroot}/%{eclipse_base} eclipseProjects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
199 %endif
200
201 # maven stuff
202 install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
203 cp %{name}-4.0.1.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
204 %add_to_maven_depmap com.ibm.icu %{name} %{version} JPP %{name}
205
206 %post
207 %update_maven_depmap
208
209 %postun
210 %update_maven_depmap
211
212 %files
213 %defattr(0644,root,root,0755)
214 %doc license.html readme.html APIChangeReport.html
215 %{_javadir}/%{name}-%{version}.jar
216 %{_javadir}/%{name}.jar
217 %{_mavendepmapfragdir}/*
218 %{_mavenpomdir}/JPP-icu4j.pom
219
220 %files javadoc
221 %defattr(0644,root,root,0755)
222 %doc %{_javadocdir}/*
223
224 %if %{with_eclipse}
225 %files eclipse
226 %defattr(0644,root,root,0755)
227 %dir %{_libdir}/eclipse
228 %dir %{_libdir}/eclipse/features
229 %dir %{_libdir}/eclipse/plugins
230 %{_libdir}/eclipse/features/*
231 %{_libdir}/eclipse/plugins/*
232 %doc license.html readme.html
233 %endif
234
235 %if %{with_extra}
236 %defattr(0644,root,root,0755)
237 %{_javadir}/icu4j-charsets-%{version}.jar
238 %{_javadir}/icu4j-charsets.jar
239 %{_javadir}/icu4j-icutzu-%{version}.jar
240 %{_javadir}/icu4j-icutzu.jar
241 %{_javadir}/icu4j-localespi-%{version}.jar
242 %{_javadir}/icu4j-localespi.jar
243 %{_javadir}/icu4j-richedit-%{version}.jar
244 %{_javadir}/icu4j-richedit.jar
245 %{_javadir}/icu4j-utilities-%{version}.jar
246 %{_javadir}/icu4j-utilities.jar
247 %{_javadir}/icu4j-xliff-%{version}.jar
248 %{_javadir}/icu4j-xliff.jar
249
250 %endif

  ViewVC Help
Powered by ViewVC 1.1.30