]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Enable more libsolv features and rework spec distro conditionals
authorNeal Gompa <ngompa13@gmail.com>
Mon, 8 May 2017 13:17:56 +0000 (09:17 -0400)
committerNeal Gompa <ngompa13@gmail.com>
Mon, 8 May 2017 13:17:56 +0000 (09:17 -0400)
- Enable bzip2 and xz/lzma compression support
- Enable complex/rich dependencies on distributions with RPM 4.13+
- Simplified CentOS/RHEL conditionals
- Added Mageia conditionals
- Fixed a few spec portability issues

package/libsolv.changes
package/libsolv.spec.in

index 94bb400e2225878295cca192917bf41e524f2414..0cf43f6466c8bc879b58128f4f9199a2cbeb2d34 100644 (file)
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Mon May  8 13:15:09 UTC 2017 - ngompa13@gmail.com
+
+- Enable bzip2 and xz/lzma compression support
+- Enable complex/rich dependencies on distributions with RPM 4.13+
+- Simplified CentOS/RHEL conditionals
+- Added Mageia conditionals
+- Fixed a few spec portability issues
+
 -------------------------------------------------------------------
 Tue Apr 25 14:11:05 CEST 2017 - mls@suse.de
 
index d21562c19c6c4aebbb0bc67b752b95fce424aa37..8b6f75edfd8626d11c1da6a6131633682a86e791 100644 (file)
@@ -28,20 +28,28 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %bcond_without python_binding
 %bcond_without python3_binding
 %bcond_without ruby_binding
+%bcond_without bz2
+%bcond_without xz
 %bcond_with zypp
 
+%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?mageia} >= 6 || 0%{?suse_version} >= 1330
+%bcond_without richdeps
+%else
+%bcond_with richdeps
+%endif
+
 %if 0%{?mandriva_version}
 # force this version on mandriva
 BuildRequires:  libneon0.26-devel
 %endif
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  db-devel
 %endif
 BuildRequires:  libxml2-devel
 %if 0%{?suse_version} && 0%{?suse_version} < 1100
 BuildRequires:  graphviz
 %endif
-%if 0%{?suse_version} > 1020
+%if 0%{?suse_version} > 1020 || 0%{?fedora} || 0%{?mageia}
 BuildRequires:  fdupes
 %endif
 BuildRequires:  cmake
@@ -51,7 +59,7 @@ BuildRequires:  zlib-devel
 
 %if %{with perl_binding}
 BuildRequires:  perl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 BuildRequires:  perl-devel
 %endif
 BuildRequires:  swig
@@ -72,6 +80,22 @@ BuildRequires:  swig
 BuildRequires:  python3-devel
 %endif
 
+%if %{with bz2}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?mageia}
+BuildRequires:  bzip2-devel
+%endif
+
+%if 0%{?suse_version}
+BuildRequires:  libbz2-devel
+%endif
+
+%endif
+
+%if %{with xz}
+BuildRequires:  xz-devel
+%endif
+
+
 Summary:        A new approach to package dependency solving
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
@@ -115,7 +139,7 @@ A new approach to package dependency solving.
 Summary:        Applications demoing the libsolv library
 Group:          System/Management
 Requires:       curl
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
+%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
 Requires:       gnupg2
 %endif
 %if 0%{?suse_version}
@@ -166,8 +190,11 @@ export CFLAGS="$RPM_OPT_FLAGS"
 export CXXFLAGS="$CFLAGS"
 
 CMAKE_FLAGS=
-%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
-CMAKE_FLAGS="-DFEDORA=1"
+%if 0%{?fedora} || 0%{?rhel} >= 6
+CMAKE_FLAGS="-DFEDORA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
+%endif
+%if 0%{?mageia}
+CMAKE_FLAGS="-DMAGEIA=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
 %endif
 %if 0%{?suse_version}
 CMAKE_FLAGS="-DSUSE=1 -DENABLE_APPDATA=1 -DENABLE_COMPS=1"
@@ -185,10 +212,13 @@ cmake     $CMAKE_FLAGS \
        %{?with_python_binding:-DENABLE_PYTHON=1} \
        %{?with_python3_binding:-DENABLE_PYTHON3=1} \
        %{?with_ruby_binding:-DENABLE_RUBY=1} \
+       %{?with_bz2:-DENABLE_BZIP2_COMPRESSION=1} \
+       %{?with_xz:-DENABLE_LZMA_COMPRESSION=1} \
+       %{?with_richdeps:-DENABLE_COMPLEX_DEPS=1} \
        %{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \
        -DUSE_VENDORDIRS=1 \
        -DCMAKE_SKIP_RPATH=1
-make %{?jobs:-j %jobs}
+make %{?_smp_mflags}
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install