| 1 | # Note: this .spec is borrowed from icu-56.1-3.fc24.src.rpm
|
|---|
| 2 |
|
|---|
| 3 | Name: icu
|
|---|
| 4 | Version: 56.1
|
|---|
| 5 | Release: 1%{?dist}
|
|---|
| 6 | Summary: International Components for Unicode
|
|---|
| 7 | Group: Development/Tools
|
|---|
| 8 | License: MIT and UCD and Public Domain
|
|---|
| 9 | URL: http://www.icu-project.org/
|
|---|
| 10 | #Source0: http://download.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.tgz
|
|---|
| 11 |
|
|---|
| 12 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 13 | #BuildRequires: doxygen
|
|---|
| 14 | BuildRequires: autoconf
|
|---|
| 15 | Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
|---|
| 16 |
|
|---|
| 17 | %define svn_url http://svn.netlabs.org/repos/ports/icu/trunk
|
|---|
| 18 | %define svn_rev 1388
|
|---|
| 19 |
|
|---|
| 20 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 21 |
|
|---|
| 22 | BuildRequires: gcc make subversion zip
|
|---|
| 23 |
|
|---|
| 24 | Patch4: gennorm2-man.patch
|
|---|
| 25 | Patch5: icuinfo-man.patch
|
|---|
| 26 |
|
|---|
| 27 | %description
|
|---|
| 28 | Tools and utilities for developing with icu.
|
|---|
| 29 |
|
|---|
| 30 | %package -n lib%{name}
|
|---|
| 31 | Summary: International Components for Unicode - libraries
|
|---|
| 32 | Group: System Environment/Libraries
|
|---|
| 33 |
|
|---|
| 34 | %description -n lib%{name}
|
|---|
| 35 | The International Components for Unicode (ICU) libraries provide
|
|---|
| 36 | robust and full-featured Unicode services on a wide variety of
|
|---|
| 37 | platforms. ICU supports the most current version of the Unicode
|
|---|
| 38 | standard, and they provide support for supplementary Unicode
|
|---|
| 39 | characters (needed for GB 18030 repertoire support).
|
|---|
| 40 | As computing environments become more heterogeneous, software
|
|---|
| 41 | portability becomes more important. ICU lets you produce the same
|
|---|
| 42 | results across all the various platforms you support, without
|
|---|
| 43 | sacrificing performance. It offers great flexibility to extend and
|
|---|
| 44 | customize the supplied services.
|
|---|
| 45 |
|
|---|
| 46 | %package -n lib%{name}-devel
|
|---|
| 47 | Summary: Development files for International Components for Unicode
|
|---|
| 48 | Group: Development/Libraries
|
|---|
| 49 | Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
|---|
| 50 | Requires: pkgconfig
|
|---|
| 51 |
|
|---|
| 52 | %description -n lib%{name}-devel
|
|---|
| 53 | Includes and definitions for developing with icu.
|
|---|
| 54 |
|
|---|
| 55 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 56 | #%package -n lib%{name}-doc
|
|---|
| 57 | #Summary: Documentation for International Components for Unicode
|
|---|
| 58 | #Group: Documentation
|
|---|
| 59 | #BuildArch: noarch
|
|---|
| 60 |
|
|---|
| 61 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 62 | #%description -n lib%{name}-doc
|
|---|
| 63 | #%{summary}.
|
|---|
| 64 |
|
|---|
| 65 | %prep
|
|---|
| 66 |
|
|---|
| 67 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 68 | %setup -q
|
|---|
| 69 | %else
|
|---|
| 70 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 71 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 72 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 73 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 74 | %endif
|
|---|
| 75 |
|
|---|
| 76 | %patch4 -p1
|
|---|
| 77 | %patch5 -p1
|
|---|
| 78 |
|
|---|
| 79 | %build
|
|---|
| 80 |
|
|---|
| 81 | cd source
|
|---|
| 82 | autoreconf -fvi
|
|---|
| 83 | %configure --with-data-packaging=library --disable-samples \
|
|---|
| 84 | --disable-renaming \
|
|---|
| 85 | --enable-shared --disable-static
|
|---|
| 86 |
|
|---|
| 87 | # The configure --disable-renaming and possibly other options
|
|---|
| 88 | # result in icu/source/uconfig.h.prepend being created, include that content in
|
|---|
| 89 | # icu/source/common/unicode/uconfig.h to propagate to consumer packages.
|
|---|
| 90 | test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
|
|---|
| 91 |
|
|---|
| 92 | # We use --disable-renaming in configure options to build a non-versioned librariy for
|
|---|
| 93 | # system-wide installation on OS/2. This installation also requires hiding draft and
|
|---|
| 94 | # deprecated API to maintain backward ABI compatibility (see
|
|---|
| 95 | # http://userguide.icu-project.org/design#TOC-ICU-Binary-Compatibility:-Using-ICU-as-an-Operating-System-Level-Library).
|
|---|
| 96 | # Note that we cannot use --disable-draft because it defines U_HIDE_INTERNAL_API but
|
|---|
| 97 | # this breaks the build (upstream bug). Note that we also cannot use U_HIDE_SYSTEM_API
|
|---|
| 98 | # or U_HIDE_DEPRECATED_API (despite readme.html recommedation) for the same reason...
|
|---|
| 99 | # Note that we actually can't use U_HIDE_DRAFT_API... This part of ICU is really broken.
|
|---|
| 100 | # And the open source model is really evil. Really. Low code quality.
|
|---|
| 101 | #echo '
|
|---|
| 102 | ##define U_HIDE_DRAFT_API 1
|
|---|
| 103 | #' > uconfig.h.prepend
|
|---|
| 104 | #sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
|
|---|
| 105 |
|
|---|
| 106 | make %{?_smp_mflags}
|
|---|
| 107 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 108 | #make %{?_smp_mflags} doc
|
|---|
| 109 |
|
|---|
| 110 | %install
|
|---|
| 111 |
|
|---|
| 112 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 113 | #rm -rf $RPM_BUILD_ROOT source/__docs
|
|---|
| 114 | make %{?_smp_mflags} -C source install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 115 |
|
|---|
| 116 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 117 | #make %{?_smp_mflags} -C source install-doc docdir=__docs
|
|---|
| 118 |
|
|---|
| 119 | %check
|
|---|
| 120 |
|
|---|
| 121 | # test to ensure that -j(X>1) didn't "break" man pages. b.f.u #2357
|
|---|
| 122 | if grep -q @VERSION@ source/tools/*/*.8 source/tools/*/*.1 source/config/*.1; then
|
|---|
| 123 | exit 1
|
|---|
| 124 | fi
|
|---|
| 125 | # make %{?_smp_mflags} -C source check
|
|---|
| 126 |
|
|---|
| 127 | %files
|
|---|
| 128 | %defattr(-,root,root,-)
|
|---|
| 129 | %{_bindir}/derb.exe
|
|---|
| 130 | %{_bindir}/genbrk.exe
|
|---|
| 131 | %{_bindir}/gencfu.exe
|
|---|
| 132 | %{_bindir}/gencnval.exe
|
|---|
| 133 | %{_bindir}/gendict.exe
|
|---|
| 134 | %{_bindir}/genrb.exe
|
|---|
| 135 | %{_bindir}/makeconv.exe
|
|---|
| 136 | %{_bindir}/pkgdata.exe
|
|---|
| 137 | %{_bindir}/uconv.exe
|
|---|
| 138 | %{_sbindir}/*
|
|---|
| 139 | %{_mandir}/man1/derb.1*
|
|---|
| 140 | %{_mandir}/man1/gencfu.1*
|
|---|
| 141 | %{_mandir}/man1/gencnval.1*
|
|---|
| 142 | %{_mandir}/man1/gendict.1*
|
|---|
| 143 | %{_mandir}/man1/genrb.1*
|
|---|
| 144 | %{_mandir}/man1/genbrk.1*
|
|---|
| 145 | %{_mandir}/man1/makeconv.1*
|
|---|
| 146 | %{_mandir}/man1/pkgdata.1*
|
|---|
| 147 | %{_mandir}/man1/uconv.1*
|
|---|
| 148 | %{_mandir}/man8/*.8*
|
|---|
| 149 |
|
|---|
| 150 | %files -n lib%{name}
|
|---|
| 151 | %defattr(-,root,root,-)
|
|---|
| 152 | %doc license.html readme.html
|
|---|
| 153 | %{_libdir}/*.dll
|
|---|
| 154 |
|
|---|
| 155 | %files -n lib%{name}-devel
|
|---|
| 156 | %defattr(-,root,root,-)
|
|---|
| 157 | %{_bindir}/%{name}-config
|
|---|
| 158 | %{_bindir}/icuinfo.exe
|
|---|
| 159 | %{_mandir}/man1/%{name}-config.1*
|
|---|
| 160 | %{_mandir}/man1/icuinfo.1*
|
|---|
| 161 | %{_includedir}/layout
|
|---|
| 162 | %{_includedir}/unicode
|
|---|
| 163 | %{_libdir}/*_dll.a
|
|---|
| 164 | %{_libdir}/pkgconfig/*.pc
|
|---|
| 165 | %{_libdir}/%{name}
|
|---|
| 166 | %dir %{_datadir}/%{name}
|
|---|
| 167 | %dir %{_datadir}/%{name}/%{version}
|
|---|
| 168 | %{_datadir}/%{name}/%{version}/install-sh
|
|---|
| 169 | %{_datadir}/%{name}/%{version}/mkinstalldirs
|
|---|
| 170 | %{_datadir}/%{name}/%{version}/config
|
|---|
| 171 | %doc %{_datadir}/%{name}/%{version}/license.html
|
|---|
| 172 |
|
|---|
| 173 | # @todo (dmik) no doxygen RPM yet
|
|---|
| 174 | #%files -n lib%{name}-doc
|
|---|
| 175 | #%defattr(-,root,root,-)
|
|---|
| 176 | #%doc license.html readme.html
|
|---|
| 177 | #%doc source/__docs/%{name}/html/*
|
|---|
| 178 |
|
|---|
| 179 | %changelog
|
|---|
| 180 | * Tue Mar 15 2016 Dmitriy Kuminov <coding@dmik.org> 56.1-1
|
|---|
| 181 | - Initial package for version 56.1.
|
|---|