File icu4j.spec of Package icu4j

# spec file for package icu4j
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2007, JPackage Project
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           icu4j
Version:        54.1.1
Release:        0
Summary:        International Components for Unicode for Java
License:        MIT and EPL-1.0
Group:          Development/Libraries/Java
#to create a tarball use following procedure
#svn co icu4j-<version>
#tar caf icu4j-<version>.tar.xz icu4j-<version>/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  ant
BuildRequires:  java-devel
BuildRequires:  unzip
BuildRequires:  zip
Requires:       javapackages-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

The International Components for Unicode (ICU) library provides robust and
full-featured Unicode services on a wide variety of platforms. ICU supports
the most current version of the Unicode standard, and provides support for
supplementary characters (needed for GB 18030 repertoire support).

Java provides a very strong foundation for global programs, and IBM and the
ICU team played a key role in providing globalization technology into Sun's
Java. But because of its long release schedule, Java cannot always keep
up-to-date with evolving standards. The ICU team continues to extend Java's
Unicode and internationalization support, focusing on improving
performance, keeping current with the Unicode standard, and providing
richer APIs, while remaining as compatible as possible with the original
Java text and internationalization API design.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Documentation/HTML
Requires:       java-javadoc
Requires:       javapackages-tools

%description javadoc
Javadoc documentation for %{name}.

%setup -q

sed -i 's/\r//' APIChangeReport.html
sed -i 's/\r//' readme.html

sed --in-place "s/ .*bootclasspath=.*//g" build.xml
sed --in-place "s/<date datetime=.*when=\"after\"\/>//" build.xml
sed --in-place "/javac1.3/d" build.xml
sed --in-place "s:%{_prefix}/lib:%{_libdir}:g" build.xml

ant -Dicu4j.javac.source=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs

# jars
mkdir -p %{buildroot}%{_javadir}
cp -ap %{name}.jar %{buildroot}%{_javadir}/%{name}.jar

# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}

# maven stuff
install -d -m 755 %{buildroot}%{_mavenpomdir}
cp pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar

%doc readme.html APIChangeReport.html

%files javadoc