commit fc61ee66a2787d888082af6dc4fa0d7597502827
Author: Jan Rękorajski <[email protected]>
Date:   Sun Jan 26 14:46:32 2020 +0100

    - cleanup db bconds and deps
    
    We don't care for db version for rpm5 (it's going away, so...),
    rpm.org links with system db (-ldb), follow suit here

 poldek.spec             | 30 ++++++++++++++----------------
 rpm.org-system-db.patch | 18 ++++++++++++++++++
 2 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/poldek.spec b/poldek.spec
index 1e3d12a..44d06bf 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -7,30 +7,22 @@
 %bcond_without imode   # don't build interactive mode
 %bcond_without python  # don't build python bindings
 %bcond_with    snap    # install configs for official Th snapshot
-%bcond_with    db61    # DB 6.1 instead of 5.2
-%bcond_with    rpm4    # use rpm4/db4.7 instead of rpm5
+%bcond_with    rpm4    # use rpm4 instead of rpm5
 
 # current snapshot name
 %define                SNAP    2019
 
 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
-# NOTE: poldek links with "system db" (-ldb) anyway if it exists
-%if %{with db61}
-%define                db_pkg          db6.1
-%define                ver_db          6.1
-%define                ver_db_rel      1
+%if %{with rpm4}
+%define                db_pkg          db
+%define                ver_db          5.3
+%define                ver_db_rel      3
+%define                ver_rpm         1:4.14
+%define                ver_db_devel    %(rpm -q --qf '%|E?{%{E}:}|%{V}-%{R}' 
--what-provides db-devel)
 %else
 %define                db_pkg          db5.2
 %define                ver_db          5.2
 %define                ver_db_rel      3
-%endif
-
-%if %{with rpm4}
-%define                db_pkg          db4.7
-%define                ver_db          4.7.25
-%define                ver_db_rel      1
-%define                ver_rpm         4.5-49
-%else
 %define                ver_rpm         5.4.10
 %endif
 
@@ -64,6 +56,7 @@ Patch0:               %{name}-config.patch
 Patch1:                pm-hooks.patch
 Patch2:                poldek-ext-down-enable.patch
 Patch3:                multiple-options.patch
+Patch4:                rpm.org-system-db.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
 BuildRequires: autoconf
@@ -104,11 +97,15 @@ BuildRequires:     zstd-static
 %endif
 Requires(triggerpostun):       awk
 Requires(triggerpostun):       sed >= 4.0
+%if %{with rpm4}
+Requires:      %{db_pkg} >= %{ver_db_devel}
+%else
 Requires:      %{db_pkg} >= %{ver_db}-%{ver_db_rel}
+Requires:      rpm-db-ver = %{ver_db}
+%endif
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      /bin/run-parts
 Requires:      rpm >= %{ver_rpm}
-Requires:      rpm-db-ver = %{ver_db}
 Requires:      rpm-lib >= %{ver_rpm}
 Requires:      sed
 Conflicts:     etckeeper < 1.18-2
@@ -230,6 +227,7 @@ Moduły języka Python dla poldka.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %{__rm} m4/libtool.m4 m4/lt*.m4
 
diff --git a/rpm.org-system-db.patch b/rpm.org-system-db.patch
new file mode 100644
index 0000000..6762e3f
--- /dev/null
+++ b/rpm.org-system-db.patch
@@ -0,0 +1,18 @@
+--- poldek-0.40.0/configure.ac~        2019-12-30 10:21:37.000000000 +0100
++++ poldek-0.40.0/configure.ac 2020-01-26 10:38:55.479795637 +0100
+@@ -335,11 +335,15 @@
+       #       DBLIB="$DBLIB -ldb1"
+       #fi
+ else
++    if test "${is_rpmorg}." = "yes."; then
++      AC_CHECK_LIB(db, db_create, [DBLIB="-ldb"],,[$LIBS])
++    else
+     AC_CHECK_LIB(db4, db_create, [DBLIB="-ldb4" 
DBINCLUDE="-I/usr/include/db4"],
+         [AC_CHECK_LIB(db-4.1, db_create, [DBLIB="-ldb-4.1" 
DBINCLUDE="-I/usr/include/db4.1"],
+              [AC_CHECK_LIB(db-4.0, db_create, [DBLIB="-ldb-4.0" 
DBINCLUDE="-I/usr/include/db4.0"],
+                      [AC_CHECK_LIB(db-5.2, db_create, [DBLIB="-ldb-5.2" 
DBINCLUDE="-I/usr/include/db5.2"],,[$LIBS])],
+                      [$LIBS])],, [$LIBS])],, [$LIBS])
++    fi
+ 
+       if test "${ENABLE_STATIC}." = "yes."; then
+               DBLIB="$DBLIB"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/fc61ee66a2787d888082af6dc4fa0d7597502827

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to