summaryrefslogtreecommitdiffstats
path: root/ubuntu/_base/dependencies/python-tqt/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'ubuntu/_base/dependencies/python-tqt/debian/rules')
-rwxr-xr-xubuntu/_base/dependencies/python-tqt/debian/rules78
1 files changed, 50 insertions, 28 deletions
diff --git a/ubuntu/_base/dependencies/python-tqt/debian/rules b/ubuntu/_base/dependencies/python-tqt/debian/rules
index 9f597b2eb..40a5d1310 100755
--- a/ubuntu/_base/dependencies/python-tqt/debian/rules
+++ b/ubuntu/_base/dependencies/python-tqt/debian/rules
@@ -37,34 +37,29 @@ else
endif
CXXFLAGS += "-I/usr/include/tqt"
-PYTHONS := $(shell pyversions -vr debian/control)
+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)
-
-GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
-ifneq (,$(filter $(GCCVER),4.2 4.3))
- SPLIT=40
-else
- SPLIT=10
-endif
+DEB_PARALLEL_JOBS ?= 40
.PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp
configure: $(PYTHONS:%=build-%/configure-stamp) $(PYTHONS:%=dbg-build-%/configure-stamp)
+
build-%/configure-stamp:
dh_testdir
mkdir -p build-$*
cd build-$* && echo yes \
| python$* ../configure.py \
-c -n /usr/include/tqt3 \
- -e python$* \
- -o /usr/lib/$(DEB_HOST_MULTIARCH) -u -j $(SPLIT) \
+ -o /usr/lib/$(DEB_HOST_MULTIARCH) -u -j $(DEB_PARALLEL_JOBS) \
-d /usr/lib/python$*/$(call py_sitename,$*)/python_tqt \
-l /usr/include/python$* \
-v /usr/share/sip-tqt/tqt \
-m /usr/lib/python$*/config \
+ -z \
CXXFLAGS_RELEASE="" CXXFLAGS="${CXXFLAGS}" STRIP=""
touch $@
@@ -74,12 +69,12 @@ dbg-build-%/configure-stamp:
cd dbg-build-$* && echo yes \
| python$*-dbg ../configure.py \
-c -n /usr/include/tqt3 \
- -e python$* \
- -o /usr/lib/$(DEB_HOST_MULTIARCH) -u -j $(SPLIT) \
+ -o /usr/lib/$(DEB_HOST_MULTIARCH) -u -j $(DEB_PARALLEL_JOBS) \
-d /usr/lib/python$*/$(call py_sitename,$*)/python_tqt \
-l /usr/include/python$*_d \
-v /usr/share/sip-tqt/tqt \
-m /usr/lib/python$*/config_d \
+ -z \
CXXFLAGS_RELEASE="" CXXFLAGS="-O0 -g -I/usr/include/tqt" STRIP=""
touch $@
@@ -102,7 +97,7 @@ install-indep: configure
dh_clean -k -i
dh_installdirs -i
for version in ${PYTHONS}; do\
- pylib=$$(python$$version -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')/python_tqt; \
+ pylib=$$(python$$version -c 'from distutils import sysconfig; print (sysconfig.get_python_lib())')/python_tqt;\
mkdir -p debian/python-tqt-dev/$$pylib;\
install -m 644 -o root -g root build-$$version/pyqtconfig.py debian/python-tqt-dev/$$pylib;\
done
@@ -113,21 +108,9 @@ install-arch: build
dh_testroot
dh_clean -k -a
dh_installdirs -a
- for version in ${PYTHONS}; do \
- $(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\
- done
- for version in ${PYTHONS}; do \
- pylib=$$(python$$version -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')/python_tqt; \
- $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python-tqt-dbg;\
- mkdir -p debian/python-tqt/$$pylib;\
- cp -a debian/tmp/$$pylib/__init__.py \
- debian/python-tqt/$$pylib/__init__.py;\
- mkdir -p debian/python-tqt-gl-dbg/$$pylib;\
- mv debian/python-tqt-dbg/$$pylib/qtgl.so \
- debian/python-tqt-gl-dbg/$$pylib/;\
- mkdir -p debian/python-tqtext-dbg/$$pylib;\
- mv debian/python-tqt-dbg/$$pylib/qtext.so \
- debian/python-tqtext-dbg/$$pylib/;\
+
+ for p in $(PYTHONS) ; do \
+ $(MAKE) -f debian/rules install-arch-$$p;\
done
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
@@ -140,6 +123,40 @@ install-arch: build
! \( -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; \
+ done
+ find debian/python3-*-dbg ! -type d \
+ ! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f
+ find debian/python3-*-dbg -depth -type d -empty -exec rmdir {} \;
+
+install-arch-3.%:
+ $(MAKE) -C build-3.$* install DESTDIR=$(CURDIR)/debian/tmp
+ $(MAKE) -C dbg-build-3.* install DESTDIR=$(CURDIR)/debian/python3-tqt-dbg
+ mkdir -p debian/python3-tqt/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt
+ cp -a debian/tmp/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/__init__.py \
+ debian/python3-tqt/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/__init__.py
+ mkdir -p debian/python3-tqt-gl-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt
+ mv debian/python3-tqt-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/qtgl.so \
+ debian/python3-tqt-gl-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/
+ mkdir -p debian/python3-tqtext-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt
+ mv debian/python3-tqt-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/qtext.so \
+ debian/python3-tqtext-dbg/usr/lib/python3.$*/$(call py_sitename,$$version)/python_tqt/
+
+install-arch-%:
+ $(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp
+ $(MAKE) -C dbg-build-$* install DESTDIR=$(CURDIR)/debian/python-tqt-dbg
+ mkdir -p debian/python-tqt/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt
+ cp -a debian/tmp/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/__init__.py \
+ debian/python-tqt/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/__init__.py
+ mkdir -p debian/python-tqt-gl-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt
+ mv debian/python-tqt-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/qtgl.so \
+ debian/python-tqt-gl-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/
+ mkdir -p debian/python-tqtext-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt
+ mv debian/python-tqt-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/qtext.so \
+ debian/python-tqtext-dbg/usr/lib/python$*/$(call py_sitename,$$version)/python_tqt/
+
clean:
dh_testdir
dh_testroot
@@ -170,7 +187,12 @@ 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_lintian
dh_installdeb