Summary: Library for converting unicode strings to numbers Name: libuninum Version: 2.7 Release: 1 # numconv is GPLv2, lib is LGPLv2 License: GPLv2 and LGPLv2 Group: Development/Libraries URL: http://billposer.org/Software/libuninum.html Source0: http://billposer.org/Software/Downloads/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gmp-devel Requires: gmp %description libuninum is a library for converting Unicode strings to numbers. Internal computation is done using arbitrary precision arithmetic, so there is no limit on the size of the integer that can be converted. The value is returned as an ASCII decimal string, a GNU MP object, or an unsigned long integer. Auto-detection of the number system is provided. The number systems supported include Arabic, Armenian, Balinese, Bengali, Burmese, Chinese, Cyrillic, Devanagari, Egyptian, Ethiopic, Glagolitic, Greek, Gujarati, Gurmukhi, Hebrew, Kannada, Khmer, Klingon, Lao, Limbu, Malayalam, Mongolian, New Tai Lue, Nko, Old Italic, Old Persian, Oriya, Osmanya, Perso-Arabic, Phoenician, Roman Numerals, Tamil, Telugu, Tengwar, Thai, and Tibetan. The library is available as 32-bit and 64-bit. %package devel Summary: Header files, libraries and development documentation for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains the header files, static libraries and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. 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 "xlc -q64" or "gcc -maix64". %prep %setup -q %patch0 %build # 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="xlc -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} cp .libs/libuninum.so.5 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --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 .libs/libuninum.a ./libuninum.so.5 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install %{__rm} -f ${RPM_BUILD_ROOT}%{_bindir}/NumberConverter.tcl ( 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 AUTHORS ChangeLog COPYING CREDITS NEWS README README_NUMBERCONVERTER TODO %doc Examples %{_bindir}/* %{_libdir}/*.a %{_mandir}/man1/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Fri Jul 04 2008 Michael Perzl - 2.7-1 - first version for AIX V5.1 and higher