Summary: Double-array structure for representing trie Name: libdatrie Version: 0.2.12 Release: 1 License: LGPL Group: System/Libraries URL: http://linux.thai.net Source0: ftp://linux.thai.net/pub/thailinux/software/libthai/%{name}-%{version}.tar.bz2 Source1: ftp://linux.thai.net/pub/thailinux/software/libthai/%{name}-%{version}.tar.xz.md5sum Source2: %{name}.so.0-aix32 Source3: %{name}.so.0-aix64 Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config BuildRequires: libiconv >= 1.15-1 Requires: libiconv >= 1.15-1 %description This is an implementation of double-array structure for representing trie. Trie is a kind of digital search tree, an efficient indexing method with O(1) time complexity for searching. Comparably as efficient as hashing, trie also provides flexibility on incremental matching and key spelling manipulation. This makes it ideal for lexical analyzers, as well as spelling dictionaries. The library is available as 32-bit and 64-bit. %package devel Summary: Double-array structure for representing trie Group: Development/C Requires: %{name} = %{version} Requires: pkg-config %description devel This package includes the header files and developer docs for the libdatrie package. Install libdatrie-devel if you want to develop programs which will use libdatrie. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc_r -q64" or "gcc -maix64". %prep %setup -q %patch0 %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc_r -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp ./datrie/.libs/libdatrie.so.1 . make distclean # now build the 32-bit version export CC="cc_r" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./datrie/.libs/libdatrie.a ./libdatrie.so.1 # add the older shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} %{name}.so.0 /usr/bin/strip -X32 -e %{name}.so.0 /usr/bin/ar -X32 -q %{name}.a %{name}.so.0 cp %{SOURCE3} %{name}.so.0 /usr/bin/strip -X64 -e %{name}.so.0 /usr/bin/ar -X64 -q %{name}.a %{name}.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README AUTHORS COPYING NEWS %{_bindir}/* %{_mandir}/man1/* %{_libdir}/*.a /usr/bin* /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/* /usr/include/* /usr/lib/*.la %changelog * Tue Oct 30 2018 Michael Perzl - 0.2.12-1 - updated to version 0.2.12-1 * Tue Oct 30 2018 Michael Perzl - 0.2.11-1 - updated to version 0.2.11-1 * Mon Jan 04 2016 Michael Perzl - 0.2.10-1 - updated to version 0.2.10-1 * Mon Jan 04 2016 Michael Perzl - 0.2.9-1 - updated to version 0.2.9-1 * Tue Nov 11 2014 Michael Perzl - 0.2.8-1 - updated to version 0.2.8-1 * Tue May 01 2012 Michael Perzl - 0.2.5-1 - updated to version 0.2.5-1 * Tue Jul 19 2011 Michael Perzl - 0.2.4-1 - updated to version 0.2.4-1 * Tue May 03 2011 Michael Perzl - 0.1.4-1 - updated to version 0.1.4-1 * Tue Apr 22 2008 Michael Perzl - 0.1.3-1 - first version for AIX V5.1 and higher