DEB tqt3: Change the library package name in case of incompatible ABI for 64-bit time_t.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/282/head
Slávek Banko 9 months ago
parent dd638fb71e
commit 5c660d4f01
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -25,6 +25,13 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
ifeq ($(DEB_TIME64_API),true)
DEB_TIME64_SUFFIX = -t64
else
DEB_TIME64_SUFFIX =
endif
# Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to # Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to
# never build in parallel, regardless of DEB_BUILD_OPTIONS. # never build in parallel, regardless of DEB_BUILD_OPTIONS.
DEB_BUILD_PARALLEL ?= true DEB_BUILD_PARALLEL ?= true
@ -44,7 +51,7 @@ endif #hurd
# build variables (directorys) # build variables (directorys)
DEBIAN = $(shell pwd)/debian DEBIAN = $(shell pwd)/debian
P_LIBS = $(DEBIAN)/libtqt3-mt P_LIBS = $(DEBIAN)/libtqt3-mt$(DEB_TIME64_SUFFIX)
P_DOC = $(DEBIAN)/tqt3-doc P_DOC = $(DEBIAN)/tqt3-doc
P_APPSDEV = $(DEBIAN)/tqt3-apps-dev P_APPSDEV = $(DEBIAN)/tqt3-apps-dev
P_HEADERS = $(DEBIAN)/libtqt3-headers P_HEADERS = $(DEBIAN)/libtqt3-headers
@ -139,6 +146,22 @@ endif
post-patches:: post-patches::
dh_testdir dh_testdir
ifeq ($(DEB_TIME64_API),true)
# update library package name for TIME64 ABI
ls -d debian/* | \
grep -E "/libtqt3-mt\." | \
grep -v "\.t64$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.t64 ] || \
(cp -a $$a debian/libtqt3-mt$(DEB_TIME64_SUFFIX).$${a##*.} && mv $$a $$a.t64); \
done
[ -f debian/control.t64 ] || \
sed -i.t64 \
-e "s/^\\(Package: libtqt3-mt\\)$$/\\1$(DEB_TIME64_SUFFIX)/" \
-e "s/^\\(Replaces\\|Breaks\\): \\(libtqt3-mt\\)\\( \|$$\)/\\1: \\2, \\2$(DEB_TIME64_SUFFIX)\\3/" \
-e "s/\\(libtqt3-mt\\) (=/\\1$(DEB_TIME64_SUFFIX) (=/" \
debian/control
endif
build build-arch: libqt-thread-stamp build build-arch: libqt-thread-stamp
build-indep: build-indep:
@ -224,6 +247,20 @@ clean::
dh_clean dh_clean
ifeq ($(DEB_TIME64_API),true)
# revert library package name for TIME64 ABI
ls -d debian/* | \
grep -E "\.t64$$" | \
while read a; do \
mv $$a $${a%.t64}; \
done
ls -d debian/* | \
grep -E "/libtqt3-mt$(DEB_TIME64_SUFFIX)\." | \
xargs -r rm
[ ! -f debian/control.t64 ] || \
mv debian/control.t64 debian/control
endif
install: build install: build
dh_testdir dh_testdir
@ -423,7 +460,7 @@ binary-arch: build install
dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html
# copy README.Debian # copy README.Debian
for a in libtqt3-mt-dev libtqt3-mt tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done for a in libtqt3-mt-dev libtqt3-mt$(DEB_TIME64_SUFFIX) tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done
# install the qmake binary # install the qmake binary
rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake
@ -460,7 +497,7 @@ binary-arch: build install
dh_makeshlibs -a $(IBASE) -V dh_makeshlibs -a $(IBASE) -V
dh_installdeb -a $(IBASE) dh_installdeb -a $(IBASE)
dh_perl -a $(IBASE) dh_perl -a $(IBASE)
dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt/usr/lib dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt$(DEB_TIME64_SUFFIX)/usr/lib
# fix shlibdeps madness # fix shlibdeps madness
for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done

@ -25,6 +25,13 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
ifeq ($(DEB_TIME64_API),true)
DEB_TIME64_SUFFIX = -t64
else
DEB_TIME64_SUFFIX =
endif
# Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to # Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to
# never build in parallel, regardless of DEB_BUILD_OPTIONS. # never build in parallel, regardless of DEB_BUILD_OPTIONS.
DEB_BUILD_PARALLEL ?= true DEB_BUILD_PARALLEL ?= true
@ -36,7 +43,7 @@ PLATFORM_ARG = dilos-g++
# build variables (directorys) # build variables (directorys)
DEBIAN = $(shell pwd)/debian DEBIAN = $(shell pwd)/debian
P_LIBS = $(DEBIAN)/libtqt3-mt P_LIBS = $(DEBIAN)/libtqt3-mt$(DEB_TIME64_SUFFIX)
P_DOC = $(DEBIAN)/tqt3-doc P_DOC = $(DEBIAN)/tqt3-doc
P_APPSDEV = $(DEBIAN)/tqt3-apps-dev P_APPSDEV = $(DEBIAN)/tqt3-apps-dev
P_HEADERS = $(DEBIAN)/libtqt3-headers P_HEADERS = $(DEBIAN)/libtqt3-headers
@ -131,6 +138,22 @@ endif
post-patches:: post-patches::
dh_testdir dh_testdir
ifeq ($(DEB_TIME64_API),true)
# update library package name for TIME64 ABI
ls -d debian/* | \
grep -E "/libtqt3-mt\." | \
grep -v "\.t64$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.t64 ] || \
(cp -a $$a debian/libtqt3-mt$(DEB_TIME64_SUFFIX).$${a##*.} && mv $$a $$a.t64); \
done
[ -f debian/control.t64 ] || \
sed -i.t64 \
-e "s/^\\(Package: libtqt3-mt\\)$$/\\1$(DEB_TIME64_SUFFIX)/" \
-e "s/^\\(Replaces\\|Breaks\\): \\(libtqt3-mt\\)\\( \|$$\)/\\1: \\2, \\2$(DEB_TIME64_SUFFIX)\\3/" \
-e "s/\\(libtqt3-mt\\) (=/\\1$(DEB_TIME64_SUFFIX) (=/" \
debian/control
endif
build build-arch: libqt-thread-stamp build build-arch: libqt-thread-stamp
build-indep: build-indep:
@ -230,6 +253,20 @@ clean::
dh_clean dh_clean
ifeq ($(DEB_TIME64_API),true)
# revert library package name for TIME64 ABI
ls -d debian/* | \
grep -E "\.t64$$" | \
while read a; do \
mv $$a $${a%.t64}; \
done
ls -d debian/* | \
grep -E "/libtqt3-mt$(DEB_TIME64_SUFFIX)\." | \
xargs -r rm
[ ! -f debian/control.t64 ] || \
mv debian/control.t64 debian/control
endif
install: build install: build
dh_testdir dh_testdir
@ -429,7 +466,7 @@ binary-arch: build install
dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html
# copy README.Debian # copy README.Debian
for a in libtqt3-mt-dev libtqt3-mt tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done for a in libtqt3-mt-dev libtqt3-mt$(DEB_TIME64_SUFFIX) tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done
# install the qmake binary # install the qmake binary
rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake
@ -466,7 +503,7 @@ binary-arch: build install
dh_makeshlibs -a $(IBASE) -V dh_makeshlibs -a $(IBASE) -V
dh_installdeb -a $(IBASE) dh_installdeb -a $(IBASE)
dh_perl -a $(IBASE) dh_perl -a $(IBASE)
dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt/usr/lib\ dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt$(DEB_TIME64_SUFFIX)/usr/lib\
--dpkg-shlibdeps-params=--ignore-missing-info --dpkg-shlibdeps-params=--ignore-missing-info
# fix shlibdeps madness # fix shlibdeps madness

@ -25,6 +25,13 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
ifeq ($(DEB_TIME64_API),true)
DEB_TIME64_SUFFIX = -t64
else
DEB_TIME64_SUFFIX =
endif
# Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to # Honour "parallel=N" option of DEB_BUILD_OPTIONS. Comment out to
# never build in parallel, regardless of DEB_BUILD_OPTIONS. # never build in parallel, regardless of DEB_BUILD_OPTIONS.
DEB_BUILD_PARALLEL ?= true DEB_BUILD_PARALLEL ?= true
@ -44,7 +51,7 @@ endif #hurd
# build variables (directorys) # build variables (directorys)
DEBIAN = $(shell pwd)/debian DEBIAN = $(shell pwd)/debian
P_LIBS = $(DEBIAN)/libtqt3-mt P_LIBS = $(DEBIAN)/libtqt3-mt$(DEB_TIME64_SUFFIX)
P_DOC = $(DEBIAN)/tqt3-doc P_DOC = $(DEBIAN)/tqt3-doc
P_APPSDEV = $(DEBIAN)/tqt3-apps-dev P_APPSDEV = $(DEBIAN)/tqt3-apps-dev
P_HEADERS = $(DEBIAN)/libtqt3-headers P_HEADERS = $(DEBIAN)/libtqt3-headers
@ -139,6 +146,22 @@ endif
post-patches:: post-patches::
dh_testdir dh_testdir
ifeq ($(DEB_TIME64_API),true)
# update library package name for TIME64 ABI
ls -d debian/* | \
grep -E "/libtqt3-mt\." | \
grep -v "\.t64$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.t64 ] || \
(cp -a $$a debian/libtqt3-mt$(DEB_TIME64_SUFFIX).$${a##*.} && mv $$a $$a.t64); \
done
[ -f debian/control.t64 ] || \
sed -i.t64 \
-e "s/^\\(Package: libtqt3-mt\\)$$/\\1$(DEB_TIME64_SUFFIX)/" \
-e "s/^\\(Replaces\\|Breaks\\): \\(libtqt3-mt\\)\\( \|$$\)/\\1: \\2, \\2$(DEB_TIME64_SUFFIX)\\3/" \
-e "s/\\(libtqt3-mt\\) (=/\\1$(DEB_TIME64_SUFFIX) (=/" \
debian/control
endif
build build-arch: libqt-thread-stamp build build-arch: libqt-thread-stamp
build-indep: build-indep:
@ -224,6 +247,20 @@ clean::
dh_clean dh_clean
ifeq ($(DEB_TIME64_API),true)
# revert library package name for TIME64 ABI
ls -d debian/* | \
grep -E "\.t64$$" | \
while read a; do \
mv $$a $${a%.t64}; \
done
ls -d debian/* | \
grep -E "/libtqt3-mt$(DEB_TIME64_SUFFIX)\." | \
xargs -r rm
[ ! -f debian/control.t64 ] || \
mv debian/control.t64 debian/control
endif
install: build install: build
dh_testdir dh_testdir
@ -423,7 +460,7 @@ binary-arch: build install
dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html dh_link -ptqt3-dev-tools usr/share/tqt3/doc/html usr/share/doc/tqt3-dev-tools/html
# copy README.Debian # copy README.Debian
for a in libtqt3-mt-dev libtqt3-mt tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done for a in libtqt3-mt-dev libtqt3-mt$(DEB_TIME64_SUFFIX) tqt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done
# install the qmake binary # install the qmake binary
rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake rm -rf `pwd`/debian/tqt3-dev-tools/usr/bin/tqmake
@ -460,7 +497,7 @@ binary-arch: build install
dh_makeshlibs -a $(IBASE) -V dh_makeshlibs -a $(IBASE) -V
dh_installdeb -a $(IBASE) dh_installdeb -a $(IBASE)
dh_perl -a $(IBASE) dh_perl -a $(IBASE)
dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt/usr/lib dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libtqt3-mt$(DEB_TIME64_SUFFIX)/usr/lib
# fix shlibdeps madness # fix shlibdeps madness
for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done

Loading…
Cancel
Save