50094ee
# Copyright (c) 2000-2007, JPackage Project
50094ee
# All rights reserved.
50094ee
#
50094ee
# Redistribution and use in source and binary forms, with or without
50094ee
# modification, are permitted provided that the following conditions
50094ee
# are met:
50094ee
#
50094ee
# 1. Redistributions of source code must retain the above copyright
50094ee
#    notice, this list of conditions and the following disclaimer.
50094ee
# 2. Redistributions in binary form must reproduce the above copyright
50094ee
#    notice, this list of conditions and the following disclaimer in the
50094ee
#    documentation and/or other materials provided with the
50094ee
#    distribution.
50094ee
# 3. Neither the name of the JPackage Project nor the names of its
50094ee
#    contributors may be used to endorse or promote products derived
50094ee
#    from this software without specific prior written permission.
50094ee
#
50094ee
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50094ee
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
50094ee
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
50094ee
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
50094ee
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50094ee
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
50094ee
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50094ee
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50094ee
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
50094ee
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50094ee
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50094ee
#
50094ee
22bc193
%global with_eclipse 1
50094ee
14734e0
%if 0%{?rhel}
14734e0
%global with_eclipse 0
14734e0
%endif
14734e0
22bc193
%global eclipse_base            %{_libdir}/eclipse
Andrew Overholt 1a4b7e9
# Note:  this next section looks weird having an arch specified in a
Andrew Overholt 1a4b7e9
# noarch specfile but the parts of the build
Andrew Overholt 7e1ee4c
# All arches line up between Eclipse and Linux kernel names except i386 -> x86
Andrew Overholt 7e1ee4c
%ifarch %{ix86}
22bc193
%global eclipse_arch    x86
Andrew Overholt 7e1ee4c
%else
22bc193
%global eclipse_arch   %{_arch}
Andrew Overholt 7e1ee4c
%endif
50094ee
50094ee
Name:           icu4j
Krzysztof Daniel d9872ab
Version:        4.4.2.2
2a1424b
Release:        13%{?dist}
b81b84f
Epoch:          1
50094ee
Summary:        International Components for Unicode for Java
2f9a6b7
License:        MIT and EPL 
a8f8cdd
URL:            http://site.icu-project.org/
22bc193
Group:          Development/Libraries
Krzysztof Daniel 387fd5d
#CAUTION
Krzysztof Daniel 387fd5d
#to create a tarball use following procedure
Krzysztof Daniel 387fd5d
#svn co http://source.icu-project.org/repos/icu/icu4j/tags/release-4-4-2-eclipse37-20110208/ icu4j-<version>
Krzysztof Daniel 387fd5d
#tar caf icu4j-<version>.tar.xz icu4j-<version>/
Krzysztof Daniel d9872ab
Source0:        icu4j-4.4.2.2.tar.xz
a8f8cdd
Source1:        %{name}-4.4.2.pom
da330a5
## CAUTION
da330a5
## Please do not forget to update this Manifest to the latest one taken from the icu4j bundle from
da330a5
## out/projects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
da330a5
## This is needed to unbreak cyclic dependencies between Eclipse and ICU4J
da330a5
Source2:        icu4j-%{version}-MANIFEST.MF
a8f8cdd
50094ee
Patch0:         %{name}-crosslink.patch
4ad438e
BuildRequires:  ant >= 1.7.0
Andrew Overholt 1a4b7e9
# FIXME:  is this necessary or is it just adding strings in the hrefs in
Andrew Overholt 1a4b7e9
# the docs?
Andrew Overholt 1a4b7e9
BuildRequires:  java-javadoc >= 1:1.6.0
Andrew Overholt 1a4b7e9
# This is to ensure we get OpenJDK and not GCJ
Krzysztof Daniel 6994607
BuildRequires:  java-devel >= 1:1.7.0
50094ee
BuildRequires:  jpackage-utils >= 0:1.5
da330a5
BuildRequires:  zip
50094ee
Requires:       jpackage-utils
Andrew Overholt 1a4b7e9
# This is to ensure we get OpenJDK and not GCJ
Andrew Overholt 1a4b7e9
Requires:       java >= 1:1.6.0
50094ee
%if %{with_eclipse}
50094ee
BuildRequires:  eclipse-pde >= 0:3.2.1
22bc193
%global         debug_package %{nil}
14734e0
%endif
14734e0
85891a7
BuildArch:      noarch
Krzysztof Daniel 9f20f9b
50094ee
50094ee
%description
50094ee
The International Components for Unicode (ICU) library provides robust and
50094ee
full-featured Unicode services on a wide variety of platforms. ICU supports
50094ee
the most current version of the Unicode standard, and provides support for
50094ee
supplementary characters (needed for GB 18030 repertoire support).
50094ee
50094ee
Java provides a very strong foundation for global programs, and IBM and the
50094ee
ICU team played a key role in providing globalization technology into Sun's
50094ee
Java. But because of its long release schedule, Java cannot always keep
50094ee
up-to-date with evolving standards. The ICU team continues to extend Java's
50094ee
Unicode and internationalization support, focusing on improving
50094ee
performance, keeping current with the Unicode standard, and providing
50094ee
richer APIs, while remaining as compatible as possible with the original
50094ee
Java text and internationalization API design.
50094ee
50094ee
%package javadoc
50094ee
Summary:        Javadoc for %{name}
22bc193
Group:          Documentation
50094ee
Requires:       jpackage-utils
Andrew Overholt 1a4b7e9
Requires:       java-javadoc >= 1:1.6.0
50094ee
50094ee
%description javadoc
50094ee
Javadoc for %{name}.
50094ee
50094ee
%if %{with_eclipse}
50094ee
%package eclipse
50094ee
Summary:        Eclipse plugin for %{name}
22bc193
Group:          Development/Libraries
50094ee
Requires:       jpackage-utils
50094ee
50094ee
%description eclipse
50094ee
Eclipse plugin support for %{name}.
50094ee
50094ee
%endif
50094ee
50094ee
%prep
a8f8cdd
%setup -q 
a8f8cdd
#%patch0 -p0
50094ee
d28131e
cp %{SOURCE1} .
d28131e
50094ee
%{__sed} -i 's/\r//' APIChangeReport.html
50094ee
%{__sed} -i 's/\r//' readme.html
50094ee
50094ee
sed --in-place "s/ .*bootclasspath=.*//g" build.xml
c3a9fc5
sed --in-place "s/<date datetime=.*when=\"after\"\/>//" build.xml
Andrew Overholt 7e1ee4c
sed --in-place "/javac1.3/d" build.xml
Krzysztof Daniel 9f20f9b
sed --in-place "s:/usr/lib:%{_datadir}:g" build.xml
50094ee
50094ee
%build
a8f8cdd
%ant -Dicu4j.javac.source=1.5 -Dicu4j.javac.target=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs
0278102
%if %{with_eclipse}
a8f8cdd
pushd eclipse-build
0278102
  %ant -Dj2se.apidoc=%{_javadocdir}/java -Declipse.home=%{eclipse_base} \
