Patch6: rpm-4.15.patch
Patch7: db-index-format.patch
Patch8: rpm4-uname-deps.patch
+Patch9: sqlite-rpmdb.patch
URL: http://poldek.pld-linux.org/
BuildRequires: %{db_pkg}-devel >= %{ver_db}
BuildRequires: autoconf >= 2.63
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%{__rm} doc/poldek.info
%{__rm} m4/libtool.m4 m4/lt*.m4
--- /dev/null
+--- poldek-0.42.2/pm/rpmorg/rpm.c.orig 2020-01-25 22:59:59.000000000 +0100
++++ poldek-0.42.2/pm/rpmorg/rpm.c 2020-11-01 10:11:24.892206997 +0100
+@@ -286,6 +286,10 @@
+
+ pm_rpm = pm_rpm;
+
++ char *backend = rpmExpand("%{_db_backend}", NULL);
++ if (backend != NULL && strncmp(backend, "sqlite", 6) == 0) {
++ file = "rpmdb.sqlite";
++ }
+ snprintf(path, sizeof(path), "%s/%s", dbpath, file);
+
+ if (stat(path, &st) != 0)