source: spec/trunk/SPECS/icu.spec@ 433

Last change on this file since 433 was 303, checked in by Yuri Dario, 14 years ago

spec: added bind and icu builds.

File size: 6.4 KB
Line 
1%global _icu_full_version 4.2.1
2%global _icu_dll_version 42
3
4Summary: International Components for Unicode
5Name: icu
6License: X11/MIT
7Group: System/Libraries
8Version: %{_icu_full_version}
9Release: 1%{?dist}
10Requires: libicu = %{version}
11Url: http://ibm.com/software/globalization/icu
12
13Source0: icu4c-4_2_1-src.tgz
14Source1: icu-mh-os2
15Patch0: icu-os2.patch
16
17BuildRoot: %{_tmppath}/%{name}-%{version}-build
18
19%description
20ICU is a set of C and C++ libraries that provides robust and
21full-featured Unicode and locale support. The library provides calendar
22support, conversions for many character sets, language sensitive
23collation, date and time formatting, support for many locales, message
24catalogs and resources, message formatting, normalization, number and
25currency formatting, time zone support, transliteration, and word,
26line, and sentence breaking, etc.
27
28This package contains the Unicode character database and derived
29properties along with converters and time zone data.
30
31This package contains the runtime libraries for ICU. It does not
32contain any of the data files needed at runtime and present in the icu
33and icu-locales packages.
34
35
36
37Authors:
38--------
39 The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
40
41%package -n libicu
42License: IBM Public License
43Summary: International Components for Unicode (development files)
44Group: Development/Libraries/C and C++
45
46%description -n libicu
47ICU is a set of C and C++ libraries that provides robust and
48full-featured Unicode support. This package contains the runtime
49libraries for ICU. It does not contain any of the data files needed at
50runtime and present in the `icu' and `icu-locales` packages.
51
52
53
54Authors:
55--------
56 The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
57
58%package -n libicu-devel
59License: IBM Public License
60Summary: International Components for Unicode (development files)
61Group: Development/Libraries/C and C++
62Requires: libicu = %{version}
63
64%description -n libicu-devel
65ICU is a C++ and C library that provides robust and full-featured
66Unicode support. This package contains the development files for ICU.
67
68
69
70Authors:
71--------
72 The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
73
74%package -n libicu-doc
75License: IBM Public License
76Summary: International Components for Unicode (html documentation)
77Group: Development/Libraries/C and C++
78
79%description -n libicu-doc
80ICU is a C++ and C library that provides robust and full-featured
81Unicode support. This package contains the html documentation.
82
83
84
85Authors:
86--------
87 The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
88
89%package -n icu-data
90License: IBM Public License
91Summary: International Components for Unicode (Sources for the Data in ICU)
92Group: System/Libraries
93Requires: libicu >= %{version}
94
95%description -n icu-data
96ICU is a C++ and C library that provides robust and full-featured
97Unicode support. This package contains the source files for the data
98found in the "icu" package.
99
100This data describes the Unicode data (normative and informative) and
101also all the table-based converters provided in the ICU distribution.
102
103This package contains uncompiled source data. Precompiled data is in
104the `libicu%{version}' package.
105
106
107
108Authors:
109--------
110 The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
111
112%prep
113%setup -q -n icu
114%patch0 -p1
115
116cp %{SOURCE1} source/config/mh-os2
117
118%build
119
120cd source
121rm -f config.cache
122
123script_dir=%{_topdir}/BUILD/%{name}/source
124export PATH="$script_dir/bin${PATH:+;$PATH}"
125export BEGINLIBPATH="$script_dir/lib;$script_dir/stubdata;$script_dir/tools/ctestfw;${BEGINLIBPATH:+;$BEGINLIBPATH}"
126export LIBPATHSTRICT=T
127
128#force libc to use sh for system() in pkgdata.exe
129export EEEMXSHELL="sh"
130
131export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
132export LDFLAGS="-Zomf -Zhigh-mem"
133export LIBS="-lurpo -lpthread"
134%configure \
135 --disable-static \
136 --enable-shared \
137 --without-samples \
138 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
139make %{?_smp_mflags}
140
141%install
142rm -rf ${RPM_BUILD_ROOT}
143
144script_dir=%{_topdir}/BUILD/%{name}/source
145export PATH="$script_dir/bin${PATH:+;$PATH}"
146export BEGINLIBPATH="$script_dir/lib;$script_dir/stubdata;$script_dir/tools/ctestfw;${BEGINLIBPATH:+;$BEGINLIBPATH}"
147export LIBPATHSTRICT=T
148
149cd source
150make DESTDIR=$RPM_BUILD_ROOT install
151# to extract debug info
152#chmod a+rx $RPM_BUILD_ROOT%{_libdir}/*.so.*
153# install uncompiled source data:
154mkdir -p $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/unidata
155install -m 644 data/unidata/*.txt $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/unidata
156ln -s unidata/UnicodeData.txt $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/
157
158rm $RPM_BUILD_ROOT%{_libdir}/*.a.bak
159rm $RPM_BUILD_ROOT%{_libdir}/icu??.dll
160rm $RPM_BUILD_ROOT%{_libdir}/icudt??.dll
161mv $RPM_BUILD_ROOT%{_libdir}/icudt%{_icu_dll_version}.1.dll $RPM_BUILD_ROOT%{_libdir}/icudt%{_icu_dll_version}.dll
162
163# run test suite:
164#pushd data
165#ln -sf build/*.cnv build/*.res build/*.dat build/*.brk .
166#popd
167#make check || echo "make check returned $?, ignored."
168#popd
169rm $RPM_BUILD_ROOT/%{_datadir}/icu/%{version}/license.html
170rm $RPM_BUILD_ROOT/%{_datadir}/icu/%{version}/install-sh
171
172%clean
173rm -rf $RPM_BUILD_ROOT
174
175%files
176%defattr(-, root, root)
177%doc license.html readme.html
178%dir %{_libdir}/icu/
179%dir %{_libdir}/icu/%{version}
180%{_libdir}/icu/current
181%{_bindir}/derb.exe
182%{_bindir}/genbrk.exe
183%{_bindir}/gencfu.exe
184%{_bindir}/gencnval.exe
185%{_bindir}/genrb.exe
186%{_bindir}/genctd.exe
187%{_bindir}/makeconv.exe
188%{_bindir}/pkgdata.exe
189%{_bindir}/uconv.exe
190%{_mandir}/*/*
191
192%files -n libicu
193%defattr(-, root, root)
194%attr (755, root, root) %{_libdir}/*.dll
195
196%files -n libicu-devel
197%defattr(-, root, root)
198%{_libdir}/*.a
199%{_includedir}/unicode/
200%{_includedir}/layout/
201%{_libdir}/icu/%{version}/Makefile.inc
202%{_libdir}/icu/%{version}/pkgdata.inc
203%{_libdir}/icu/Makefile.inc
204%{_libdir}/icu/pkgdata.inc
205%{_bindir}/icu-config
206%dir %{_datadir}/icu
207%dir %{_datadir}/icu/%{version}
208%{_datadir}/icu/%{version}/mkinstalldirs
209%{_datadir}/icu/%{version}/config/
210%{_sbindir}/*.exe
211
212#%files -n libicu-doc
213#%defattr(-, root, root)
214#%doc html/
215
216%files -n icu-data
217%defattr(-, root, root)
218%{_datadir}/icu/%{version}/unidata/
219%{_datadir}/icu/%{version}/UnicodeData.txt
220
221%changelog
Note: See TracBrowser for help on using the repository browser.