[packages/createrepo_c] - up to 0.17.6

baggins baggins at pld-linux.org
Thu Sep 30 00:11:27 CEST 2021


commit 317621c24767398af6b7bab60c5497fe434a9715
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Sep 30 00:11:08 2021 +0200

    - up to 0.17.6

 createrepo_c-bashcompdir.patch | 34 -------------------
 createrepo_c-include.patch     | 11 -------
 createrepo_c-python.patch      | 35 --------------------
 createrepo_c.spec              | 74 ++++++------------------------------------
 4 files changed, 10 insertions(+), 144 deletions(-)
---
diff --git a/createrepo_c.spec b/createrepo_c.spec
index 3a1a104..a9c9ac6 100644
--- a/createrepo_c.spec
+++ b/createrepo_c.spec
@@ -2,24 +2,20 @@
 # - drpm support?
 #
 # Conditional build:
-%bcond_without	python3	# CPython 3.x module
 %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:	7
+Version:	0.17.6
+Release:	1
 License:	GPL v2+
 Group:		Applications/System
 #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:	2e14b3e5d289875b894000ab1e54f1ec
+# Source0-md5:	7d9eda50ab16f4e004d7b6a608179346
 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
@@ -29,15 +25,12 @@ BuildRequires:	doxygen
 #BuildRequires:	drpm-devel
 BuildRequires:	expat-devel
 BuildRequires:	glib2-devel >= 1:2.22.0
-BuildRequires:	libmagic-devel
+BuildRequires:	libmagic-devel >= 5.40-2
 BuildRequires:	libxml2-devel >= 2
 BuildRequires:	openssl-devel
-BuildRequires:	python-devel >= 2
 %{?with_tests:BuildRequires:	python-nose}
-%if %{with python3}
 BuildRequires:	python3-devel >= 1:3.2
 %{?with_tests:BuildRequires:	python3-nose}
-%endif
 BuildRequires:	rpm-devel
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.673
@@ -45,6 +38,7 @@ BuildRequires:	sphinx-pdg-2
 BuildRequires:	sqlite3-devel >= 3
 BuildRequires:	xz-devel
 BuildRequires:	zlib-devel
+%{?with_tests:BuildRequires:	zchunk}
 Requires:	%{name}-libs = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -105,23 +99,12 @@ API documentation for createrepo_c library.
 %description apidocs -l pl.UTF-8
 Dokumentacja API biblioteki createrepo_c.
 
-%package -n python-createrepo_c
-Summary:	Python 2 bindings for the createrepo_c library
-Summary(pl.UTF-8):	Wiązania Pythona 2 do biblioteki createrepo_c
-Group:		Development/Languages/Python
-Requires:	%{name}-libs = %{version}-%{release}
-
-%description -n python-createrepo_c
-Python 2 bindings for the createrepo_c library.
-
-%description -n python-createrepo_c -l pl.UTF-8
-Wiązania Pythona 2 do biblioteki createrepo_c.
-
 %package -n python3-createrepo_c
 Summary:	Python 3 bindings for the createrepo_c library
 Summary(pl.UTF-8):	Wiązania Pythona 3 do biblioteki createrepo_c
 Group:		Development/Languages/Python
 Requires:	%{name}-libs = %{version}-%{release}
+Obsoletes:	python-createrepo_c < 0.17.6
 
 %description -n python3-createrepo_c
 Python 3 bindings for the createrepo_c library.
@@ -147,60 +130,30 @@ mergerepo_c, modifyrepo_c).
 %prep
 %setup -q
 %{?with_rpm5:%patch0 -p1}
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
 %build
-install -d build %{?with_python3:build-py3}
-
+install -d build
 cd build
-CFLAGS="%{rpmcflags} -D_GNU_SOURCE=1"
-%cmake .. \
-	-DBASHCOMP_DIR=%{bash_compdir}
-
-%{__make}
-%{__make} doc
-
-%if %{with tests}
-%{__make} tests
-%{__make} test \
-	ARGS="-V"
-%endif
-cd ..
-
-%if %{with python3}
-cd build-py3
 %cmake .. \
 	-DBASHCOMP_DIR=%{bash_compdir} \
 	-DPYTHON_DESIRED=3
 
 %{__make}
+%{__make} doc
 
 %if %{with tests}
 %{__make} tests
 %{__make} test \
 	ARGS="-V"
 %endif
-cd ..
-%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python3}
-%{__make} -C build-py3 install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c
-%endif
-
-%{__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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -235,20 +188,13 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc build/doc/html
 
-%files -n python-createrepo_c
-%defattr(644,root,root,755)
-%dir %{py_sitedir}/createrepo_c
-%attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so
-%{py_sitedir}/createrepo_c/__init__.py[co]
-
-%if %{with python3}
 %files -n python3-createrepo_c
 %defattr(644,root,root,755)
 %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__
-%endif
+%{py3_sitedir}/createrepo_c-%{version}-py*.egg-info
 
 %files -n bash-completion-createrepo_c
 %defattr(644,root,root,755)
diff --git a/createrepo_c-bashcompdir.patch b/createrepo_c-bashcompdir.patch
deleted file mode 100644
index 6c75b65..0000000
--- a/createrepo_c-bashcompdir.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- createrepo_c-0.10.0/CMakeLists.txt.orig	2018-05-11 22:44:34.072652081 +0200
-+++ createrepo_c-0.10.0/CMakeLists.txt	2018-05-12 08:30:25.683823187 +0200
-@@ -98,21 +98,25 @@
- 
- # Other files
- 
-+if (NOT BASHCOMP_DIR)
- pkg_check_modules(BASHCOMP bash-completion)
- if (BASHCOMP_FOUND)
-     execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion OUTPUT_VARIABLE BASHCOMP_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
--    message("Bash completion directory: ${BASHCOMP_DIR}")
-+ELSE (BASHCOMP_FOUND)
-+    set(BASHCOMP_DIR "/etc/bash_completion.d")
-+endif (BASHCOMP_FOUND)
-+endif (NOT BASHCOMP_DIR)
-+message("Bash completion directory: ${BASHCOMP_DIR}")
-+if (BASHCOMP_DIR STREQUAL "/etc/bash_completion.d")
-+    INSTALL(FILES createrepo_c.bash DESTINATION ${BASHCOMP_DIR})
-+else (BASHCOMP_DIR STREQUAL "/etc/bash_completion.d")
-     INSTALL(FILES createrepo_c.bash DESTINATION ${BASHCOMP_DIR} RENAME createrepo_c)
-     INSTALL(CODE "
-         execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink createrepo_c \$ENV{DESTDIR}${BASHCOMP_DIR}/mergerepo_c)
-         execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink createrepo_c \$ENV{DESTDIR}${BASHCOMP_DIR}/modifyrepo_c)
-         execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink createrepo_c \$ENV{DESTDIR}${BASHCOMP_DIR}/sqliterepo_c)
-         ")
--ELSE (BASHCOMP_FOUND)
--    INSTALL(FILES createrepo_c.bash DESTINATION "/etc/bash_completion.d")
--    message("Bash completion directory: /etc/bash_completion.d")
--endif (BASHCOMP_FOUND)
--
-+endif (BASHCOMP_DIR STREQUAL "/etc/bash_completion.d")
- 
- # Gen manpage
- 
diff --git a/createrepo_c-include.patch b/createrepo_c-include.patch
deleted file mode 100644
index ab77cf3..0000000
--- a/createrepo_c-include.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- createrepo_c-0.10.0/src/sqlite.c.orig	2018-05-11 20:59:46.259102033 +0200
-+++ createrepo_c-0.10.0/src/sqlite.c	2018-05-11 20:59:52.725768627 +0200
-@@ -27,6 +27,8 @@
- #include <string.h>
- #include <stdlib.h>
- #include <errno.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
- #include <libxml/encoding.h>
- #include "misc.h"
- #include "sqlite.h"
diff --git a/createrepo_c-python.patch b/createrepo_c-python.patch
deleted file mode 100644
index b5cf6a1..0000000
--- a/createrepo_c-python.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- createrepo_c-0.10.0/doc/python/CMakeLists.txt.orig	2018-05-11 20:05:51.125805641 +0200
-+++ createrepo_c-0.10.0/doc/python/CMakeLists.txt	2018-05-11 20:08:41.395803696 +0200
-@@ -1,5 +1,5 @@
- ADD_CUSTOM_TARGET (doc-python
--    PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build -E -b html
-+    PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build-2 -E -b html
-                   ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/html
-                   COMMENT "Building Python API documentation with Sphinx")
- 
---- createrepo_c-0.10.0/src/python/CMakeLists.txt.orig	2018-05-11 20:05:51.125805641 +0200
-+++ createrepo_c-0.10.0/src/python/CMakeLists.txt	2018-05-11 20:09:44.352469646 +0200
-@@ -5,8 +5,8 @@ if (${PYTHON_DESIRED} STREQUAL "2")
-     unset(PYTHON_LIBRARY CACHE)
-     unset(PYTHON_INCLUDE_DIR CACHE)
-     unset(PYTHON_EXECUTABLE CACHE)
--    FIND_PACKAGE(PythonLibs 2)
-     FIND_PACKAGE(PythonInterp 2 REQUIRED)
-+    FIND_PACKAGE(PythonLibs 2)
- else()
-     SET(Python_ADDITIONAL_VERSIONS 3.0)
-     unset(PYTHON_LIBRARY)
-@@ -15,11 +15,11 @@ else()
-     unset(PYTHON_LIBRARY CACHE)
-     unset(PYTHON_INCLUDE_DIR CACHE)
-     unset(PYTHON_EXECUTABLE CACHE)
--    FIND_PACKAGE(PythonLibs 3.0)
-     FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
-+    FIND_PACKAGE(PythonLibs 3.0)
- endif()
- 
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True, prefix='/usr'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
- INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
- 
- MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/createrepo_c.git/commitdiff/317621c24767398af6b7bab60c5497fe434a9715



More information about the pld-cvs-commit mailing list