%define _libdir64 %{_prefix}/lib64 Name: libunistring Version: 0.9.10 Release: 1 Group: System Environment/Libraries Summary: GNU Unicode string library License: LGPLv3+ URL: http://www.gnu.org/software/libunistring/ Source0: http://ftp.gnu.org/gnu/libunistring/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/gnu/libunistring/%{name}-%{version}.tar.gz.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: info %description This portable C library implements Unicode string types in three flavours: (UTF-8, UTF-16, UTF-32), together with functions for character processing (names, classifications, properties) and functions for string processing (iteration, formatted output, width, word breaks, line breaks, normalization, case folding and regular expressions). The library is available as 32-bit and 64-bit. %package devel Group: Development/Libraries Summary: GNU Unicode string library - development files Requires: %{name} = %{version}-%{release} %description devel Development files for programs using libunistring. 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 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="cc_r" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --with-libiconv-prefix=%{_prefix} make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --with-libiconv-prefix=%{_prefix} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip -9 ${RPM_BUILD_ROOT}%{_infodir}/*info* # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post devel /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/NEWS 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %doc 32bit/HACKING 32bit/DEPENDENCIES 32bit/THANKS 32bit/ChangeLog %doc %{_datadir}/doc/%{name}/*.html %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_infodir}/*info* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue May 29 2018 Michael Perzl - 0.9.10-1 - updated to version 0.9.10 * Thu Mar 01 2018 Michael Perzl - 0.9.9-1 - updated to version 0.9.9 * Thu Nov 30 2017 Michael Perzl - 0.9.8-1 - updated to version 0.9.8 * Mon Dec 05 2016 Michael Perzl - 0.9.7-1 - updated to version 0.9.7 * Wed Jul 08 2015 Michael Perzl - 0.9.6-1 - updated to version 0.9.6 * Tue Feb 17 2015 Michael Perzl - 0.9.5-1 - updated to version 0.9.5 * Tue Feb 17 2015 Michael Perzl - 0.9.4-1 - updated to version 0.9.4 * Wed Apr 10 2013 Michael Perzl - 0.9.3-1 - first version for AIX V5.1 and higher