0278102
    -Declipse.basews=gtk -Declipse.baseos=linux \
a8f8cdd
    -Declipse.pde.dir=%{eclipse_base}/dropins/sdk/plugins/`ls %{eclipse_base}/dropins/sdk/plugins/|grep org.eclipse.pde.build_`
a8f8cdd
popd
50094ee
%endif
a8f8cdd
  
50094ee
%install
da330a5
da330a5
# inject OSGi manifests
da330a5
mkdir -p META-INF
da330a5
cp -p %{SOURCE2} META-INF/MANIFEST.MF
da330a5
touch META-INF/MANIFEST.MF
da330a5
zip -u %{name}.jar META-INF/MANIFEST.MF
da330a5
50094ee
# jars
50094ee
%__mkdir_p %{buildroot}%{_javadir}
a8f8cdd
%__cp -ap %{name}.jar %{buildroot}%{_javadir}/%{name}.jar
50094ee
50094ee
# javadoc
21fffd9
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}
21fffd9
%__cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}
50094ee
50094ee
%if %{with_eclipse}
50094ee
# eclipse
Krzysztof Daniel 9f20f9b
install -d -m755 %{buildroot}%{_javadir}/icu4j-eclipse
50094ee
Krzysztof Daniel 9f20f9b
unzip -qq -d %{buildroot}%{_javadir}/icu4j-eclipse eclipse-build/out/projects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
50094ee
%endif
50094ee
d28131e
# maven stuff
d28131e
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
a8f8cdd
cp %{name}-4.4.2.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
21fffd9
%add_maven_depmap JPP-%{name}.pom %{name}.jar
d28131e
50094ee
%files
a8f8cdd
%doc readme.html APIChangeReport.html
50094ee
%{_javadir}/%{name}*.jar
d28131e
%{_mavendepmapfragdir}/*
d28131e
%{_mavenpomdir}/*.pom
50094ee
50094ee
%files javadoc
50094ee
%doc %{_javadocdir}/*
50094ee
50094ee
%if %{with_eclipse}
50094ee
%files eclipse
Krzysztof Daniel 9f20f9b
%dir %{_javadir}/icu4j-eclipse/
Krzysztof Daniel 9f20f9b
%dir %{_javadir}/icu4j-eclipse/features
Krzysztof Daniel 9f20f9b
%dir %{_javadir}/icu4j-eclipse/plugins
Krzysztof Daniel 9f20f9b
%{_javadir}/icu4j-eclipse/features/*
Krzysztof Daniel 9f20f9b
%{_javadir}/icu4j-eclipse/plugins/*
a8f8cdd
%doc readme.html
50094ee
%endif
50094ee
50094ee
%changelog
2a1424b
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.4.2.2-13
2a1424b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2a1424b
430610e
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.2.2-12
430610e
- Don't build icu4j-eclipse for rhel.
430610e
Krzysztof Daniel 9f20f9b
* Thu Feb 16 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.4.2.2-11
Krzysztof Daniel 9f20f9b
- Make the package noarch.
Krzysztof Daniel 9f20f9b
14734e0
* Wed Feb  1 2012 Daniel Mach <dmach@redhat.com> 1:4.4.2.2-10
14734e0
- Tweak with_eclipse macro for rhel and non-intel architectures.
14734e0
Krzysztof Daniel d9872ab
* Fri Jan 27 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.4.2.2-9
Krzysztof Daniel d9872ab
- Getting back to 4 digit version
Krzysztof Daniel d9872ab
Krzysztof Daniel afa8e54
* Thu Jan 26 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.4.2-8
Krzysztof Daniel afa8e54
- Proper sources uploaded
Krzysztof Daniel afa8e54
Krzysztof Daniel 4743430
* Thu Jan 26 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.4.2-7
Krzysztof Daniel 4743430
- Better versioning consistent with previous releases
Krzysztof Daniel 4743430
Krzysztof Daniel 387fd5d
* Mon Jan 16 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.4.2.2-6
Krzysztof Daniel 387fd5d
- Update to 4.4.2.2.
Krzysztof Daniel 387fd5d
09dce3d
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.4.2-5
09dce3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
09dce3d
da330a5
* Tue Nov 15 2011 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.2-4
da330a5
- Add proper manifest to the jar in the main package.
da330a5
21fffd9
* Fri Sep 16 2011 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.2-3
21fffd9
- Adapt to current guidelines.
21fffd9
a8f8cdd
* Mon May 9 2011 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.2-2
a8f8cdd
- Use proper tarball.
a8f8cdd
- Fix build.
a8f8cdd
a8f8cdd
* Tue Apr 05 2011 Chris Aniszczyk <zx@redhat.com> 1:4.4.2-1
a8f8cdd
- Update to 4.4.2.
a8f8cdd
15c3a73
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.2.1-2
15c3a73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
15c3a73
22bc193
* Thu Jul 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1:4.2.1-1
22bc193
- Update to 4.2.1.
22bc193
d28131e
* Fri Feb  5 2010 Mary Ellen Foster <mefoster at gmail.com> 1:4.0.1-5
d28131e
- Add maven pom and depmap fragment
d28131e
0278102
* Tue Sep 29 2009 Alexander Kurtakov <akurtako@redhat.com> 1:4.0.1-4
0278102
- Simplify with_eclipse conditional.
0278102
ba180e1
* Mon Aug 10 2009 Alexander Kurtakov <akurtako@redhat.com> 1:4.0.1-3
ba180e1
- Update qualifier to the Eclipse 3.5.0 release.
ba180e1
dd46f37
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.0.1-2
dd46f37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
dd46f37
c4c13d9
* Wed Apr 8 2009 Alexander Kurtakov <akurtako@redhat.com> 1:4.0.1-1
b81b84f
- Update to 4.0.1.
b81b84f
06301b8
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:3.8.1-5
06301b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
06301b8
85891a7
* Wed Oct  8 2008 Ville Skyttä <ville.skytta at iki.fi> - 0:3.8.1-4
85891a7
- Disable debuginfo package when built with Eclipse support, change to
85891a7
  noarch when built without it (#464017).
85891a7
Andrew Overholt 5ff4680
* Mon Aug 11 2008 Andrew Overholt <overholt@redhat.com> 3.8.1-3
Andrew Overholt 5ff4680
- Get rid of eclipse_name macro
Andrew Overholt 5ff4680
- Rebuild with Eclipse 3.4 and put into Eclipse stuff into
22bc193
  %%{_libdir}/eclipse
Andrew Overholt a80e77b
- Remove now-unnecessary OSGi configuration dir patch
Andrew Overholt a80e77b
- Add patch to point to PDE Build location
Andrew Overholt 5ff4680
Andrew Overholt 1a4b7e9
* Fri Jul 11 2008 Andrew Overholt <overholt@redhat.com> 0:3.8.1-2
Andrew Overholt 1a4b7e9
- Remove GCJ support due to
Andrew Overholt 1a4b7e9
  com.sun.tools.doclets.internal.toolkit.taglets.* import (not in gjdoc)
Andrew Overholt 1a4b7e9
Andrew Overholt 7e1ee4c
* Fri Jul 11 2008 Andrew Overholt <overholt@redhat.com> 0:3.8.1-1
Andrew Overholt 7e1ee4c
- 3.8.1
Andrew Overholt 7e1ee4c
2f9a6b7
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:3.6.1-3
2f9a6b7
- drop repotag
2f9a6b7
- fix license tag
2f9a6b7
4d5f9b9
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:3.6.1-2jpp.6
4d5f9b9
- Autorebuild for GCC 4.3
4d5f9b9
Andrew Overholt 3195d72
* Tue Nov 13 2007 Andrew Overholt <overholt@redhat.com> 3.6.1-1jpp.6
Andrew Overholt 3195d72
- Bump release and change updatetimestamp patch to have DOS
Andrew Overholt 3195d72
  line-endings.
Andrew Overholt 3195d72
Andrew Overholt deb68c9
* Tue Nov 13 2007 Andrew Overholt <overholt@redhat.com> 3.6.1-1jpp.5
Andrew Overholt deb68c9
- Bump release.
Andrew Overholt deb68c9
3754fd8
* Fri Sep 28 2007 Andrew Overholt <overholt@redhat.com> 3.6.1-1jpp.4
3754fd8
- Update timestamp to match Eclipse 3.3.1 release.
3754fd8
6f73238
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 3.6.1-1jpp.3
6f73238
- Rebuild for selinux ppc32 issue.
6f73238
98d5f59
* Wed Jun 27 2007 Ben Konrath <bkonrath@redhat.com> - 0:3.6.1-1jpp.2
98d5f59
- Remove requires eclipse-rcp in eclipse sub-package.
98d5f59
c3a9fc5
* Thu Jun 07 2007 Ben Konrath <bkonrath@redhat.com> - 0:3.6.1-1jpp.1
c3a9fc5
- 3.6.1.
c3a9fc5
- Enable eclipse sub-package.
c3a9fc5
bb9346c
* Fri Mar 16 2007 Jeff Johnston <jjohnstn@redhat.com> - 0:3.4.5-2jpp.2
bb9346c
- Disable eclipse plugin support temporarily until build problems
bb9346c
  can be worked out.  Plugin is still being built as part of
bb9346c
  eclipse platform.
bb9346c
- BuildRequire sinjdoc.
bb9346c
50094ee
* Mon Feb 12 2007 Matt Wringe <mwringe@redhat.com> - 0:3.4.5-2jpp.1
50094ee
- Fix some rpmlint issues
50094ee
- Make use of buildroot more consistent
50094ee
- Remove javadoc post and postun sections as per new jpp standard
50094ee
- Change license section to 'MIT style' license from 'MIT' license.
50094ee
  This was done since the source package calls the license the 
50094ee
  "X license" (see readme.html in src jar).
50094ee
- Install eclipse plugin into /usr/share/eclipse
50094ee
50094ee
* Mon Jan 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.4.5-2jpp.1
50094ee
- Merge with upstream
50094ee
50094ee
* Mon Jan 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.4.5-2jpp
50094ee
- Add optional eclipse subpackage, created by
50094ee
  Jeff Johnston  <jjohnstn@rdhat.com> :
50094ee
- Add eclipse sub-package to create plugins.
50094ee
50094ee
* Mon Jan 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.4.5-1jpp
50094ee
- Upgrade to 3.4.5 with merge
50094ee
- Re-enable javadoc
50094ee
50094ee
* Mon Sep 04 2006 Ben Konrath <bkonrath@redhat.com> 0:3.4.5-1jpp_1fc
50094ee
- 3.4.5.
50094ee
- Add GCJ support with spec-convert-gcj-1.6.
50094ee
50094ee
* Mon Jul 17 2006 Ben Konrath <bkonrath@redhat.com> 0:3.4.4-1jpp_1fc
50094ee
- 3.4.4.
50094ee
- Add disable javadocs patch.
50094ee
50094ee
* Tue Feb 28 2006 Fernando Nasser <fnasser@redhat.com> - 0:3.2-2jpp_1rh
50094ee
- First Red Hat build
50094ee
50094ee
* Mon Feb 27 2006 Fernando Nasser <fnasser@redhat.com> - 0:3.2-2jpp
50094ee
- First JPP 1.7 build
50094ee
50094ee
* Sun Jan 29 2005 David Walluck <david@jpackage.org> 0:3.2-1jpp
50094ee
- release (contributed by Mary Ellen Foster <mefoster at gmail.com>)