summaryrefslogtreecommitdiffstats
path: root/ubuntu/_base/dependencies/pytqt/debian/rules
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-12-17 13:51:35 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-01-08 20:21:33 +0900
commitf963f7aac5a1c2cd3f09dfb5dc14e16fc1f7c7a6 (patch)
treed59d2bc0c34b5d3cd839f33449b47f693dd7605a /ubuntu/_base/dependencies/pytqt/debian/rules
parent97521efd697ca8f9bde706a46b8a808852fdf9a5 (diff)
downloadtde-packaging-f963f7aa.tar.gz
tde-packaging-f963f7aa.zip
DEB pytqt: drop python2 support.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'ubuntu/_base/dependencies/pytqt/debian/rules')
-rwxr-xr-xubuntu/_base/dependencies/pytqt/debian/rules43
1 files changed, 8 insertions, 35 deletions
diff --git a/ubuntu/_base/dependencies/pytqt/debian/rules b/ubuntu/_base/dependencies/pytqt/debian/rules
index c9ff8c22f..08f03fd27 100755
--- a/ubuntu/_base/dependencies/pytqt/debian/rules
+++ b/ubuntu/_base/dependencies/pytqt/debian/rules
@@ -13,9 +13,13 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
+export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
export DH_OPTIONS
--include /usr/share/python/python.mk
+-include /usr/share/python3/python.mk
ifeq (,$(py_sitename))
py_sitename = site-packages
py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
@@ -37,10 +41,7 @@ else
endif
CXXFLAGS += "-I/usr/include/tqt"
-PYTHONS := $(shell pyversions -vr debian/control) $(shell py3versions -vd)
-
-DEB_PYTHON_SYSTEM = $(if $(wildcard /usr/bin/dh_python2),,pysupport)
-DH_PYTHON2 = $(if $(wildcard /usr/bin/dh_python2),dh_python2,dh_pysupport)
+PYTHONS := $(shell py3versions -vd)
DEB_PARALLEL_JOBS ?= 40
@@ -115,14 +116,6 @@ install-arch: build
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
- for i in $$(find debian/python-*-dbg -name '*.so'); do \
- b=$$(basename $$i .so); \
- mv $$i $$(dirname $$i)/$${b}_d.so; \
- done
- find debian/python-*-dbg ! -type d \
- ! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f
- find debian/python-*-dbg -depth -type d -empty -exec rmdir {} \;
-
for i in $$(find debian/python3-*-dbg -name '*.so'); do \
b=$$(basename $$i .so); \
mv $$i $$(dirname $$i)/$${b}_d.so; \
@@ -144,19 +137,6 @@ install-arch-3.%:
mv debian/python3-pytqt-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/PyTQt/qtext.so \
debian/python3-pytqtext-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/PyTQt/
-install-arch-%:
- $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp
- $(MAKE) -C dbg-build-$* install DESTDIR=$(CURDIR)/debian/python-pytqt-dbg
- mkdir -p debian/python-pytqt/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt
- cp -a debian/tmp/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/__init__.py \
- debian/python-pytqt/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/__init__.py
- mkdir -p debian/python-pytqt-gl-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt
- mv debian/python-pytqt-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/qtgl.so \
- debian/python-pytqt-gl-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/
- mkdir -p debian/python-pytqtext-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt
- mv debian/python-pytqt-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/qtext.so \
- debian/python-pytqtext-dbg/usr/lib/python$*/$(call py_sitename,$$version)/PyTQt/
-
clean:
dh_testdir
dh_testroot
@@ -178,8 +158,7 @@ binary-common:
ifeq (,$(findstring -i, $(DH_OPTIONS)))
DH_OPTIONS= dh_strip -ppytqt-tools
set -e; \
- for p in python-pytqt python-pytqt-gl python-pytqtext \
- python3-pytqt python3-pytqt-gl python3-pytqtext; do \
+ for p in python3-pytqt python3-pytqt-gl python3-pytqtext; do \
DH_OPTIONS= dh_strip -p$$p --dbg-package=$$p-dbg; \
rm -rf debian/$$p-dbg/usr/share/doc/$$p-dbg; \
ln -s $$p debian/$$p-dbg/usr/share/doc/$$p-dbg; \
@@ -188,14 +167,8 @@ endif
# dh_strip
dh_compress -X.py -X.bmp -X.ui -X.sql
dh_fixperms
-ifneq (dh_pysupport,${DH_PYTHON2})
- ${DH_PYTHON2} --no-dbg-cleaning
-else
- ${DH_PYTHON2}
-endif
dh_python3 --no-dbg-cleaning
- dh_sip_tqt
- dh_sip3_tqt
+ dh_py3sip_tqt
dh_lintian
dh_installdeb
dh_shlibdeps