diff options
Diffstat (limited to 'qt-kde-team/2/library-packages.mk')
-rw-r--r-- | qt-kde-team/2/library-packages.mk | 55 |
1 files changed, 55 insertions, 0 deletions
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 |