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

  ViewVC Help
Powered by ViewVC 1.1.30