--- /dev/null
+--- dirmngr-0.4.5/configure.ac.orig 2003-05-12 23:33:58.000000000 +0200
++++ dirmngr-0.4.5/configure.ac 2003-07-26 11:07:11.000000000 +0200
+@@ -271,11 +271,11 @@
+ # Checks for header files.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS([string.h])
+-AC_CHECK_HEADERS(db2/db.h,,[echo -e "You need Berkeley DB2 to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
+-AC_HAVE_LIBRARY(db2,,[echo -e "You need Berkeley DB2 to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
++AC_CHECK_HEADERS(db.h,,[echo -e "You need Berkeley DB to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
++AC_HAVE_LIBRARY(db,,[echo -e "You need Berkeley DB to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
+
+ # db2 seems to come in two variants with 3 and 4 parameters to cursor(), better check:
+-AC_TRY_COMPILE([#include <db2/db.h>],[
++AC_TRY_COMPILE([#include <db.h>],[
+ DB* dbf;
+ DBC *cursorp;
+ dbf->cursor( dbf, NULL, &cursorp, 0 )
+--- dirmngr-0.4.5/src/crlcache.h.orig 2003-02-23 01:28:26.000000000 +0100
++++ dirmngr-0.4.5/src/crlcache.h 2003-07-26 11:09:55.000000000 +0200
+@@ -23,9 +23,9 @@
+
+ #include <config.h>
+ #include "../jnlib/types.h"
+-#ifdef HAVE_DB2_DB_H
++#ifdef HAVE_DB_H
+ #include <limits.h>
+-#include <db2/db.h>
++#include <db.h>
+ #else
+ /* Error */
+ #endif
+--- dirmngr-0.4.5/src/crlcache.c.orig 2003-02-23 01:27:49.000000000 +0100
++++ dirmngr-0.4.5/src/crlcache.c 2003-07-26 11:17:00.000000000 +0200
+@@ -55,7 +55,18 @@
+
+ static int mydbopen( const char* file, DB** dbpp )
+ {
++#if (DB_VERSION_MAJOR >= 3)
++ int ret;
++ if ((ret = db_create(dbpp, NULL, 0)) != 0)
++ return ret;
++# if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)
++ return (*dbpp)->open(*dbpp, NULL, file, NULL, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR);
++# else /* db 3.0 .. 4.0 */
++ return (*dbpp)->open(*dbpp, file, NULL, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR);
++# endif
++#else
+ return db_open( file, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR, NULL, NULL, dbpp );
++#endif
+ }
+
+ static int mydbclose( DB* dbp )
--- /dev/null
+--- dirmngr-0.4.5/doc/dirmngr.texi.orig 2002-11-20 00:43:20.000000000 +0100
++++ dirmngr-0.4.5/doc/dirmngr.texi 2003-07-26 11:27:38.000000000 +0200
+@@ -61,9 +61,9 @@
+ @c %**end of header
+
+ @ifnottex
+-@dircategory GNU Utilities
++@dircategory Miscellaneous:
+ @direntry
+-* dirmngr: (gnupg). X509/LDAP certificate and revocation list client.
++* dirmngr: (dirmngr). X509/LDAP certificate and revocation list client
+ @end direntry
+ This file documents the use of dirmngr.
+
--- /dev/null
+Summary: X509/LDAP certificate and revocation list client
+Summary(pl): Klient certyfikatów i list anuluj±cych X509/LDAP
+Name: dirmngr
+Version: 0.4.5
+Release: 1
+License: GPL
+Group: Applications
+Source0: ftp://ftp.gnupg.org/gcrypt/alpha/aegypten/%{name}-%{version}.tar.gz
+# Source0-md5: a6613347967f6679171c00808a17dfb2
+Patch0: %{name}-db4.patch
+Patch1: %{name}-info.patch
+BuildRequires: autoconf >= 2.52
+BuildRequires: automake
+BuildRequires: db-devel
+BuildRequires: libgcrypt-devel >= 1.1.5
+BuildRequires: libksba-devel
+BuildRequires: openldap-devel
+BuildRequires: texinfo
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+DirMngr is a client for managing and downloading certificate
+revocation lists (CRLs) for X509 certificates and for downloading the
+certificates themselves. DirMngr is usually invoked by gpgsm and in
+general not used directly.
+
+%description -l pl
+DirMngr to klient do zarz±dzania i pobierania list anuluj±cych
+certyfikaty (CRLs - certificate revocation lists) dla certyfikatów
+X509 oraz do pobierania samych certyfikatów. DirMngr jest zwykle
+wywo³ywany przez gpgsm i nie u¿ywany bezpo¶rednio.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
+
+%postun
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog NEWS README*
+%attr(755,root,root) %{_bindir}/dirmngr
+%{_infodir}/dirmngr.info*