diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2022-04-21 14:15:05 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-04-21 14:16:49 +0200 |
commit | cfaca8188c485ae756f7d7f49fda1d9926d4652c (patch) | |
tree | ff1bb82ca08257b527fa4ba21b1eb55f14f1e17b /dilos/dependencies/sip4-tqt/debian/rules | |
parent | 4b875218b1608ac62b12e5274f0e68031c127d4c (diff) | |
download | tde-packaging-cfaca8188c485ae756f7d7f49fda1d9926d4652c.tar.gz tde-packaging-cfaca8188c485ae756f7d7f49fda1d9926d4652c.zip |
DEB sip4-tqt: Add packages for Python3 support.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'dilos/dependencies/sip4-tqt/debian/rules')
-rwxr-xr-x | dilos/dependencies/sip4-tqt/debian/rules | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/dilos/dependencies/sip4-tqt/debian/rules b/dilos/dependencies/sip4-tqt/debian/rules index 23fe587f0..b8e9fb809 100755 --- a/dilos/dependencies/sip4-tqt/debian/rules +++ b/dilos/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) @@ -49,7 +53,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="" \ -p solaris-g++ touch $@ @@ -60,7 +63,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 $@ @@ -85,12 +87,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, @@ -107,10 +111,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 @@ -142,17 +163,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 |