]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
compat-db: Add db 5.2 and 4.8
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Jun 2015 12:17:56 +0000 (14:17 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Jun 2015 12:17:56 +0000 (14:17 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
compat-db/compat-db.nm

index df91897b17fc6568640e1531e2775963a3c80874..8d41fa2d41e3945512a0d8f987a8443a2d2473f3 100644 (file)
@@ -5,7 +5,8 @@
 
 name       = compat-db
 version    = %{main_version}
-release    = 5
+# Release cannot be reset because the sub-packages won't get updated
+release    = 6
 thisapp    = db-%{version}
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
@@ -24,11 +25,15 @@ end
 
 version_db46 = 4.6.21
 version_db47 = 4.7.25
-versions     = %{version_db47} %{version_db46}
-main_version:= %{version_db47}
+version_db48 = 4.8.30
+version_db52 = 5.2.36
+versions     = %{version_db52} %{version_db48} %{version_db47} %{version_db46}
+main_version:= %{version_db52}
 
 source_dl  = http://download.oracle.com/berkeley-db/
-sources    = db-%{version_db47}.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
@@ -37,6 +42,7 @@ build
        end
 
        CFLAGS += -fno-strict-aliasing
+       CFLAGS += -Wno-format
 
        configure_options += \
                --enable-compat185 \
@@ -62,7 +68,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)
@@ -81,9 +87,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
@@ -93,10 +99,14 @@ end
 
 packages
        package %{name}
-               requires += compat-db46 = %{version_db46}-%{_release}
-               requires += compat-db47 = %{version_db47}-%{_release}
+               requires
+                       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}}
 
@@ -115,15 +125,34 @@ packages
                        %{libdir}/libdb*-%{version_major}.so
                end
 
-               requires = compat-db-headers = %{main_version}-%{_release}
                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}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
 
@@ -149,6 +178,10 @@ packages
                arch = noarch
 
                files = %{includedir}
+
+               requires
+                       compat-db = %{main_version}-%{_release}
+               end
        end
 
        package %{name}-debuginfo