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