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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20265 - (hide annotations) (download)
Sun Jan 16 13:51:49 2011 UTC (13 years, 3 months ago) by dmorgan
File size: 6619 byte(s)
imported package icu4j
1 dmorgan 20265 # 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    
31     # If you want to build with eclipse support
32     # give rpmbuild option '--with eclipse'
33    
34     %define _with_eclipse 1
35    
36     %define with_eclipse %{?_with_eclipse:1}%{!?_with_eclipse:0}
37     %define without_eclipse %{!?_with_eclipse:1}%{?_with_eclipse:0}
38    
39     %define section free
40    
41     %define eclipse_name eclipse
42     %define eclipse_base %{_libdir}/%{eclipse_name}
43    
44     # Note: this next section looks weird having an arch specified in a
45     # noarch specfile but the parts of the build
46     # All arches line up between Eclipse and Linux kernel names except i386 -> x86
47     %ifarch %{ix86}
48     %define eclipse_arch x86
49     %else
50     %define eclipse_arch %{_arch}
51     %endif
52    
53     Name: icu4j
54     Version: 3.8.1
55     Release: %mkrel 0.2.5
56     Epoch: 1
57     Summary: International Components for Unicode for Java
58     License: MIT and EPL
59     URL: http://www-306.ibm.com/software/globalization/icu/index.jsp
60     Group: Development/Java
61     Source0: http://download.icu-project.org/files/icu4j/3.8.1/icu4j-3_8_1-src.jar
62     Patch0: %{name}-crosslink.patch
63     # Set the OSGi shared configuration dir for our split (libdir and
64     # datadir) Eclipse packages. Will go away once 3.4 is in.
65     Patch1: %{name}-osgiconfigdir.patch
66     # Update the MANIFEST.MF to have the same qualifier in the bundle as is
67     # in Eclipse's Orbit project
68     Patch2: %{name}-updatetimestamp.patch
69     # Bundle the source instead of having it be an exploded directory. This
70     # doesn't work with a 3.3 Eclipse SDK but will with a 3.4 so we'll have
71     # to rebuild once we get 3.4 in.
72     Patch3: %{name}-individualsourcebundle.patch
73     # PDE Build is in a location the upstream build.xml doesn't check
74     Patch4: %{name}-pdebuildlocation.patch
75     BuildRequires: ant
76     BuildRequires: java-javadoc
77     BuildRequires: java-rpmbuild >= 0:1.5
78     BuildRequires: zip
79     Requires: jpackage-utils
80     %if %{with_eclipse}
81     BuildRequires: eclipse-pde >= 0:3.2.1
82     %endif
83     BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
84    
85     %description
86     The International Components for Unicode (ICU) library provides robust and
87     full-featured Unicode services on a wide variety of platforms. ICU supports
88     the most current version of the Unicode standard, and provides support for
89     supplementary characters (needed for GB 18030 repertoire support).
90    
91     Java provides a very strong foundation for global programs, and IBM and the
92     ICU team played a key role in providing globalization technology into Sun's
93     Java. But because of its long release schedule, Java cannot always keep
94     up-to-date with evolving standards. The ICU team continues to extend Java's
95     Unicode and internationalization support, focusing on improving
96     performance, keeping current with the Unicode standard, and providing
97     richer APIs, while remaining as compatible as possible with the original
98     Java text and internationalization API design.
99    
100     %package javadoc
101     Summary: Javadoc for %{name}
102     Group: Development/Java
103     Requires: jpackage-utils
104    
105     %description javadoc
106     Javadoc for %{name}.
107    
108     %if %{with_eclipse}
109     %package eclipse
110     Summary: Eclipse plugin for %{name}
111     Group: Development/Java
112     Requires: jpackage-utils
113    
114     %description eclipse
115     Eclipse plugin support for %{name}.
116    
117     %endif
118    
119     %prep
120     %setup -q -c
121     %patch0 -p0
122     #%patch1 -p0
123     %patch2 -p0
124     %patch3 -p0
125     %patch4 -p0
126    
127     %{__sed} -i 's/\r//' license.html
128     %{__sed} -i 's/\r//' APIChangeReport.html
129     %{__sed} -i 's/\r//' readme.html
130    
131     sed --in-place "s/ .*bootclasspath=.*//g" build.xml
132     sed --in-place "s/<date datetime=.*when=\"after\"\/>//" build.xml
133     sed --in-place "/javac1.3/d" build.xml
134     sed --in-place "s:/usr/lib:%{_libdir}:g" build.xml
135    
136     %build
137     %if %{without_eclipse}
138     %ant -Dicu4j.javac.source=1.5 -Dicu4j.javac.target=1.5 -Dj2se.apidoc=%{_javadocdir}/java jar docs
139     %else
140     %ant -Dj2se.apidoc=%{_javadocdir}/java -Declipse.home=%{eclipse_base} \
141     -Declipse.basews=gtk -Declipse.baseos=linux \
142     -Declipse.basearch=%{eclipse_arch} jar docs eclipsePDEBuild
143     %endif
144    
145     %install
146     %__rm -rf %{buildroot}
147    
148     # jars
149     %__mkdir_p %{buildroot}%{_javadir}
150     %__cp -ap %{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
151     (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do %__ln_s ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
152    
153     # javadoc
154     %__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
155     %__cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
156     %__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
157    
158     %if %{with_eclipse}
159     # eclipse
160     install -d -m755 %{buildroot}/%{eclipse_base}
161    
162     unzip -qq -d %{buildroot}/%{eclipse_base} eclipseProjects/ICU4J.com.ibm.icu/com.ibm.icu-com.ibm.icu.zip
163     %endif
164    
165     %clean
166     %__rm -rf %{buildroot}
167    
168     %files
169     %defattr(0644,root,root,0755)
170     %doc license.html readme.html APIChangeReport.html
171     %{_javadir}/%{name}*.jar
172    
173     %files javadoc
174     %defattr(0644,root,root,0755)
175     %doc %{_javadocdir}/*
176    
177     %if %{with_eclipse}
178     %files eclipse
179     %defattr(0644,root,root,0755)
180     %dir %{_libdir}/eclipse
181     %dir %{_libdir}/eclipse/features
182     %dir %{_libdir}/eclipse/plugins
183     %{_libdir}/eclipse/features/*
184     %{_libdir}/eclipse/plugins/*
185     %doc license.html readme.html
186     %endif
187    
188    

  ViewVC Help
Powered by ViewVC 1.1.30