#Notice:This spec file is from upstream community: #https://raw.githubusercontent.com/rpm-software-management/createrepo_c/2077ba104eae04bb819e9e0c906c8c835b62e7a6/createrepo_c.spec %global libmodulemd_version 2.3.0 %bcond_without python3 %bcond_without drpm %bcond_with zchunk %bcond_with libmodulemd Summary: Creates a common metadata repository Name: createrepo_c Version: 1.2.1 Release: 1 License: GPL-2.0-or-later URL: https://github.com/rpm-software-management/createrepo_c Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: createrepo_c-1.1.4-port-to-newer-cmake.patch BuildRequires: cmake >= 3.12 BuildRequires: pkgconfig(bash-completion) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(sqlite3) >= 3.6.18 BuildRequires: bzip2-devel BuildRequires: libcurl-devel BuildRequires: libxml2-devel BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: doxygen %if %{with zchunk} BuildRequires: pkgconfig(zck) >= 0.9.11 BuildRequires: zchunk %endif %if %{with libmodulemd} BuildRequires: pkgconfig(modulemd-2.0) >= %{libmodulemd_version} BuildRequires: libmodulemd Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} %endif %if %{with drpm} BuildRequires: pkgconfig(drpm) >= 0.4.0 %endif Requires: rpm >= 4.9.0 Obsoletes: createrepo < 0.11.0 Provides: createrepo = %{version}-%{release} Provides: %{name}-libs = %{version}-%{release} %{name}-libs%{?_isa} = %{version}-%{release} Obsoletes: %{name}-libs < %{version}-%{release} %description C implementation of Createrepo. A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c) for generating a common metadata repository from a directory of rpm packages and maintaining it. %package devel Summary: Library for repodata manipulation Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: bzip2-devel pkgconfig(lzma) %description devel This package contains the createrepo_c C library and header files. These development files are for easy manipulation with a repodata. %package_help %if %{with python3} %package -n python3-%{name} Summary: Python 3 bindings for the createrepo_c library %{?python_provide:%python_provide python3-%{name}} BuildRequires: python3-devel BuildRequires: python3-sphinx Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n python3-%{name} Python 3 bindings for the createrepo_c library. %endif %prep %autosetup -p1 %build # Build createrepo_c with Pyhon 3 %cmake \ %{!?with_zchunk:-DWITH_ZCHUNK=OFF} \ %{!?with_libmodulemd:-DWITH_LIBMODULEMD=OFF} \ -DENABLE_DRPM=%{?with_drpm:ON}%{!?with_drpm:OFF} \ -DENABLE_PYTHON=%{?with_python3:ON}%{!?with_python3:OFF} %cmake_build # Build C documentation %cmake_build --target doc-c %check # Run Python 3 tests %if %{with python3} # Run Python 3 tests %ctest %endif %install # Install createrepo_c with Python 3 %cmake_install ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo ln -sr %{buildroot}%{_bindir}/mergerepo_c %{buildroot}%{_bindir}/mergerepo ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %files %doc README.md %license COPYING AUTHORS %{_bindir}/createrepo_c %{_bindir}/mergerepo_c %{_bindir}/modifyrepo_c %{_bindir}/sqliterepo_c %{_libdir}/lib%{name}.so.* %{bash_completions_dir}/* %{_bindir}/createrepo %{_bindir}/mergerepo %{_bindir}/modifyrepo %files devel %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}/ %files help %doc %{__cmake_builddir}/doc/html %{_mandir}/man8/createrepo_c.8* %{_mandir}/man8/mergerepo_c.8* %{_mandir}/man8/modifyrepo_c.8* %{_mandir}/man8/sqliterepo_c.8* %if %{with python3} %files -n python3-%{name} %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %endif %changelog * Mon Mar 17 2025 Funda Wang - 1.2.1-1 - update to 1.2.1 * Sun Mar 02 2025 Funda Wang - 1.1.4-4 - try build with cmake 4.0 * Thu Nov 21 2024 Funda Wang - 1.1.4-3 - adopt to new cmake macro * Fri Nov 08 2024 Funda Wang - 1.1.4-2 - adopt to new cmake macro * Mon Aug 19 2024 yangxiaodong - 1.1.4-1 - Type:update - CVE:NA - SUG:NA - DESC:update version to 1.1.4 * Mon Jul 15 2024 dillon chen - 1.1.3-1 - update version to 1.1.3 * Thu Feb 1 2024 caixiaomeng - 1.0.1-1 - update version to 1.0.1 * Thu Jan 19 2023 Lv Ying - 0.20.1-1 - update version to 0.20.1 * Sat Oct 22 2022 yanglongkang - 0.17.6-2 - add the dynamic library file in the rpm package to the ldconfig management fix rpmbuild warning * Wed Dec 29 2021 yangzhuangzhuang - 0.17.6-1 - update version to 0.17.6 * Thu Jan 21 2021 yangzhuangzhuang - 0.16.2-1 - update 0.16.2 * Sat Jul 25 2020 Liquor - 0.16.0-2 - remove python2 * Sat Jul 25 2020 Liquor - 0.16.0-1 - update 0.16.0 * Wed Apr 8 2020 openEuler Buildteam - 0.15.0-5 - Type:bugfix - ID:NA - SUG:NA - DESC:Add judgement of openEuler * Sat Mar 14 2020 openEuler Buildteam - 0.15.0-4 - Add build requires of gdb * Mon Oct 21 2019 openEuler Buildteam - 0.15.0-3 - Package rebuild. * Wed Oct 09 2019 openEuler Buildteam - 0.15.0-2 - Add notice; Split and merge package with openeuler`s rules. * Sat Sep 21 2019 openEuler Buildteam - 0.15.0-1 - Package init.