commit 3c3b1936907461c714da17b2070211fcc376fa9e
Author: Jan Palus <[email protected]>
Date:   Wed Sep 7 17:56:17 2022 +0200

    build/install python module with rpm macros

 criu-python.patch | 10 +++++-----
 criu.spec         |  7 ++++++-
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/criu.spec b/criu.spec
index 83bb1da..e314d94 100644
--- a/criu.spec
+++ b/criu.spec
@@ -121,6 +121,8 @@ Pythonowy interfejs do CRIU. Ten pakiet zawiera także 
narzędzie crit.
 
 %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns
 
+%{__ln_s} scripts/crit-setup.py setup.py
+
 %build
 %define _make_opts \\\
        DEB_HOST_MULTIARCH= \\\
@@ -130,13 +132,14 @@ Pythonowy interfejs do CRIU. Ten pakiet zawiera także 
narzędzie crit.
        LIBDIR=%{_libdir} \\\
        LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\
        LIBEXECDIR=%{_libexecdir} \\\
-       PYSITESCRIPTDIR=%{py3_sitescriptdir} \\\
        MANDIR=%{_mandir} \\\
        WERROR=0 \\\
        SUBARCH=%{_target_cpu} \\\
        V=1
 %{__make}
 
+%py3_build
+
 %if %{with tests}
 %{__make} test
 %endif
@@ -146,6 +149,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%py3_install
+
 install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
 
 # optional scripts, do not autogenerate bash dep
diff --git a/criu-python.patch b/criu-python.patch
index f0416cd..957c827 100644
--- a/criu-python.patch
+++ b/criu-python.patch
@@ -1,11 +1,11 @@
---- criu-2.3/lib/Makefile.orig 2016-06-14 10:41:17.000000000 +0200
-+++ criu-2.3/lib/Makefile      2016-06-24 19:03:15.652060689 +0200
-@@ -56,7 +56,7 @@
+--- criu-3.16/lib/Makefile.orig        2021-09-22 17:22:46.000000000 +0200
++++ criu-3.16/lib/Makefile     2022-09-07 18:06:41.703034934 +0200
+@@ -58,8 +58,6 @@
+       $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
        $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' 
-e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc
        $(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
-       $(E) "  INSTALL " crit
+-      $(E) "  INSTALL " crit
 -      $(Q) $(PYTHON) scripts/crit-setup.py install 
--prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
-+      $(Q) $(PYTHON) scripts/crit-setup.py install 
--prefix=$(DESTDIR)$(PREFIX) --install-purelib=$(DESTDIR)$(PYSITESCRIPTDIR) 
--optimize=2 --record $(CRIT_SETUP_FILES)
  .PHONY: install
  
  uninstall:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/criu.git/commitdiff/2123b4570eede9850dcba3252e9760e36676dd15

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to