summaryrefslogtreecommitdiffstats
path: root/dilos/dependencies/python-tqt/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'dilos/dependencies/python-tqt/debian/rules')
-rwxr-xr-xdilos/dependencies/python-tqt/debian/rules70
1 files changed, 50 insertions, 20 deletions
diff --git a/dilos/dependencies/python-tqt/debian/rules b/dilos/dependencies/python-tqt/debian/rules
index 7c6c39af2..f918e78c8 100755
--- a/dilos/dependencies/python-tqt/debian/rules
+++ b/dilos/dependencies/python-tqt/debian/rules
@@ -39,23 +39,18 @@ 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)
configure: $(PYTHONS:%=build-%/configure-stamp)
+
build-%/configure-stamp:
dh_testdir
mkdir -p build-$*
@@ -63,11 +58,12 @@ build-%/configure-stamp:
| 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 \
-m /usr/lib/python$*/config \
+ -z \
CXXFLAGS_RELEASE="" CXXFLAGS="${CXXFLAGS}" STRIP=""
touch $@
@@ -77,12 +73,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 \
-m /usr/lib/python$*/config_d \
+ -z \
CXXFLAGS_RELEASE="" CXXFLAGS="-O0 -g -I/usr/include/tqt" STRIP=""
touch $@
@@ -106,7 +102,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
@@ -117,18 +113,47 @@ 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; \
- mkdir -p debian/python-tqt/$$pylib;\
- cp -a debian/tmp/$$pylib/__init__.py \
- debian/python-tqt/$$pylib/__init__.py;\
+
+ for p in $(PYTHONS) ; do \
+ $(MAKE) -f debian/rules install-arch-$$p;\
done
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
+ 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
@@ -150,7 +175,12 @@ binary-common:
# 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