summaryrefslogtreecommitdiffstats
path: root/ubuntu/_base/dependencies/sip4-tqt/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'ubuntu/_base/dependencies/sip4-tqt/debian/rules')
-rwxr-xr-xubuntu/_base/dependencies/sip4-tqt/debian/rules34
1 files changed, 29 insertions, 5 deletions
diff --git a/ubuntu/_base/dependencies/sip4-tqt/debian/rules b/ubuntu/_base/dependencies/sip4-tqt/debian/rules
index 1b07c97d2..bee7971c1 100755
--- a/ubuntu/_base/dependencies/sip4-tqt/debian/rules
+++ b/ubuntu/_base/dependencies/sip4-tqt/debian/rules
@@ -14,6 +14,10 @@ endif
export DH_OPTIONS
+PY2_PROVIDES=sip-tqt-api-7.0, sip-tqt-api-7.1
+PY3_PROVIDES=sip-tqt-py3api-7.0, sip-tqt-py3api-7.1
+PYDIST=sip $(shell python -c "a=[i.strip() for i in '$(PY3_PROVIDES)'.split(',')]; print sorted(a, reverse=True)[0]")
+
INSTDIR=$(CURDIR)/debian
CFLAGS=
@@ -24,7 +28,7 @@ else
CFLAGS += -O2 -g
endif
-PYTHONS := $(shell pyversions -vr debian/control)
+PYTHONS := $(shell pyversions -vr) $(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)
@@ -48,7 +52,6 @@ build-%/configure-stamp:
cd build-$* \
&& python$* ../configure.py \
-d /usr/lib/python$*/$(call py_sitename,$*) \
- -g python$* \
-u STRIP="" CFLAGS="${CFLAGS} -I/usr/include/tqt -I/usr/include/tqt3 -I/usr/include/qt3" CFLAGS_RELEASE="" CXXFLAGS="${CFLAGS} -I/usr/include/tqt -I/usr/include/tqt3 -I/usr/include/qt3" CXXFLAGS_RELEASE=""
touch $@
@@ -58,7 +61,6 @@ dbg-build-%/configure-stamp:
cd dbg-build-$* \
&& python$*-dbg ../configure.py \
-d /usr/lib/python$*/$(call py_sitename,$*) \
- -g python$* \
-e /usr/include/python$*_d \
-u CFLAGS="-O0 -g -I/usr/include/tqt -I/usr/include/tqt3 -I/usr/include/qt3" CFLAGS_RELEASE="" CXXFLAGS="-O0 -g -I/usr/include/tqt -I/usr/include/tqt3 -I/usr/include/qt3" CXXFLAGS_RELEASE="" STRIP=""
touch $@
@@ -81,12 +83,14 @@ clean:
dh_testdir
dh_testroot
rm -rf *-stamp siputils.pyc $(PYTHONS:%=build-%) $(PYTHONS:%=dbg-build-%)
- dh_clean
+ dh_clean debian/python3-sip.pydist
install-arch: build
dh_testdir
dh_testroot
dh_prep -a
+ echo "python:Provides=$(PY2_PROVIDES)" >> debian/python-sip-tqt.substvars
+ echo "python3:Provides=$(PY3_PROVIDES)" >> debian/python3-sip-tqt.substvars
dh_installdirs -a
# This is needed to enforce that the install-arch-% rules are
# not run in parallel. Both rules install into the same directory,
@@ -103,10 +107,27 @@ install-arch: build
done
find debian/python-sip-tqt-dbg ! -type d ! -name '*_d.*' | xargs rm -f
find debian/python-sip-tqt-dbg -depth -empty -exec rmdir {} \;
+ find debian/python3-sip-tqt-dbg ! -type d ! -name '*_d.*' | xargs rm -f
+ find debian/python3-sip-tqt-dbg -depth -empty -exec rmdir {} \;
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
install -m 755 -o root -g root debian/dh_sip_tqt debian/python-sip-tqt-dev/usr/bin
+install-arch-3.%:
+ $(MAKE) -C build-3.$* install DESTDIR=$(CURDIR)/debian/tmp
+ $(MAKE) -C dbg-build-3.$* install DESTDIR=$(CURDIR)/debian/python3-sip-tqt-dbg
+ mkdir -p debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/
+ install -m 644 -o root -g root debian/sip_tqt_config_py3.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config.py
+ install -m 644 -o root -g root build-3.$*/sip_tqt_config.py debian/python3-sip-tqt/usr/lib/python3.$*/dist-packages/sip_tqt_config_nd.py
+ install -m 644 -o root -g root dbg-build-3.$*/sip_tqt_config.py debian/python3-sip-tqt-dbg/usr/lib/python3.$*/dist-packages/sip_tqt_config_d.py
+ mkdir -p debian/python3-sip-tqt-dev/usr/include/python3.$*
+ install -m 644 -o root -g root siplib/sip-tqt.h debian/python3-sip-tqt-dev/usr/include/python3.$*/
+ mkdir -p debian/python3-sip-tqt-dev/usr/include/python3.$*_d
+ ln -s ../python3.$*/sip-tqt.h \
+ debian/python3-sip-tqt-dev/usr/include/python3.$*_d/sip-tqt.h
+ mkdir -p debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages
+ install -m 644 -o root -g root sip_tqt_distutils.py debian/python3-sip-tqt-dev/usr/lib/python3.$*/dist-packages
+
install-arch-%:
$(MAKE) -C build-$* install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C dbg-build-$* install DESTDIR=$(CURDIR)/debian/python-sip-tqt-dbg
@@ -138,17 +159,20 @@ binary-common:
ifneq (,$(findstring -a, $(DH_OPTIONS)))
DH_OPTIONS= dh_strip -ppython-sip-tqt-dev
DH_OPTIONS= dh_strip -ppython-sip-tqt -Npython-sip-tqt-dev --dbg-package=python-sip-tqt-dbg
+ DH_OPTIONS= dh_strip -ppython3-sip-tqt-dev
+ DH_OPTIONS= dh_strip -ppython3-sip-tqt -Npython3-sip-tqt-dev --dbg-package=python3-sip-tqt-dbg
rm -rf debian/python-sip-tqt-dbg/usr/share/doc/python-sip-tqt-dbg
mkdir -p debian/python-sip-tqt-dbg/usr/share/doc
ln -s python-sip-tqt debian/python-sip-tqt-dbg/usr/share/doc/python-sip-tqt-dbg
endif
- dh_compress
+ dh_compress -X.inv
dh_fixperms
ifneq (dh_pysupport,${DH_PYTHON2})
${DH_PYTHON2} --no-dbg-cleaning
else
${DH_PYTHON2}
endif
+ dh_python3
dh_installdeb
dh_shlibdeps
dh_gencontrol