%define major 0 %define libname %mklibname %name %major %define libname_devel %mklibname -d %name Name: createrepo_c Summary: Creates a common metadata repository Group: System/Packaging Version: 0.9.1 Release: %mkrel 2 License: GPLv2 URL: https://github.com/rpm-software-management/createrepo_c Source0: https://github.com/rpm-software-management/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: bzip2-devel BuildRequires: cmake BuildRequires: doxygen BuildRequires: expat-devel BuildRequires: file-devel BuildRequires: glib2-devel >= 2.22.0 BuildRequires: libcurl-devel BuildRequires: libxml2-devel BuildRequires: openssl-devel BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-sphinx BuildRequires: rpm-devel >= 4.9.0 BuildRequires: sqlite3-devel BuildRequires: lzma-devel BuildRequires: zlib-devel BuildRequires: bash-completion BuildRequires: drpm-devel >= 0.1.3 Requires: %{libname} = %{version}-%{release} # prevent provides from nonstandard paths: %define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so %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 -n %{libname} Summary: Library for repodata manipulation Group: System/Libraries # The function to create DeltaRPMs calls /usr/bin/makedeltarpm, # which is part of the 'deltarpm' package Requires: deltarpm %description -n %{libname} Libraries for applications using the createrepo_c library for easy manipulation with a repodata. %package -n %{libname_devel} Summary: Library for repodata manipulation Group: Development/C Provides: %{name}-devel = %{version}-%{release} Requires: pkgconfig Requires: %{libname} = %{version}-%{release} %description -n %{libname_devel} This package contains the createrepo_c C library and header files. These development files are for easy manipulation with a repodata. %package -n python2-%{name} Summary: Python 2 bindings for the createrepo_c library Group: Development/Python Provides: python-%{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description -n python2-createrepo_c Python bindings for the createrepo_c library. %prep %setup -q %build %cmake %make_build make doc-c %check pushd ./build make tests make ARGS="-V" test popd %install pushd ./build %make_install popd %files %doc README.md %license COPYING %_mandir/man8/createrepo_c.8.* %_mandir/man8/mergerepo_c.8.* %_mandir/man8/modifyrepo_c.8.* %_mandir/man8/sqliterepo_c.8.* %{_datadir}/bash-completion/completions/ %{_bindir}/createrepo_c %{_bindir}/mergerepo_c %{_bindir}/modifyrepo_c %{_bindir}/sqliterepo_c %files -n %{libname} %license COPYING %{_libdir}/libcreaterepo_c.so.%{major} %{_libdir}/libcreaterepo_c.so.%{major}.* %files -n %{libname_devel} %{_libdir}/libcreaterepo_c.so %{_libdir}/pkgconfig/createrepo_c.pc %{_includedir}/createrepo_c/ %license COPYING %doc build/doc/html %files -n python2-createrepo_c %{python2_sitearch}/createrepo_c/