]> git.pld-linux.org Git - packages/createrepo_c.git/blobdiff - createrepo_c.spec
up to 1.1.0
[packages/createrepo_c.git] / createrepo_c.spec
index 7db0f3033262f20138824b1fbb4c0be1db6c5e29..989a71ecc45f201192c54ea58ab67f408f0bdd52 100644 (file)
@@ -1,41 +1,49 @@
-# TODO: tests fail (rpm.org vs rpm5 compat problems?)
+# TODO:
+# - drpm support?
 #
 # Conditional build:
+%bcond_with    rpm5    # build with rpm5, tests may fail (rpm.org vs rpm5 compat problems?)
 %bcond_without tests   # make tests
 
-%define                gitrev  7ef96a6
 Summary:       Creates a common metadata repository
 Summary(pl.UTF-8):     Tworzenie wspólnego repozytorium metadanych
 Name:          createrepo_c
-Version:       0.4.0
+Version:       1.1.0
 Release:       1
 License:       GPL v2+
 Group:         Applications/System
-# git clone https://github.com/Tojaj/createrepo_c
-Source0:       http://pkgs.fedoraproject.org/repo/pkgs/createrepo_c/%{name}-%{gitrev}.tar.xz/606d117677ab85e5a9ec15896db644c2/createrepo_c-%{gitrev}.tar.xz
-# Source0-md5: 606d117677ab85e5a9ec15896db644c2
+#Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
+Source0:       https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: c79963bca76c1ddbd954d96e858f550d
 Patch0:                %{name}-rpm5.patch
-URL:           https://github.com/Tojaj/createrepo_c
+URL:           https://github.com/rpm-software-management/createrepo_c
+BuildRequires: bash-completion-devel >= 1:2.0
 BuildRequires: bzip2-devel
-BuildRequires: check-devel
-BuildRequires: cmake >= 2.6
+BuildRequires: cmake >= 2.8.12
 BuildRequires: curl-devel
 BuildRequires: doxygen
-BuildRequires: expat-devel
+#BuildRequires:        drpm-devel
 BuildRequires: glib2-devel >= 1:2.22.0
-BuildRequires: libmagic-devel
+BuildRequires: libmodulemd-devel
 BuildRequires: libxml2-devel >= 2
 BuildRequires: openssl-devel
-BuildRequires: python-devel >= 2
+BuildRequires: pkgconfig
 %{?with_tests:BuildRequires:   python-nose}
-BuildRequires: rpm-devel >= 5
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules
+%{?with_tests:BuildRequires:   python3-nose}
+BuildRequires: python3-setuptools
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpm-devel
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
-BuildRequires: sqlite3-devel >= 3
-BuildRequires: tar >= 1:1.22
-BuildRequires: xz
+BuildRequires: rpmbuild(macros) >= 1.673
+BuildRequires: sphinx-pdg
+BuildRequires: sqlite3-devel >= 3.6.18
 BuildRequires: xz-devel
+BuildRequires: zchunk-devel
 BuildRequires: zlib-devel
+BuildRequires: zstd-devel
+%{?with_tests:BuildRequires:   zchunk}
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,6 +60,7 @@ Summary:      Library for repodata manipulation
 Summary(pl.UTF-8):     Biblioteka do operacji na danych repozytorium
 Group:         Libraries
 Requires:      glib2 >= 1:2.22.0
+Requires:      sqlite3-libs >= 3.6.18
 
 %description libs
 This package contains the createrepo_c library for applications to
@@ -70,12 +79,12 @@ Requires:   bzip2-devel
 Requires:      curl-devel
 Requires:      expat-devel
 Requires:      glib2-devel >= 1:2.22.0
-Requires:      libmagic-devel
 Requires:      libxml2-devel >= 2
-Requires:      rpm-devel >= 5
-Requires:      sqlite3-devel >= 3
+Requires:      rpm-devel
+Requires:      sqlite3-devel >= 3.6.18
 Requires:      xz-devel
 Requires:      zlib-devel
+Requires:      zstd-devel
 
 %description devel
 This package contains the createrepo_c C header files. These
