]> git.pld-linux.org Git - packages/createrepo_c.git/blobdiff - createrepo_c.spec
- release 7 (by relup.sh)
[packages/createrepo_c.git] / createrepo_c.spec
index 7eb5fd1f0018850debeb5d3c9d6aa4ab4a291174..3a1a104dcacdc0ff886e91bcf017bf913aa4f664 100644 (file)
@@ -1,14 +1,16 @@
-# TODO: tests fail (rpm.org vs rpm5 compat problems?)
+# TODO:
+# - drpm support?
 #
 # Conditional build:
 %bcond_without python3 # CPython 3.x module
-%bcond_with    tests   # make tests
+%bcond_with    rpm5    # build with rpm5, tests may fail (rpm.org vs rpm5 compat problems?)
+%bcond_without tests   # make tests
 
 Summary:       Creates a common metadata repository
 Summary(pl.UTF-8):     Tworzenie wspólnego repozytorium metadanych
 Name:          createrepo_c
 Version:       0.10.0
-Release:       1
+Release:       7
 License:       GPL v2+
 Group:         Applications/System
 #Source0Download: https://github.com/rpm-software-management/createrepo_c/releases
@@ -17,12 +19,14 @@ Source0:    https://github.com/rpm-software-management/createrepo_c/archive/%{versi
 Patch0:                %{name}-rpm5.patch
 Patch1:                %{name}-python.patch
 Patch2:                %{name}-include.patch
+Patch3:                %{name}-bashcompdir.patch
 URL:           https://github.com/rpm-software-management/createrepo_c
 BuildRequires: bzip2-devel
 BuildRequires: check-devel
 BuildRequires: cmake >= 2.6
 BuildRequires: curl-devel
 BuildRequires: doxygen
+#BuildRequires:        drpm-devel
 BuildRequires: expat-devel
 BuildRequires: glib2-devel >= 1:2.22.0
 BuildRequires: libmagic-devel
@@ -34,9 +38,9 @@ BuildRequires:        python-devel >= 2
 BuildRequires: python3-devel >= 1:3.2
 %{?with_tests:BuildRequires:   python3-nose}
 %endif
-BuildRequires: rpm-devel >= 5
+BuildRequires: rpm-devel
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: rpmbuild(macros) >= 1.673
 BuildRequires: sphinx-pdg-2
 BuildRequires: sqlite3-devel >= 3
 BuildRequires: xz-devel
@@ -77,7 +81,7 @@ Requires:     expat-devel
 Requires:      glib2-devel >= 1:2.22.0
 Requires:      libmagic-devel
 Requires:      libxml2-devel >= 2
-Requires:      rpm-devel >= 5
+Requires:      rpm-devel
 Requires:      sqlite3-devel >= 3
 Requires:      xz-devel
 Requires:      zlib-devel
@@ -130,7 +134,7 @@ 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 >= 2.0
 
 %description -n bash-completion-createrepo_c
 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
@@ -142,15 +146,18 @@ mergerepo_c, modifyrepo_c).
 
 %prep
 %setup -q
-%patch0 -p1
+%{?with_rpm5:%patch0 -p1}
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 install -d build %{?with_python3:build-py3}
 
 cd build
-%cmake ..
+CFLAGS="%{rpmcflags} -D_GNU_SOURCE=1"
+%cmake .. \
+       -DBASHCOMP_DIR=%{bash_compdir}
 
 %{__make}
 %{__make} doc
@@ -165,6 +172,7 @@ cd ..
 %if %{with python3}
 cd build-py3
 %cmake .. \
+       -DBASHCOMP_DIR=%{bash_compdir} \
        -DPYTHON_DESIRED=3
 
 %{__make}
@@ -244,4 +252,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %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.056582 seconds and 4 git commands to generate.