%if 0%{?rhel} && 0%{?rhel} <= 7
%global buildsys cmake
%global buildsys_req cmake >= 2.8.5
%else
%global buildsys meson
%global buildsys_req meson >= 0.36.0
%endif
Name: microdnf
Version: 2
Release: 6%{?dist}
Summary: The microdnf package contains a limited functionality package manager written in C
License: GPLv3+
URL: https://github.com/rpm-software-management/microdnf
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0001: 0001-print-downloading-packages-only-once.patch
Patch0002: 0002-do-not-fail-on-empty-transactions.patch
Patch0003: 35.patch
BuildRequires: gcc
BuildRequires: %{buildsys_req}
BuildRequires: pkgconfig(glib-2.0) >= 2.44.0
BuildRequires: pkgconfig(gobject-2.0) >= 2.44.0
BuildRequires: pkgconfig(libpeas-1.0) >= 1.20.0
BuildRequires: pkgconfig(libdnf) >= 0.22.0
%description
%{summary}. Supports basic commands like install, update and remove.
%prep
%autosetup -p1
%if %{buildsys} == "cmake"
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
popd
%make_build -C %{_target_platform}
%install
%make_install -C %{_target_platform}
%endif
%if %{buildsys} == "meson"
%build
%meson
%meson_build
%install
%meson_install
%endif
%files
%license COPYING
%doc README.md
%{_bindir}/%{name}
%changelog
* Thu Feb 28 2019 Daniel Mach <dmach@redhat.com> - 2-6
- Rebuild against libdnf >= 0.22.0 with bumped soname
- Stop calling dnf_context_set_yumdb_enabled() - it was dropped from libdnf
* Fri May 18 2018 Daniel Mach <dmach@redhat.com> - 2-5
- Rebuild on additional architectures
* Thu Mar 23 2017 Igor Gnatenko <ignatenko@redhat.com> - 2-4
- Unbundle libpeas
* Mon Mar 6 2017 Jan Silhan <jsilhan@redhat.com> - 2-3
- do not fail on empty transactions + extended summary
* Mon Feb 20 2017 Jan Silhan <jsilhan@redhat.com> - 2-2
- print downloading packages only once
* Mon Dec 12 2016 Jan Silhan <jsilhan@redhat.com> - 2-1
- Update to 2
* Mon Dec 12 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1-1
- Initial package