@@ -89,6 +98,7 @@ celu łatwe operowanie na danych repozytorium (repodata).
 Summary:       API documentation for createrepo_c library
 Summary(pl.UTF-8):     Dokumentacja API biblioteki createrepo_c
 Group:         Documentation
+BuildArch:     noarch
 
 %description apidocs
 API documentation for createrepo_c library.
@@ -96,24 +106,26 @@ API documentation for createrepo_c library.
 %description apidocs -l pl.UTF-8
 Dokumentacja API biblioteki createrepo_c.
 
-%package -n python-createrepo_c
-Summary:       Python bindings for the createrepo_c library
-Summary(pl.UTF-8):     Wiązania Pythona do biblioteki createrepo_c
+%package -n python3-createrepo_c
+Summary:       Python bindings for the createrepo_c library
+Summary(pl.UTF-8):     Wiązania Pythona do biblioteki createrepo_c
 Group:         Development/Languages/Python
 Requires:      %{name}-libs = %{version}-%{release}
+Obsoletes:     python-createrepo_c < 0.17.6
 
-%description -n python-createrepo_c
-Python bindings for the createrepo_c library.
+%description -n python3-createrepo_c
+Python bindings for the createrepo_c library.
 
-%description -n python-createrepo_c -l pl.UTF-8
-Wiązania Pythona do biblioteki createrepo_c.
+%description -n python3-createrepo_c -l pl.UTF-8
+Wiązania Pythona do biblioteki createrepo_c.
 
 %package -n bash-completion-createrepo_c
 Summary:       Bash completion for createrepo_c commands
 Summary(pl.UTF-8):     Bashowe uzupełnianie dla poleceń createrepo_c
 Group:         Applications/Shells
 Requires:      %{name} = %{version}-%{release}
-Requires:      bash-completion
+Requires:      bash-completion >= 1:2.0
+BuildArch:     noarch
 
 %description -n bash-completion-createrepo_c
 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
@@ -124,11 +136,16 @@ Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
 mergerepo_c, modifyrepo_c).
 
 %prep
-%setup -q -n %{name}
-%patch0 -p1
+%setup -q
+%{?with_rpm5:%patch0 -p1}
 
 %build
-%cmake .
+install -d build
+cd build
+%cmake .. \
+       -DBASHCOMP_DIR=%{bash_compdir} \
+       -DPYTHON_DESIRED=3
+
 %{__make}
 %{__make} doc
 
@@ -141,12 +158,11 @@ mergerepo_c, modifyrepo_c).
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
-%py_postclean
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -159,15 +175,17 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/createrepo_c
 %attr(755,root,root) %{_bindir}/mergerepo_c
 %attr(755,root,root) %{_bindir}/modifyrepo_c
+%attr(755,root,root) %{_bindir}/sqliterepo_c
 %{_mandir}/man8/createrepo_c.8*
 %{_mandir}/man8/mergerepo_c.8*
 %{_mandir}/man8/modifyrepo_c.8*
+%{_mandir}/man8/sqliterepo_c.8*
 
 %files libs
 %defattr(644,root,root,755)
 %doc AUTHORS README.md
 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0
+%attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.1
 
 %files devel
 %defattr(644,root,root,755)
@@ -177,14 +195,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %files apidocs
 %defattr(644,root,root,755)
-%doc doc/html
+%doc build/doc/html
 
-%files -n python-createrepo_c
+%files -n python3-createrepo_c
 %defattr(644,root,root,755)
-%dir %{py_sitedir}/createrepo_c
-%attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_cmodule.so
-%{py_sitedir}/createrepo_c/__init__.py[co]
+%dir %{py3_sitedir}/createrepo_c
+%attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so
+%{py3_sitedir}/createrepo_c/__init__.py
+%{py3_sitedir}/createrepo_c/__pycache__
+%{py3_sitedir}/createrepo_c-%{version}-py*.egg-info
 
 %files -n bash-completion-createrepo_c
 %defattr(644,root,root,755)
-/etc/bash_completion.d/createrepo_c.bash
+%{bash_compdir}/createrepo_c
+%{bash_compdir}/mergerepo_c
+%{bash_compdir}/modifyrepo_c
+%{bash_compdir}/sqliterepo_c
This page took 0.098671 seconds and 4 git commands to generate.