diff options
author | Modestas Vainius <modestas@vainius.eu> | 2011-03-09 03:07:30 +0200 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2011-03-09 03:59:45 +0200 |
commit | 1eef87a364c23554ac2646972d939e993c43db28 (patch) | |
tree | c4712794950818289e02107f759611792bdff78c /qt-kde-team/2 | |
parent | 7821182e449171f7a2f7f17e3ac9c9f928a6b530 (diff) | |
download | pkg-kde-tools-1eef87a364c23554ac2646972d939e993c43db28.tar.gz |
Port library-packages.mk to dhmk.
Diffstat (limited to 'qt-kde-team/2')
-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 |