• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2016 and later: Unicode, Inc. and others.
2# License & terms of use: http://www.unicode.org/copyright.html
3#   Copyright (C) 2000-2005, International Business Machines
4#   Corporation and others.  All Rights Reserved.
5#
6# RPM specification file for ICU.
7#
8# Neal Probert <nprobert@walid.com> is the current maintainer.
9# Yves Arrouye <yves@realnames.com> is the original author.
10
11# This file can be freely redistributed under the same license as ICU.
12
13Name: icu
14Version: 3.4
15Release: 1
16Requires: libicu34 >= %{version}
17Summary: International Components for Unicode
18Packager: Ian Holsman (CNET Networks) <ianh@cnet.com>
19Copyright: X License
20Group: System Environment/Libraries
21Source: icu-%{version}.tgz
22BuildRoot: /var/tmp/%{name}-%{version}
23%description
24ICU is a set of C and C++ libraries that provides robust and full-featured
25Unicode and locale support. The library provides calendar support, conversions
26for many character sets, language sensitive collation, date
27and time formatting, support for many locales, message catalogs
28and resources, message formatting, normalization, number and currency
29formatting, time zones support, transliteration, word, line and
30sentence breaking, etc.
31
32This package contains the Unicode character database and derived
33properties, along with converters and time zones data.
34
35This package contains the runtime libraries for ICU. It does
36not contain any of the data files needed at runtime and present in the
37`icu' and `icu-locales` packages.
38
39%package -n libicu34
40Summary: International Components for Unicode (libraries)
41Group: Development/Libraries
42%description -n libicu34
43ICU is a set of C and C++ libraries that provides robust and full-featured
44Unicode support. This package contains the runtime libraries for ICU. It does
45not contain any of the data files needed at runtime and present in the
46`icu' and `icu-locales` packages.
47
48%package -n libicu-devel
49Summary: International Components for Unicode (development files)
50Group: Development/Libraries
51Requires: libicu34 = %{version}
52%description -n libicu-devel
53ICU is a set of C and C++ libraries that provides robust and full-featured
54Unicode support. This package contains the development files for ICU.
55
56%package locales
57Summary: Locale data for ICU
58Group: System Environment/Libraries
59Requires: libicu34 >= %{version}
60%description locales
61The locale data are used by ICU to provide localization (l10n),
62internationalization (i18n) and timezone support to ICU applications.
63This package also contains break data for various languages,
64and transliteration data.
65
66%post
67# Adjust the current ICU link in /usr/lib/icu
68
69icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
70cd /usr/lib/icu
71rm -f /usr/lib/icu/current
72if test x"$icucurrent" != x
73then
74    ln -s "$icucurrent" current
75fi
76
77#ICU_DATA=/usr/share/icu/%{version}
78#export ICU_DATA
79
80%preun
81# Adjust the current ICU link in /usr/lib/icu
82
83icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/%{version}\//d' -e 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
84cd /usr/lib/icu
85rm -f /usr/lib/icu/current
86if test x"$icucurrent" != x
87then
88    ln -s "$icucurrent" current
89fi
90
91%post -n libicu34
92ldconfig
93
94# Adjust the current ICU link in /usr/lib/icu
95
96icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
97cd /usr/lib/icu
98rm -f /usr/lib/icu/current
99if test x"$icucurrent" != x
100then
101    ln -s "$icucurrent" current
102fi
103
104%preun -n libicu34
105# Adjust the current ICU link in /usr/lib/icu
106
107icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/%{version}\//d' -e 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
108cd /usr/lib/icu
109rm -f /usr/lib/icu/current
110if test x"$icucurrent" != x
111then
112    ln -s "$icucurrent" current
113fi
114
115%prep
116%setup -q -n icu
117
118%build
119cd source
120chmod a+x ./configure
121CFLAGS="-O3" CXXFLAGS="-O" ./configure --prefix=/usr --sysconfdir=/etc --with-data-packaging=files --enable-shared --enable-static --disable-samples
122echo 'CPPFLAGS += -DICU_DATA_DIR=\"/usr/share/icu/%{version}\"' >> icudefs.mk
123make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
124
125%install
126rm -rf $RPM_BUILD_ROOT
127cd source
128make install DESTDIR=$RPM_BUILD_ROOT
129
130%files
131%defattr(-,root,root)
132%doc readme.html
133%doc license.html
134/usr/share/icu/%{version}/license.html
135/usr/share/icu/%{version}/icudt34l/*.cnv
136/usr/share/icu/%{version}/icudt34l/*.icu
137/usr/share/icu/%{version}/icudt34l/*.spp
138
139/usr/bin/derb
140/usr/bin/genbrk
141/usr/bin/gencnval
142/usr/bin/genrb
143/usr/bin/icu-config
144/usr/bin/makeconv
145/usr/bin/pkgdata
146/usr/bin/uconv
147
148/usr/sbin/decmn
149/usr/sbin/genccode
150/usr/sbin/gencmn
151/usr/sbin/gensprep
152/usr/sbin/genuca
153/usr/sbin/icuswap
154/usr/share/icu/%{version}/mkinstalldirs
155
156/usr/man/man1/derb.1.*
157/usr/man/man1/gencnval.1.*
158/usr/man/man1/genrb.1.*
159/usr/man/man1/icu-config.1.*
160/usr/man/man1/makeconv.1.*
161/usr/man/man1/pkgdata.1.*
162/usr/man/man1/uconv.1.*
163/usr/man/man8/decmn.8.*
164/usr/man/man8/genccode.8.*
165/usr/man/man8/gencmn.8.*
166/usr/man/man8/gensprep.8.*
167/usr/man/man8/genuca.8.*
168
169%files -n icu-locales
170/usr/share/icu/%{version}/icudt34l/*.brk
171/usr/share/icu/%{version}/icudt34l/*.res
172/usr/share/icu/%{version}/icudt34l/coll/*.res
173/usr/share/icu/%{version}/icudt34l/rbnf/*.res
174/usr/share/icu/%{version}/icudt34l/translit/*.res
175
176%files -n libicu34
177%doc license.html
178/usr/lib/libicui18n.so.34
179/usr/lib/libicui18n.so.34.0
180/usr/lib/libicutu.so.34
181/usr/lib/libicutu.so.34.0
182/usr/lib/libicuuc.so.34
183/usr/lib/libicuuc.so.34.0
184/usr/lib/libicudata.so.34
185/usr/lib/libicudata.so.34.0
186/usr/lib/libicuio.so.34
187/usr/lib/libicuio.so.34.0
188/usr/lib/libiculx.so.34
189/usr/lib/libiculx.so.34.0
190/usr/lib/libicule.so.34
191/usr/lib/libicule.so.34.0
192
193%files -n libicu-devel
194%doc readme.html
195%doc license.html
196/usr/lib/libicui18n.so
197/usr/lib/libsicui18n.a
198/usr/lib/libicuuc.so
199/usr/lib/libsicuuc.a
200/usr/lib/libicutu.so
201/usr/lib/libsicutu.a
202/usr/lib/libicuio.so
203/usr/lib/libsicuio.a
204/usr/lib/libicudata.so
205/usr/lib/libsicudata.a
206/usr/lib/libicule.so
207/usr/lib/libsicule.a
208/usr/lib/libiculx.so
209/usr/lib/libsiculx.a
210/usr/include/unicode/*.h
211/usr/include/layout/*.h
212/usr/lib/icu/%{version}/Makefile.inc
213/usr/lib/icu/Makefile.inc
214/usr/share/icu/%{version}/config
215/usr/share/doc/icu-%{version}/*
216
217%changelog
218* Mon Jun 07 2004 Alexei Dets <adets@idsk.com>
219- update to 3.0
220* Tue Aug 16 2003 Steven Loomis <srl@jtcsv.com>
221- update to 2.6.1 - include license
222* Thu Jun 05 2003 Steven Loomis <srl@jtcsv.com>
223- Update to 2.6
224* Fri Dec 27 2002 Steven Loomis <srl@jtcsv.com>
225- Update to 2.4 spec
226* Fri Sep 27 2002 Steven Loomis <srl@jtcsv.com>
227- minor updates to 2.2 spec. Rpath is off by default, don't pass it as an option.
228* Mon Sep 16 2002 Ian Holsman <ian@holsman.net>
229- update to icu 2.2
230
231