| 1 | %global _icu_full_version 4.2.1
|
|---|
| 2 | %global _icu_dll_version 42
|
|---|
| 3 |
|
|---|
| 4 | Summary: International Components for Unicode
|
|---|
| 5 | Name: icu
|
|---|
| 6 | License: X11/MIT
|
|---|
| 7 | Group: System/Libraries
|
|---|
| 8 | Version: %{_icu_full_version}
|
|---|
| 9 | Release: 1%{?dist}
|
|---|
| 10 | Requires: libicu = %{version}
|
|---|
| 11 | Url: http://ibm.com/software/globalization/icu
|
|---|
| 12 |
|
|---|
| 13 | Source0: icu4c-4_2_1-src.tgz
|
|---|
| 14 | Source1: icu-mh-os2
|
|---|
| 15 | Patch0: icu-os2.patch
|
|---|
| 16 |
|
|---|
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|---|
| 18 |
|
|---|
| 19 | %description
|
|---|
| 20 | ICU is a set of C and C++ libraries that provides robust and
|
|---|
| 21 | full-featured Unicode and locale support. The library provides calendar
|
|---|
| 22 | support, conversions for many character sets, language sensitive
|
|---|
| 23 | collation, date and time formatting, support for many locales, message
|
|---|
| 24 | catalogs and resources, message formatting, normalization, number and
|
|---|
| 25 | currency formatting, time zone support, transliteration, and word,
|
|---|
| 26 | line, and sentence breaking, etc.
|
|---|
| 27 |
|
|---|
| 28 | This package contains the Unicode character database and derived
|
|---|
| 29 | properties along with converters and time zone data.
|
|---|
| 30 |
|
|---|
| 31 | This package contains the runtime libraries for ICU. It does not
|
|---|
| 32 | contain any of the data files needed at runtime and present in the icu
|
|---|
| 33 | and icu-locales packages.
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 | Authors:
|
|---|
| 38 | --------
|
|---|
| 39 | The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
|
|---|
| 40 |
|
|---|
| 41 | %package -n libicu
|
|---|
| 42 | License: IBM Public License
|
|---|
| 43 | Summary: International Components for Unicode (development files)
|
|---|
| 44 | Group: Development/Libraries/C and C++
|
|---|
| 45 |
|
|---|
| 46 | %description -n libicu
|
|---|
| 47 | ICU is a set of C and C++ libraries that provides robust and
|
|---|
| 48 | full-featured Unicode support. This package contains the runtime
|
|---|
| 49 | libraries for ICU. It does not contain any of the data files needed at
|
|---|
| 50 | runtime and present in the `icu' and `icu-locales` packages.
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 | Authors:
|
|---|
| 55 | --------
|
|---|
| 56 | The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
|
|---|
| 57 |
|
|---|
| 58 | %package -n libicu-devel
|
|---|
| 59 | License: IBM Public License
|
|---|
| 60 | Summary: International Components for Unicode (development files)
|
|---|
| 61 | Group: Development/Libraries/C and C++
|
|---|
| 62 | Requires: libicu = %{version}
|
|---|
| 63 |
|
|---|
| 64 | %description -n libicu-devel
|
|---|
| 65 | ICU is a C++ and C library that provides robust and full-featured
|
|---|
| 66 | Unicode support. This package contains the development files for ICU.
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | Authors:
|
|---|
| 71 | --------
|
|---|
| 72 | The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
|
|---|
| 73 |
|
|---|
| 74 | %package -n libicu-doc
|
|---|
| 75 | License: IBM Public License
|
|---|
| 76 | Summary: International Components for Unicode (html documentation)
|
|---|
| 77 | Group: Development/Libraries/C and C++
|
|---|
| 78 |
|
|---|
| 79 | %description -n libicu-doc
|
|---|
| 80 | ICU is a C++ and C library that provides robust and full-featured
|
|---|
| 81 | Unicode support. This package contains the html documentation.
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 | Authors:
|
|---|
| 86 | --------
|
|---|
| 87 | The ICU project, International Business Machines (IBM) and Others. <icu@oss.software.ibm.com>
|
|---|
| 88 |
|
|---|
| 89 | %package -n icu-data
|
|---|
| 90 | License: IBM Public License
|
|---|
| 91 | Summary: International Components for Unicode (Sources for the Data in ICU)
|
|---|
| 92 | Group: System/Libraries
|
|---|
| 93 | Requires: libicu >= %{version}
|
|---|
| 94 |
|
|---|
| 95 | %description -n icu-data
|
|---|
| 96 | ICU is a C++ and C library that provides robust and full-featured
|
|---|
| 97 | Unicode support. This package contains the source files for the data
|
|---|
| 98 | found in the "icu" package.
|
|---|
| 99 |
|
|---|
| 100 | This data describes the Unicode data (normative and informative) and
|
|---|
| 101 | also all the table-based converters provided in the ICU distribution.
|
|---|
| 102 |
|
|---|
| 103 | This package contains uncompiled source data. Precompiled data is in
|
|---|
| 104 | the `libicu%{version}' package.
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 | Authors:
|
|---|
| 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 |
|
|---|
| 116 | cp %{SOURCE1} source/config/mh-os2
|
|---|
| 117 |
|
|---|
| 118 | %build
|
|---|
| 119 |
|
|---|
| 120 | cd source
|
|---|
| 121 | rm -f config.cache
|
|---|
| 122 |
|
|---|
| 123 | script_dir=%{_topdir}/BUILD/%{name}/source
|
|---|
| 124 | export PATH="$script_dir/bin${PATH:+;$PATH}"
|
|---|
| 125 | export BEGINLIBPATH="$script_dir/lib;$script_dir/stubdata;$script_dir/tools/ctestfw;${BEGINLIBPATH:+;$BEGINLIBPATH}"
|
|---|
| 126 | export LIBPATHSTRICT=T
|
|---|
| 127 |
|
|---|
| 128 | #force libc to use sh for system() in pkgdata.exe
|
|---|
| 129 | export EEEMXSHELL="sh"
|
|---|
| 130 |
|
|---|
| 131 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 132 | export LDFLAGS="-Zomf -Zhigh-mem"
|
|---|
| 133 | export LIBS="-lurpo -lpthread"
|
|---|
| 134 | %configure \
|
|---|
| 135 | --disable-static \
|
|---|
| 136 | --enable-shared \
|
|---|
| 137 | --without-samples \
|
|---|
| 138 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 139 | make %{?_smp_mflags}
|
|---|
| 140 |
|
|---|
| 141 | %install
|
|---|
| 142 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 143 |
|
|---|
| 144 | script_dir=%{_topdir}/BUILD/%{name}/source
|
|---|
| 145 | export PATH="$script_dir/bin${PATH:+;$PATH}"
|
|---|
| 146 | export BEGINLIBPATH="$script_dir/lib;$script_dir/stubdata;$script_dir/tools/ctestfw;${BEGINLIBPATH:+;$BEGINLIBPATH}"
|
|---|
| 147 | export LIBPATHSTRICT=T
|
|---|
| 148 |
|
|---|
| 149 | cd source
|
|---|
| 150 | make DESTDIR=$RPM_BUILD_ROOT install
|
|---|
| 151 | # to extract debug info
|
|---|
| 152 | #chmod a+rx $RPM_BUILD_ROOT%{_libdir}/*.so.*
|
|---|
| 153 | # install uncompiled source data:
|
|---|
| 154 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/unidata
|
|---|
| 155 | install -m 644 data/unidata/*.txt $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/unidata
|
|---|
| 156 | ln -s unidata/UnicodeData.txt $RPM_BUILD_ROOT%{_datadir}/icu/%{version}/
|
|---|
| 157 |
|
|---|
| 158 | rm $RPM_BUILD_ROOT%{_libdir}/*.a.bak
|
|---|
| 159 | rm $RPM_BUILD_ROOT%{_libdir}/icu??.dll
|
|---|
| 160 | rm $RPM_BUILD_ROOT%{_libdir}/icudt??.dll
|
|---|
| 161 | mv $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
|
|---|
| 169 | rm $RPM_BUILD_ROOT/%{_datadir}/icu/%{version}/license.html
|
|---|
| 170 | rm $RPM_BUILD_ROOT/%{_datadir}/icu/%{version}/install-sh
|
|---|
| 171 |
|
|---|
| 172 | %clean
|
|---|
| 173 | rm -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
|
|---|