--- /dev/null
+--- yaz-1.8.6/configure.in.orig Sun Mar 24 11:14:54 2002
++++ yaz-1.8.6/configure.in Fri May 3 17:51:54 2002
+@@ -144,6 +144,7 @@
+ dnl
+ dnl ------ tcpd
+ AC_ARG_ENABLE(tcpd,[ --enable-tcpd[=PREFIX] enable TCP wrapper for server if available])
++WRAPLIBS=
+ if test "$enable_tcpd" != ""; then
+ oldLibs=$LIBS
+ oldCPPFLAGS=$CPPFLAGS
+@@ -152,7 +153,7 @@
+ CPPFLAGS="$CPPFLAGS -I$enable_tcpd/include"
+ fi
+ AC_MSG_CHECKING(for working tcpd.h)
+- LIBS="$LIBS -lwrap -lnsl"
++ LIBS="$LIBS -lwrap"
+ AC_TRY_LINK([#include <syslog.h>
+ #include <tcpd.h>
+ int allow_severity = LOG_INFO;
+@@ -162,13 +163,15 @@
+ tcpd_ok=1, tcpd_ok=0)
+ if test "$tcpd_ok" = "0"; then
+ AC_MSG_RESULT(no)
+- LIBS=$oldLibs
+ CPPFLAGS=$oldCPPFLAGS
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TCPD_H)
++ WRAPLIBS="-lwrap"
+ fi
++ LIBS=$oldLibs
+ fi
++AC_SUBST(WRAPLIBS)
+ dnl
+ dnl ------ Headers
+ AC_CHECK_HEADERS(fnmatch.h)
+--- yaz-1.8.6/server/Makefile.am.orig Fri May 3 17:52:47 2002
++++ yaz-1.8.6/server/Makefile.am Fri May 3 17:52:36 2002
+@@ -7,6 +7,6 @@
+
+ EXTRA_DIST=service.c
+
+-LIBS =
++LIBS = $(WRAPLIBS)
+
+ INCLUDES=-I$(top_srcdir)/include
--- /dev/null
+Summary: Z39.50 protocol support library
+Summary(pl): Biblioteka obs³uguj±ca protokó³ Z39.50
+Name: yaz
+Version: 1.8.6
+Release: 1
+License: BSD-like
+Vendor: Index Data ApS <info@indexdata.dk>
+Group: Libraries
+Source0: http://ftp.indexdata.dk/pub/yaz/%{name}-%{version}.tar.gz
+Patch0: %{name}-libwrap-fix.patch
+URL: http://www.indexdata.dk/yaz/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libwrap-devel
+BuildRequires: readline-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+YAZ is a C library for developing client - and server applications
+using the ANSI/NISO Z39.50 protocol for Information Retrieval.
+
+%description -l pl
+YAZ to biblioteka w C do tworzenia aplikacji klienckich i serwerów
+korzystaj±cych z protoko³u ANSI/NISO Z39.50 do uzyskiwania informacji.
+
+%package devel
+Summary: Header files for YAZ library
+Summary(pl): Pliki nag³ówkowe biblioteki YAZ
+Group: Development/Libraries
+Requires: %{name} = %{version}
+Requires: libwrap-devel
+
+%description devel
+Header files for YAZ library.
+
+%description devel -l pl
+Pliki nag³ówkowe biblioteki YAZ.
+
+%package static
+Summary: YAZ static libraries
+Summary(pl): Statyczne biblioteki YAZ
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}
+
+%description static
+YAZ static libraries.
+
+%description static -l pl
+Statyczne biblioteki YAZ.
+
+%prep
+%setup -q
+%patch -p1
+
+%build
+aclocal
+autoconf
+automake -a -c -f --foreign
+%configure \
+ --enable-shared \
+ --enable-tcpd
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__make} install -C doc \
+ DESTDIR=$RPM_BUILD_ROOT
+
+mv -f $RPM_BUILD_ROOT%{_datadir}/yaz/doc ./doc-dist
+
+gzip -9nf README LICENSE CHANGELOG TODO
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc *.gz
+%config %{_datadir}/yaz/tab
+%attr(755,root,root) %{_bindir}/yaz-client
+%attr(755,root,root) %{_bindir}/yaz-ztest
+%attr(755,root,root) %{_bindir}/yaz-comp
+%attr(755,root,root) %{_bindir}/zoomsh
+%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%{_datadir}/yaz
+
+%files devel
+%defattr(644,root,root,755)
+%doc doc-dist/*
+%attr(755,root,root) %{_bindir}/yaz-config
+%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/lib*.la
+%{_includedir}/yaz
+%{_aclocaldir}/yaz.m4
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a