From 1eef87a364c23554ac2646972d939e993c43db28 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Wed, 9 Mar 2011 03:07:30 +0200 Subject: Port library-packages.mk to dhmk. --- qt-kde-team/2/library-packages.mk | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 qt-kde-team/2/library-packages.mk (limited to 'qt-kde-team') diff --git a/qt-kde-team/2/library-packages.mk b/qt-kde-team/2/library-packages.mk new file mode 100644 index 0000000..c5adbbc --- /dev/null +++ b/qt-kde-team/2/library-packages.mk @@ -0,0 +1,55 @@ +libpkgs_binver := $(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: //') +libpkgs_arch_pkgs := $(shell dh_listpackages -a) +libpkgs_subst_hooks := $(foreach t,binary-arch binary,pre_$(t)_dh_gencontrol) + +# All library packages +DEB_LIBRARY_PACKAGES := $(filter-out %-dev,$(filter lib%,$(libpkgs_arch_pkgs))) + +ifneq (,$(DEB_ALL_LIBRARIES_SUBST_PACKAGES)) + +libpkgs_allLibraries_subst := $(foreach pkg,$(DEB_LIBRARY_PACKAGES),$(patsubst %,% (= $(libpkgs_binver)),,$(pkg))) + +libpkgs_add_allLibraries: + echo 'allLibraries=$(libpkgs_allLibraries_subst)' | \ + tee -a $(foreach pkg,$(DEB_ALL_LIBRARIES_SUBST_PACKAGES),debian/$(pkg).substvars) > /dev/null + +$(libpkgs_subst_hooks): libpkgs_add_allLibraries +.PHONY: libpkgs_add_allLibraries + +endif + +# KDE 4.3 library packages +ifneq (,$(DEB_KDE43_LIBRARY_PACKAGES)) +ifneq (,$(DEB_KDE43_LIBRARIES_SUBST_PACKAGES)) + +libpkgs_kde43Libraries_subst := $(foreach pkg,$(DEB_KDE43_LIBRARY_PACKAGES),$(patsubst %,% (= $(libpkgs_binver)),,$(pkg))) + +libpkgs_add_kde43Libraries: + echo 'kde43Libraries=$(libpkgs_kde43Libraries_subst)' | \ + tee -a $(foreach pkg,$(DEB_KDE43_LIBRARIES_SUBST_PACKAGES),debian/$(pkg).substvars) > /dev/null + +$(libpkgs_subst_hooks): libpkgs_add_kde43Libraries +.PHONY: libpkgs_add_kde43Libraries + +endif +endif + +# Generate strict local shlibs if requested +ifneq (,$(DEB_STRICT_LOCAL_SHLIBS_PACKAGES)) + +libpkgs_gen_strict_local_shlibs: + foreach pkg in $(DEB_STRICT_LOCAL_SHLIBS_PACKAGES); do \ + if test -e debian/$$pkg/DEBIAN/shlibs; then \ + echo "Generating strict local shlibs for the '$$pkg' package ..."; \ + sed 's/>=[^)]*/= $(libpkgs_binver)/' debian/$$pkg/DEBIAN/shlibs >> debian/shlibs.local; \ + fi; \ + done + +libpkgs_clean_local_shlibs: + rm -f debian/shlibs.local + +$(foreach t,binary-arch binary,post_$(t)_dh_makeshlibs): libpkgs_gen_strict_local_shlibs +post_clean: libpkgs_clean_local_shlibs +.PHONY: libpkgs_gen_strict_local_shlibs libpkgs_clean_local_shlibs + +endif -- cgit v1.2.3