#global prerel beta %global basever 3.3.1 %global baserelease 2 %bcond_with check Name: tdnf Version: %{basever}%{?prerel:~%{prerel}} Release: 0%{?dist}.%{baserelease} Summary: Tiny package manager similar to Yum #SourceLicense: LGPLv2 and GPLv2 License: GPLv2 URL: https://github.com/vmware/tdnf Source0: %{url}/archive/v%{basever}%{?prerel:-%{prerel}}/%{name}-%{basever}%{?prerel:-%{prerel}}.tar.gz # From: https://github.com/vmware/tdnf/pull/331 Patch0: tdnf-python-Fix-linking-to-built-libs.patch # From: https://github.com/vmware/tdnf/pull/332 Patch1: tdnf-Correctly-mark-internal-libs-as-static-libs.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: make BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(libsolv) BuildRequires: pkgconfig(libsolvext) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libmetalink) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(gpgme) BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: systemd-rpm-macros # Test dependencies %if %{with check} BuildRequires: createrepo_c BuildRequires: /usr/bin/pytest BuildRequires: python3dist(requests) BuildRequires: python3dist(pyopenssl) %endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description TDNF (Tiny Dandified YUM) is a tiny package manager written in C, inspired by YUM (Yellowdog Updater, Modified). %package libs Summary: Backend libraries for TDNF License: LGPLv2 %description libs This package provides the libraries that implement the core functionality of TDNF. %package devel Summary: Development files for %{name} License: LGPLv2 Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel This package provides headers and libraries for developing applications to use %{name}. %package plugin-repogpgcheck Summary: TDNF plugin to support gpg verification for repository metadata License: GPLv2 Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description plugin-repogpgcheck TDNF plugin to support gpg verification for repository metadata. %package -n python3-%{name} Summary: Python 3 bindings for TDNF libraries License: GPLv2 Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n python3-%{name} This package provides Python 3 bindings to the TDNF libraries. %package automatic Summary: Automatic updates done via TDNF License: GPLv2 BuildArch: noarch Requires: %{name} = %{version}-%{release} %{?systemd_requires} %description automatic This package provides a wrapper script with systemd units for TDNF to automatically apply updates on a schedule. %prep %autosetup -n %{name}-%{basever}%{?prerel:-%{prerel}} -p1 %build %cmake -DSYSTEMD_DIR=%{_unitdir} %cmake_build %cmake_build --target python pushd %{_vpath_builddir}/python %py3_build popd %install %cmake_install pushd %{_vpath_builddir}/python %py3_install popd rm -rf %{buildroot}/etc/motdgen.d mkdir -p %{buildroot}/var/cache/tdnf %if %{with check} %check %cmake_build --target check %endif %files %license COPYING %{_bindir}/tdnf %{_bindir}/tdnf-cache-updateinfo %dir %{_sysconfdir}/tdnf %config(noreplace) %{_sysconfdir}/tdnf/tdnf.conf %dir %{_var}/cache/tdnf %{_datadir}/bash-completion/completions/tdnf %{_unitdir}/%{name}-cache-updateinfo.service %{_unitdir}/%{name}-cache-updateinfo.timer %files libs %license COPYING %{_libdir}/*.so.* %dir %{_libdir}/tdnf-plugins %dir %{_sysconfdir}/tdnf/pluginconf.d %files devel %{_includedir}/tdnf/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %files plugin-repogpgcheck %config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfrepogpgcheck.conf %{_libdir}/tdnf-plugins/libtdnfrepogpgcheck.so %files -n python3-%{name} %{python3_sitearch}/tdnf/ %{python3_sitearch}/tdnf-* %files automatic %{_bindir}/%{name}-automatic %config(noreplace) %{_sysconfdir}/%{name}/automatic.conf %{_unitdir}/%{name}-automatic.timer %{_unitdir}/%{name}-automatic.service %{_unitdir}/%{name}-automatic-install.timer %{_unitdir}/%{name}-automatic-install.service %{_unitdir}/%{name}-automatic-notifyonly.timer %{_unitdir}/%{name}-automatic-notifyonly.service %post %systemd_post %{name}-cache-updateinfo.timer %preun %systemd_preun %{name}-cache-updateinfo.timer %postun %systemd_postun_with_restart %{name}-cache-updateinfo.timer %post automatic %systemd_post %{name}-automatic.timer %systemd_post %{name}-automatic-notifyonly.timer %systemd_post %{name}-automatic-install.timer %preun automatic %systemd_preun %{name}-automatic.timer %systemd_preun %{name}-automatic-notifyonly.timer %systemd_preun %{name}-automatic-install.timer %postun automatic %systemd_postun_with_restart %{name}-automatic.timer %systemd_postun_with_restart %{name}-automatic-notifyonly.timer %systemd_postun_with_restart %{name}-automatic-install.timer %changelog * Sun Jul 10 2022 Neal Gompa - 3.3.1-0.2 - Add patch to fix linking internal libraries * Thu Jul 07 2022 Neal Gompa - 3.3.1-0.1 - Rebase to 3.3.1 * Tue Mar 02 2021 Neal Gompa - 3.0.0-0.1 - Update to 3.0.0 * Sat Aug 31 2019 Neal Gompa - 2.0.0~beta-0.2 - Add patches from VMware Photon (vmware/photon@a49e890/SPECS/tdnf) * Sun Mar 31 2019 Neal Gompa - 2.0.0~beta-0.1 - Update to 2.0.0-beta * Sat Apr 07 2018 Neal Gompa - 2.0.0~alpha.1-0.1 - Initial packaging based on tdnf package used for Fedora RISC-V bootstrap