]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - compat-db/compat-db.nm
compat-db: Add compatibility for libdb-5.3
[ipfire-3.x.git] / compat-db / compat-db.nm
index bc9aa06cf1ad44493bc39c492ccbf64cabaa2e53..6c6c040200bf7acd161c826150b15fe062f4f1d5 100644 (file)
@@ -4,8 +4,9 @@
 ###############################################################################
 
 name       = compat-db
-version    = %{version_db47}
-release    = 4
+version    = %{main_version}
+# Release cannot be reset because the sub-packages won't get updated
+release    = 7
 thisapp    = db-%{version}
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
@@ -24,10 +25,17 @@ end
 
 version_db46 = 4.6.21
 version_db47 = 4.7.25
-versions     = %{version_db47} %{version_db46}
+version_db48 = 4.8.30
+version_db52 = 5.2.36
+version_db53 = 5.3.28
+versions     = %{version_db53} %{version_db52} %{version_db48} %{version_db47} %{version_db46}
+main_version:= %{version_db53}
 
 source_dl  = http://download.oracle.com/berkeley-db/
-sources    = db-%{version_db47}.tar.gz
+sources    = db-%{version_db53}.tar.gz
+sources   += db-%{version_db52}.tar.gz
+sources   += db-%{version_db48}.tar.gz
+sources   += db-%{version_db47}.tar.gz
 sources   += db-%{version_db46}.tar.gz
 
 build
@@ -36,6 +44,7 @@ build
        end
 
        CFLAGS += -fno-strict-aliasing
+       CFLAGS += -Wno-format
 
        configure_options += \
                --enable-compat185 \
@@ -61,7 +70,7 @@ build
                                docdir=%{datadir}/doc/db-${version}
 
                        # Remove unversioned libs.
-                       rm -vf %{BUILDROOT}%{libdir}/libdb*-4.so
+                       rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
 
                        # Move binaries.
                        tag=$(echo ${version} | cut -c1,3)
@@ -80,9 +89,9 @@ build
                        rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
 
                        # Move headers.
-                       mkdir -pv %{BUILDROOT}%{includedir}/db${version}
+                       mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
                        mv -v %{BUILDROOT}%{includedir}/*.h \
-                               %{BUILDROOT}%{includedir}/db${version}/
+                               %{BUILDROOT}%{includedir}/db-${version}/
 
                        # Remove documentation.
                        rm -rf %{BUILDROOT}%{datadir}/doc
@@ -92,10 +101,15 @@ end
 
 packages
        package %{name}
-               requires += compat-db46 = %{version_db46}
-               requires += compat-db47 = %{version_db47}
+               requires
+                       compat-db53 = %{version_db53}-%{_release}
+                       compat-db52 = %{version_db52}-%{_release}
+                       compat-db48 = %{version_db48}-%{_release}
+                       compat-db47 = %{version_db47}-%{_release}
+                       compat-db46 = %{version_db46}-%{_release}
+               end
        end
-       
+
        template COMPATDB
                version = %{version_db%{version_tag}}
 
@@ -114,15 +128,41 @@ packages
                        %{libdir}/libdb*-%{version_major}.so
                end
 
-               requires = compat-db-headers = %{thisver}
                obsoletes
                        db4 < 1:%{version_major}
                        db4-devel < 1:%{version_major}
                        db4-cxx < 1:%{version_major}
                        db4-utils < 1:%{version_major}
+
+                       libdb < %{version_major}
+               end
+
+               conflicts
+                       libdb = %{version_major}
                end
        end
 
+       package %{name}53
+               template COMPATDB
+
+               version_tag   = 53
+               version_major = 5.3
+       end
+
+       package %{name}52
+               template COMPATDB
+
+               version_tag   = 52
+               version_major = 5.2
+       end
+
+       package %{name}48
+               template COMPATDB
+
+               version_tag   = 48
+               version_major = 4.8
+       end
+
        package %{name}47
                template COMPATDB
 
@@ -148,6 +188,10 @@ packages
                arch = noarch
 
                files = %{includedir}
+
+               requires
+                       compat-db = %{main_version}-%{_release}
+               end
        end
 
        package %{name}-debuginfo