Name:           createrepo_c
Version:        0.10.1
Release:        1
License:        LGPL-2.1
Summary:        C language implemention of createrepo
Group:          System/Base
Source:         %{name}-%{version}.tar.gz
Source1001:     createrepo_c.manifest
BuildRequires:  libbz2-devel cmake libexpat-devel file-devel
BuildRequires:  libcurl-devel libxml2-devel python-devel gcc-c++
BuildRequires:  rpm-devel openssl-devel sqlite-devel doxygen
BuildRequires:  glib2-devel xz-devel

%description
C language implemention of createrepo

%package devel
Summary:        Devel package of createrepo_c
Requires:       createrepo_c = %{version}
Requires:       createrepo

%description devel
Devel package C language implemention of createrepo


%prep
%setup -q
cp %{SOURCE1001} .

%build
cmake -DCMAKE_SKIP_RPATH=ON \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DENABLE_LEGACY_WEAKDEPS=ON

%{__make} %{?jobs:-j%jobs}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%install
make DESTDIR=%{buildroot} sysconfdir=%{_sysconfdir} install

%files
%defattr(-, root, root,-)
%{_sysconfdir}/bash_completion.d/
%{_bindir}/createrepo_c
%{_bindir}/modifyrepo_c
%{_bindir}/sqliterepo_c
%{_bindir}/mergerepo_c
%{_libdir}/libcreaterepo_c.so.*
%{_mandir}/*/*

%files devel
%defattr(-, root, root,-)
%{_libdir}/libcreaterepo_c.so
%{_libdir}/pkgconfig/createrepo_c.pc
%{_includedir}/createrepo_c
%{python_sitearch}/createrepo_c


%changelog
