Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 29dd482b5f6a6455b6f47e5efb8a2d61 > files > 2

adns-1.3-4mdv2009.0.src.rpm

%define	name	adns
%define	version	1.3
%define	release	%mkrel 4
%define	major	1
%define libname	%mklibname %{name} %{major}
%define develname %mklibname %{name} -d

Summary:	Advanced, easy to use, asynchronous-capable DNS client library
Name:		%{name}
Version:	%{version}
Release:	%{release}
URL:		http://www.chiark.greenend.org.uk/~ian/adns/
License:	GPL
Source0:	ftp://ftp.chiark.greenend.org.uk/users/ian/adns/%{name}-%{version}.tar.bz2
Group:		Networking/Other
Requires: 	%{libname} = %{version}
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
adns is a resolver library for C (and C++) programs. In contrast with
the existing interfaces, gethostbyname et al and libresolv, it has the
following features:
    * It is reasonably easy to use for simple programs which just want
      to translate names to addresses, look up MX records, etc.
    * It can be used in an asynchronous, non-blocking, manner. Many
      queries can be handled simultaneously.
    * Responses are decoded automatically into a natural representation
      for a C program - there is no need to deal with DNS packet
      formats.
    * Sanity checking (eg, name syntax checking, reverse/forward
      correspondence, CNAME pointing to CNAME) is performed
      automatically.
    * Time-to-live, CNAME and other similar information is returned in
      an easy-to-use form, without getting in the way.
    * There is no global state in the library; resolver state is an
      opaque data structure which the client creates explicitly. A
      program can have several instances of the resolver.
    * Errors are reported to the application in a way that distinguishes
      the various causes of failure properly.
    * Understands conventional resolv.conf, but this can overridden by
      environment variables.
    * Flexibility. For example, the application can tell adns to: ignore
      environment variables (for setuid programs), disable sanity checks
      eg to return arbitrary data, override or ignore resolv.conf in
      favour of supplied configuration, etc.
    * Believed to be correct ! For example, will correctly back off to
      TCP in case of long replies or queries, or to other nameservers if
      several are available. It has sensible handling of bad responses
      etc.

%package -n	%{libname}
Group:		System/Libraries
Summary:	Libraries needed to run applications using adns

%description -n	%{libname}
adns is a resolver library for C (and C++) programs. In contrast with
the existing interfaces, gethostbyname et al and libresolv, it has the
following features:
    * It is reasonably easy to use for simple programs which just want
      to translate names to addresses, look up MX records, etc.
    * It can be used in an asynchronous, non-blocking, manner. Many
      queries can be handled simultaneously.
    * Responses are decoded automatically into a natural representation
      for a C program - there is no need to deal with DNS packet
      formats.
    * Sanity checking (eg, name syntax checking, reverse/forward
      correspondence, CNAME pointing to CNAME) is performed
      automatically.
    * Time-to-live, CNAME and other similar information is returned in
      an easy-to-use form, without getting in the way.
    * There is no global state in the library; resolver state is an
      opaque data structure which the client creates explicitly. A
      program can have several instances of the resolver.
    * Errors are reported to the application in a way that distinguishes
      the various causes of failure properly.
    * Understands conventional resolv.conf, but this can overridden by
      environment variables.
    * Flexibility. For example, the application can tell adns to: ignore
      environment variables (for setuid programs), disable sanity checks
      eg to return arbitrary data, override or ignore resolv.conf in
      favour of supplied configuration, etc.
    * Believed to be correct ! For example, will correctly back off to
      TCP in case of long replies or queries, or to other nameservers if
      several are available. It has sensible handling of bad responses
      etc.

This package contains all of adns libraries.

%package -n	%{develname}
Summary:	Advanced, easy to use, asynchronous-capable DNS client library
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	lib%{name}-devel = %{version}
Provides:	%{name}-devel = %{version}
Obsoletes:	%{libname}-devel

%description -n	%{develname}
adns is a resolver library for C (and C++) programs. In contrast with
the existing interfaces, gethostbyname et al and libresolv, it has the
following features:
    * It is reasonably easy to use for simple programs which just want
      to translate names to addresses, look up MX records, etc.
    * It can be used in an asynchronous, non-blocking, manner. Many
      queries can be handled simultaneously.
    * Responses are decoded automatically into a natural representation
      for a C program - there is no need to deal with DNS packet
      formats.
    * Sanity checking (eg, name syntax checking, reverse/forward
      correspondence, CNAME pointing to CNAME) is performed
      automatically.
    * Time-to-live, CNAME and other similar information is returned in
      an easy-to-use form, without getting in the way.
    * There is no global state in the library; resolver state is an
      opaque data structure which the client creates explicitly. A
      program can have several instances of the resolver.
    * Errors are reported to the application in a way that distinguishes
      the various causes of failure properly.
    * Understands conventional resolv.conf, but this can overridden by
      environment variables.
    * Flexibility. For example, the application can tell adns to: ignore
      environment variables (for setuid programs), disable sanity checks
      eg to return arbitrary data, override or ignore resolv.conf in
      favour of supplied configuration, etc.
    * Believed to be correct ! For example, will correctly back off to
      TCP in case of long replies or queries, or to other nameservers if
      several are available. It has sensible handling of bad responses
      etc.

This package contains static libraries and header files need for development.

%prep
%setup -q
# make it lib64 aware
perl -pi -e "/^lib_dir=/ and s,/lib,/%{_lib}," settings.make.in

%build

%configure2_5x

%make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_includedir}
install -d %{buildroot}%{_libdir}

%makeinstall

#make prefix=$RPM_BUILD_ROOT%{_prefix} install
(set -e
 cd %{buildroot}%{_libdir}
 ln -s libadns.so.? libadns.so
)
 
%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root,0755)
%doc README TODO changelog
%{_bindir}/*

%files -n %{libname}
%defattr(-,root,root,755)
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%defattr(-,root,root,0755)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a




%changelog
* Mon Aug 25 2008 Emmanuel Andry <eandry@mandriva.org> 1.3-4mdv2009.0
+ Revision: 275946
- apply devel policy
- check major

* Mon Jun 16 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.3-3mdv2009.0
+ Revision: 220346
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Fri Jan 11 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.3-2mdv2008.1
+ Revision: 148428
- rebuild
- kill re-definition of %%buildroot on Pixel's request
- fix summary-ended-with-dot

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot


* Tue Aug 15 2006 Olivier Thauvin <nanardon@mandriva.org> 1.3-1mdv2007.0
+ Revision: 55883
- 1.3
- Import adns

* Thu Dec 15 2005 Arnaud de Lorbeau <devel@mandriva.com> 1.1-5mdk
- rebuild

* Tue Oct 12 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-4mdk
- merge lost fixes from 10.0-branch:
  * lib64 fixes

* Sun Jun 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.1-3mdk
- more spec file fixes (forgot to run rpmlint...)

* Sun Jun 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.1-2mdk
- rebuilt against new deps and with gcc v3.4.x
- use the %%configure2_5x macro
- added P0
- misc spec file fixes

* Thu Apr 29 2004 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 1.1-1mdk
- new release