Summary: DNS resolver library for both synchronous and asynchronous DNS queries Name: udns Version: 0.1 Release: 1 License: LGPLv2+ Group: System Environment/Libraries URL: http://www.corpit.ru/mjt/udns.html Source0: http://www.corpit.ru/mjt/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description udns is a resolver library for C (and C++) programs, and a collection of useful DNS resolver utilities. %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. %prep %setup -q %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="cc -q64" ./configure \ --enable-ipv6 make %{?_smp_mflags} CreateExportList -X64 lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o shr64.o -bE:lib%{name}.exp rm -f lib%{name}.exp lib%{name}.a make distclean # now build the 32-bit version export CC="cc" ./configure \ --enable-ipv6 make %{?_smp_mflags} CreateExportList -X32 lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o shr.o -bE:lib%{name}.exp rm -f lib%{name}.exp lib%{name}.a ${AR} -rv lib%{name}.a shr.o # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects ${AR} -q lib%{name}.a ./shr64.o rm -f shr64.o rm -f dnsget rblcheck for f in dnsget rblcheck ; do make ${f} LIBFL="-L. -ludns -Wl,-blibpath:/opt/freeware/lib:/usr/vac/lib:/usr/lib:/lib" done %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # no install target, therefore do it manually mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3 cp dnsget rblcheck ${RPM_BUILD_ROOT}%{_bindir} chmod 0755 ${RPM_BUILD_ROOT}%{_bindir}/* /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cp lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/* cp udns.h ${RPM_BUILD_ROOT}%{_includedir} chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/* cp dnsget.1 rblcheck.1 ${RPM_BUILD_ROOT}%{_mandir}/man1 cp udns.3 ${RPM_BUILD_ROOT}%{_mandir}/man3 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man?/* ( 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 COPYING.LGPL NEWS NOTES TODO %{_bindir}/* %{_libdir}/*.a %{_mandir}/man1/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_mandir}/man3/* /usr/include/* %changelog * Thu Oct 06 2011 Michael Perzl - 0.1-1 - updated to version 0.1 * Wed Sep 30 2009 Michael Perzl - 0.0.9-1 - first version for AIX V5.1 and higher