Summary: Library to support IDNA2008 internationalized domain names Name: libidn2 Version: 2.0.5 Release: 1 License: (GPLv2+ or LGPLv3+) and GPLv3+ Group: System Environment/Libraries URL: https://www.gnu.org/software/libidn/#libidn2 Source0: ftp://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, patch BuildRequires: gettext >= 0.10.40-6 BuildRequires: libunistring-devel >= 0.9.7-1 Requires: gettext >= 0.10.40-6 Requires: libunistring >= 0.9.7-1 %define _libdir64 %{_prefix}/lib64 %description Libidn2 is an implementation of the IDNA2008 specifications in RFC 5890, 5891, 5892, 5893 and TR46 for internationalized domain names (IDN). It is a standalone library, without any dependency on libidn. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for libidn2 Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel The libidn2-devel package contains libraries and header files for developing applications that use libidn2. 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 export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc_r -D_LARGE_FILES" 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} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static gmake %{?_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} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( 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 ) # 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* gzip -9 ${RPM_BUILD_ROOT}%{_infodir}/*.info rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun 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/COPYING* 32bit/AUTHORS 32bit/NEWS 32bit/README.md %{_bindir}/* %{_libdir}/*.a %{_libdir64}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_mandir}/man1/* %{_infodir}/%{name}.info* /usr/bin/* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.a /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %doc 32bit/doc/%{name}.html 32bit/examples %{_includedir}/*.h %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %{_mandir}/man3/* %{_datadir}/gtk-doc/html/* /usr/include/*.h %changelog * Mon Jun 11 2018 Michael Perzl - 2.0.5-1 - updated to version 2.0.5 * Wed Aug 30 2017 Michael Perzl - 2.0.4-1 - updated to version 2.0.4 * Wed Aug 30 2017 Michael Perzl - 2.0.2-1 - updated to version 2.0.2 * Thu Apr 27 2017 Michael Perzl - 2.0.1-1 - first version for AIX V5.1 and higher