Switch to system libdnf

Now that rpm-ostree is using libdnf master again, we can (at least for
now) drop the libdnf bundling.
This commit is contained in:
Kalev Lember 2019-04-03 17:01:13 +02:00
parent 239841f3cb
commit 7a82a2d0de
3 changed files with 6 additions and 48 deletions

1
.gitignore vendored
View File

@ -98,6 +98,5 @@
/gnome-software-3.31.1.tar.xz
/gnome-software-3.31.2.tar.xz
/gnome-software-3.31.90.tar.xz
/libdnf-7ecb2f5.tar.gz
/gnome-software-3.31.92.tar.xz
/gnome-software-3.32.0.tar.xz

View File

@ -9,18 +9,11 @@
%global fwupd_version 1.0.7
%global flatpak_version 1.1.3
%global bundled_libdnf 1
%if 0%{?bundled_libdnf}
%global commit1 7ecb2f5ddc93ae6f819b95ef7940b1d4dd66eb4d
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
%global __requires_exclude ^libdnf[.]so[.].*$
%endif
Name: gnome-software
Version: 3.32.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: A software center for GNOME
License: GPLv2+
@ -32,13 +25,6 @@ Patch0: 0001-app-row-Add-shadow-to-app-icons.patch
Patch1: 0001-Add-drop-shadows-to-icons-in-app-tiles-as-well.patch
Patch2: 0001-folders-Add-nm-connection-editor.desktop-to-Utilitie.patch
%if 0%{?bundled_libdnf}
# libdnf is bundled to be able to match the exact same version that the
# rpm-ostree package bundles. This is only used for the rpm-ostree backend.
Source1: https://github.com/projectatomic/libdnf/archive/%{commit1}/libdnf-%{shortcommit1}.tar.gz
Provides: bundled(libdnf) = 0.12.1
%endif
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: libxslt
@ -54,6 +40,7 @@ BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: gtk-doc
BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: libappstream-glib-devel >= %{appstream_glib_version}
BuildRequires: libdnf-devel
BuildRequires: libsoup-devel
BuildRequires: libxmlb-devel
BuildRequires: meson
@ -62,6 +49,7 @@ BuildRequires: polkit-devel
BuildRequires: libsecret-devel
BuildRequires: flatpak-devel >= %{flatpak_version}
BuildRequires: ostree-devel
BuildRequires: rpm-devel
BuildRequires: rpm-ostree-devel
BuildRequires: libgudev1-devel
BuildRequires: valgrind-devel
@ -69,14 +57,6 @@ BuildRequires: liboauth-devel
%if 0%{?fedora}
BuildRequires: snapd-glib-devel >= 1.42
%endif
%if 0%{?bundled_libdnf}
BuildRequires: check-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: librepo-devel
BuildRequires: libsolv-devel
BuildRequires: rpm-devel
%endif
Requires: appstream-data
%if 0%{?fedora}
@ -148,30 +128,7 @@ Adds support for Snap packages from the Snap store.
%prep
%autosetup -p1
%if 0%{?bundled_libdnf}
# Extract libdnf archive
tar -xf %{S:1}
%endif
%build
%if 0%{?bundled_libdnf}
mkdir -p libdnf-%{commit1}/build
pushd libdnf-%{commit1}/build
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_SWDB:BOOL=0 \
-DWITH_BINDINGS:BOOL=0 \
-DWITH_HTML:BOOL=0 \
-DWITH_MAN:BOOL=0 \
..
%make_build
sed -i -e "/^Libs:/ s|\${libdir}|`pwd`/libdnf|" \
-e "/^Cflags:/ s|\${includedir}|`pwd`/..|" \
libdnf/libdnf.pc
export PKG_CONFIG_PATH="`pwd`/libdnf"
popd
%endif
%meson \
%if 0%{?fedora}
-Dsnap=true \
@ -291,6 +248,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_mandir}/man1/gnome-software-editor.1*
%changelog
* Wed Apr 03 2019 Kalev Lember <klember@redhat.com> - 3.32.0-5
- Switch to system libdnf
* Fri Mar 29 2019 Kalev Lember <klember@redhat.com> - 3.32.0-4
- Rebuild for new rpm-ostree

View File

@ -1,2 +1 @@
SHA512 (gnome-software-3.32.0.tar.xz) = 6f924cd9fcad75b16a1bb779598aff16b90c05dcc976bf5449226162a17431d590a1496e85e119987c5454b636312eaf673c6430370a6f96006219b378057c5f
SHA512 (libdnf-7ecb2f5.tar.gz) = cf062cb62747fcf428268518f62fa6041ea22cd529397a11fa706790c81638fd155dc8326e6fa70b48873a3d169a7b4dd0ebd10de1227f482553902824fc8573