Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37728804
en ru br
Репозитории ALT
S:71.1-alt1_3jpp11
5.1: 4.0.1-alt1_3jpp6
4.1: 3.6.1-alt1_1.3jpp5.0
4.0: 3.6.1-alt1_1.3jpp5.0
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: icu4j

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-1.6-compat
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# If you want to build with eclipse support

# give rpmbuild option '--with eclipse'

%define _with_eclipse 1

%define with_eclipse %{?_with_eclipse:1}%{!?_with_eclipse:0}
%define without_eclipse %{!?_with_eclipse:1}%{?_with_eclipse:0}


%define eclipse_base            %{_libdir}/eclipse
# Note:  this next section looks weird having an arch specified in a
# noarch specfile but the parts of the build
# All arches line up between Eclipse and Linux kernel names except i386 -> x86
%ifarch %{ix86}
%define eclipse_arch    x86
%else
%define eclipse_arch   %{_arch}
%endif

Name:           icu4j
Version:        4.0.1
Release:        alt1_3jpp6
Epoch:          1
Summary:        International Components for Unicode for Java
License:        MIT and EPL
URL:            http://www-306.ibm.com/software/globalization/icu/index.jsp
Group:          Development/Java
Source0:        http://download.icu-project.org/files/icu4j/4.0.1/icu4j-4_0_1-src.jar
Patch0:         %{name}-crosslink.patch
# Update the MANIFEST.MF to have the same qualifier in the bundle as is
# in Eclipse's Orbit project
Patch2:         %{name}-updatetimestamp.patch
# Bundle the source instead of having it be an exploded directory.  This
# doesn't work with a 3.3 Eclipse SDK but will with a 3.4 so we'll have
# to rebuild once we get 3.4 in.
Patch3:         %{name}-individualsourcebundle.patch
# PDE Build is in a location the upstream build.xml doesn't check
Patch4:         %{name}-pdebuildlocation.patch
BuildRequires: ant
# FIXME:  is this necessary or is it just adding strings in the hrefs in
# the docs?
BuildRequires: java-javadoc
# This is to ensure we get OpenJDK and not GCJ
BuildRequires: jpackage-utils >= 0:1.5
Requires: jpackage-utils
# This is to ensure we get OpenJDK and not GCJ
%if %{with_eclipse}
BuildRequires: eclipse-pde >= 0:3.2.1
%define         debug_package %{nil}
%else
BuildArch:      noarch
%endif
%define java_bin %_jvmdir/java/bin

%description
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:          Development/Documentation
Requires: jpackage-utils
Requires: java-javadoc
BuildArch: noarch

%description javadoc
Javadoc for %{name}.

%if %{with_eclipse}
%package eclipse
Summary:        Eclipse plugin for %{name}
Group:          Editors
Requires: jpackage-utils

%description eclipse
Eclipse plugin support for %{name}.

%endif

%prep
%setup -q -c
%patch0 -p0
#%patch2 -p0
#%patch3 -p0
%patch4 -p0

%{__sed} -i 's/\r//' license.html
%{__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:/usr/lib:%{_libdir}:g" build.xml

%build
%if %{without_eclipse}
%ant -Dicu4j.javac.source=1.5 -Dicu4j.javac.target=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs
%else
%ant -Dj2se.apidoc=%{_javadocdir}/java -Declipse.home=%{eclipse_base} \
 -Declipse.basews=gtk -Declipse.baseos=linux \
 -Declipse.basearch=%{eclipse_arch} \
 -Dicu4j.eclipse.build.version.string=4.0.1.v20090415 \
 jar docs eclipsePDEBuild
%endif

%install
%__rm -rf %{buildroot}

# jars

%__mkdir_p %{buildroot}%{_javadir}
%__cp -ap %{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do %__ln_s ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

# javadoc

%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

%if %{with_eclipse}
# eclipse
install -d -m755 %{buildroot}/%{eclipse_base}

unzip -qq -d %{buildroot}/%{eclipse_base} eclipseProjects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
%endif

%files
%doc license.html readme.html APIChangeReport.html
%{_javadir}/%{name}*.jar

%files javadoc
%doc %{_javadocdir}/*

%if %{with_eclipse}
%files eclipse
%dir %{_libdir}/eclipse
%dir %{_libdir}/eclipse/features
%dir %{_libdir}/eclipse/plugins
%{_libdir}/eclipse/features/*
%{_libdir}/eclipse/plugins/*
%doc license.html readme.html
%endif

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin