---- deltarpm-3.6/Makefile 2015-02-01 13:27:11.084208113 +0200
-+++ deltarpm-3.6/Makefile 2015-02-01 13:26:31.965516931 +0200
+--- deltarpm-3.6.1/Makefile.orig 2018-05-12 13:26:28.431759384 +0200
++++ deltarpm-3.6.1/Makefile 2018-05-12 13:30:31.665089939 +0200
@@ -9,9 +9,8 @@
zlibcppflags=-I$(zlibdir)
pylibprefix=/
@@ -41,13 +46,13 @@
if [ ! -f "python$$PYVER/$@" ]; then \
mkdir -p python$$PYVER ;\
- $(CC) $(CFLAGS) $$PYCFLAGS $(zlibcppflag) -fPIC -c -o python$$PYVER/deltarpmmodule.o deltarpmmodule.c ;\
+ $(CC) $(CFLAGS) $$PYCFLAGS $(zlibcppflags) -fPIC -c -o python$$PYVER/deltarpmmodule.o deltarpmmodule.c ;\
- $(CC) $(LDFLAGS) -o python$$PYVER/$@ python$$PYVER/deltarpmmodule.o $^ -shared -Wl,-soname,_deltarpmmodule.so $(LDLIBS); \
+ $(CC) $(LDFLAGS) -o python$$PYVER/$@ python$$PYVER/deltarpmmodule.o $^ -shared -Wl,-soname,_deltarpmmodule.so $(LIBS) $$PYLDFLAGS; \
fi; \
$(zlibbundled):
- cd $(zlibdir) ; make CFLAGS="-fPIC $(CFLAGS)" libz.a
-+ cd $(zlibdir) ; make CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libz.a
++ cd $(zlibdir) ; make CPPFLAGS="$(CPPFLAGS)" CFLAGS="-fPIC $(CFLAGS)" LDFLAGS="$(LDFLAGS)" libz.a
clean:
rm -f *.o
+#
+# Conditional build:
+%bcond_without python3 # CPython3 module
+#
Summary: Create deltas between rpms
Summary(pl.UTF-8): Generowanie różnic między pakietami rpm
Name: deltarpm
-Version: 3.6
-Release: 4
+Version: 3.6.1
+Release: 1
License: BSD
Group: Base
-Source0: ftp://ftp.suse.com/pub/projects/deltarpm/%{name}-%{version}.tar.bz2
-# Source0-md5: 2cc2690bd1088cfc3238c25e59aaaec1
+#Source0Download: https://github.com/rpm-software-management/deltarpm/releases
+Source0: https://github.com/rpm-software-management/deltarpm/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: c48086229bdfcf5af890f104231180c6
Patch0: %{name}-3.4-no-skip-doc.patch
Patch1: %{name}-3.4-pld.patch
Patch2: %{name}-rpm5.patch
Patch3: python-install.patch
-URL: http://www.novell.com/products/linuxpackages/opensuse/deltarpm.html
+URL: https://github.com/rpm-software-management/deltarpm
BuildRequires: bzip2-devel
BuildRequires: popt-devel
-BuildRequires: python-devel
+BuildRequires: python-devel >= 2
+%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
BuildRequires: rpm-devel
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: rpmbuild(macros) >= 1.507
BuildRequires: xz-devel
BuildRequires: zlib-static
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
pakiety RPM.
%package -n python-deltarpm
-Summary: Python bindings for deltarpm
-Summary(pl.UTF-8): Wiązania Pythona do deltarpm
-Group: Base
+Summary: Python 2 bindings for deltarpm
+Summary(pl.UTF-8): Wiązania Pythona 2 do deltarpm
+Group: Libraries/Python
# does not require base package
%description -n python-deltarpm
-This package contains Python bindings for deltarpm.
+This package contains Python 2 bindings for deltarpm.
%description -n python-deltarpm -l pl.UTF-8
-Ten pakiet zawiera wiązania Pythona do deltarpm.
+Ten pakiet zawiera wiązania Pythona 2 do deltarpm.
+
+%package -n python3-deltarpm
+Summary: Python 3 bindings for deltarpm
+Summary(pl.UTF-8): Wiązania Pythona 3 do deltarpm
+Group: Libraries/Python
+# does not require base package
+
+%description -n python3-deltarpm
+This package contains Python 3 bindings for deltarpm.
+
+%description -n python3-deltarpm -l pl.UTF-8
+Ten pakiet zawiera wiązania Pythona 3 do deltarpm.
%prep
%setup -q
%patch2 -p1
%patch3 -p1
+%if %{without python3}
%{__sed} -i -e 's/python3//' Makefile
+%endif
%build
%{__make} \
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
+%if %{with python3}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/_deltarpmmodule.so
%{py_sitedir}/deltarpm.py[co]
+
+%if %{with python3}
+%files -n python3-deltarpm
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_deltarpmmodule.so
+%{py3_sitedir}/deltarpm.py
+%{py3_sitedir}/__pycache__/deltarpm.cpython-*.py[co]
+%endif