File icu4j.spec of Package icu4j
167
1
#
2
# spec file for package icu4j
3
#
4
# Copyright (c) 2022 SUSE LLC
5
# Copyright (c) 2000-2007, JPackage Project
6
#
7
# All modifications and additions to the file contributed by third parties
8
# remain the property of their copyright owners, unless otherwise agreed
9
# upon. The license for this file, and modifications and additions to the
10
# file, is the same license as for the pristine package itself (unless the
11
# license for the pristine package is not an Open Source License, in which
12
# case the license is the MIT License). An "Open Source License" is a
13
# license that conforms to the Open Source Definition (Version 1.9)
14
# published by the Open Source Initiative.
15
16
# Please submit bugfixes or comments via https://bugs.opensuse.org/
17
#
18
19
20
%global majorver 71
21
%global minorver 1
22
Name: icu4j
23
Version: %{majorver}.%{minorver}
24
Release: 0
25
Summary: International Components for Unicode for Java
26
# ICU itself is now covered by Unicode license, but still has contributed
27
# components covered by MIT and BSD licenses
28
# Data from the Timezone Database is Public Domain
29
License: BSD-3-Clause AND MIT AND Unicode AND SUSE-Public-Domain
30
Group: Development/Libraries/Java
31
URL: http://site.icu-project.org/
32
Source0: https://github.com/unicode-org/icu/releases/download/release-%{majorver}-%{minorver}/%{name}-%{majorver}_%{minorver}.tgz
33
Patch0: icu4j-jdk10plus.patch
34
# Add better OSGi metadata to core jar
35
Patch1: improve-osgi-manifest.patch
36
Patch2: icu4j-70.1-java8compat.patch
37
Patch3: icu4j-javadoc.patch
38
BuildRequires: ant
39
BuildRequires: fdupes
40
BuildRequires: java-devel
41
BuildRequires: javapackages-local
42
BuildArch: noarch
43
44
%description
45
The International Components for Unicode (ICU) library provides robust and
46
full-featured Unicode services on a wide variety of platforms. ICU supports
47
the most current version of the Unicode standard, and provides support for
48
supplementary characters (needed for GB 18030 repertoire support).
49
50
Java provides a very strong foundation for global programs, and IBM and the
51
ICU team played a key role in providing globalization technology into Sun's
52
Java. But because of its long release schedule, Java cannot always keep
53
up-to-date with evolving standards. The ICU team continues to extend Java's
54
Unicode and internationalization support, focusing on improving
55
performance, keeping current with the Unicode standard, and providing
56
richer APIs, while remaining as compatible as possible with the original
57
Java text and internationalization API design.
58
59
%package charset
60
Summary: Charset converter library of %{name}
61
Group: Development/Libraries/Java
62
Requires: %{name} = %{version}-%{release}
63
64
%description charset
65
Charset converter library of %{name}.
66
67
%package localespi
68
Summary: Locale SPI library of %{name}
69
Group: Development/Libraries/Java
70
Requires: %{name} = %{version}-%{release}
71
72
%description localespi
73
Locale SPI library of %{name}.
74
75
%package javadoc
76
Summary: Javadoc for %{name}
77
Group: Documentation/HTML
78
79
%description javadoc
80
API documentation for %{name}.
81
82
%prep
83
%setup -q -c
84
%patch0 -p1
85
%patch1
86
%patch2 -p1
87
%patch3 -p1
88
89
sed -i 's/\r//' APIChangeReport.html
90
sed -i 's/\r//' readme.html
91
92
sed -i "s/ .*bootclasspath=.*//g" build.xml
93
sed -i "s:%{_prefix}/lib:%{_libdir}:g" build.xml
94
95
rm tools/build/src/com/ibm/icu/dev/tool/docs/ICUTaglet*
96
97
# The versions in build.properties were not updated since some time
98
rm build.properties
99
#echo "api.doc.version=%%{version}" >> build.properties
100
echo "maven.pom.ver=%{version}" >> build.properties
101
#echo "release.file.ver=%%{majorver}_%%{minorver}" >> build.properties
102
#echo "api.report.version=%%{majorver}" >> build.properties
103
#echo "api.report.prev.version=%%{oldmajorver}" >> build.properties
104
echo "jar.spec.version=%{majorver}" >> build.properties
105
echo "jar.impl.version=%{version}" >> build.properties
106
echo "jar.impl.version.string=%{version}.0" >> build.properties
107
108
# Missing dep on pl.pragmatists:JUnitParams for tests, so delete tests that
109
# requires it for now
110
sed -i -e '/pl.pragmatists/d' ivy.xml
111
rm main/tests/core/src/com/ibm/icu/dev/test/format/DataDrivenFormatTest.java
112
rm main/tests/core/src/com/ibm/icu/dev/test/calendar/DataDrivenCalendarTest.java
113
rm main/tests/core/src/com/ibm/icu/dev/test/serializable/CompatibilityTest.java
114
rm main/tests/core/src/com/ibm/icu/dev/test/serializable/CoverageTest.java
115
rm main/tests/core/src/com/ibm/icu/dev/test/util/LocaleMatcherTest.java
116
rm main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java
117
rm main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorDisorderedMarksTest.java
118
119
%build
120
%ant \
121
-Djavac.source=1.8 -Djavac.target=1.8 \
122
-Ddoclint.option='-Xdoclint:none' \
123
-Dicu4j.api.doc.jdk.link= \
124
jar docs
125
126
for jar in icu4j icu4j-charset icu4j-localespi ; do
127
sed -i -e 's/@POMVERSION@/%{version}/' maven/$jar/pom.xml
128
done
129
130
%install
131
# jars
132
mkdir -p %{buildroot}%{_javadir}/%{name}
133
cp -ap %{name}*.jar %{buildroot}%{_javadir}/
134
for jar in icu4j icu4j-charset icu4j-localespi ; do
135
ln -sf %{_javadir}/${jar}.jar %{buildroot}%{_javadir}/%{name}/${jar}.jar
136
done
137
# javadoc
138
mkdir -p %{buildroot}%{_javadocdir}/%{name}
139
cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}
140
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
141
142
# maven stuff
143
install -d -m 755 %{buildroot}%{_mavenpomdir}
144
for jar in icu4j icu4j-charset icu4j-localespi ; do
145
sed -i -e 's/@POMVERSION@/%{version}/' maven/$jar/pom.xml
146
cp maven/$jar/pom.xml %{buildroot}%{_mavenpomdir}/JPP-$jar.pom
147
done
148
%add_maven_depmap JPP-icu4j.pom icu4j.jar
149
%add_maven_depmap JPP-icu4j-charset.pom icu4j-charset.jar -f charset
150
%add_maven_depmap JPP-icu4j-localespi.pom icu4j-localespi.jar -f localespi
151
152
%files -f .mfiles
153
%dir %{_javadir}/%{name}
154
%doc readme.html APIChangeReport.html
155
%{_javadir}/%{name}/%{name}.jar
156
157
%files charset -f .mfiles-charset
158
%{_javadir}/%{name}/%{name}-charset.jar
159
160
%files localespi -f .mfiles-localespi
161
%{_javadir}/%{name}/%{name}-localespi.jar
162
163
%files javadoc
164
%{_javadocdir}/%{name}
165
166
%changelog
167