summaryrefslogtreecommitdiff
path: root/qt-kde-team
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2011-03-09 03:07:30 +0200
committerModestas Vainius <modestas@vainius.eu>2011-03-09 03:59:45 +0200
commit1eef87a364c23554ac2646972d939e993c43db28 (patch)
treec4712794950818289e02107f759611792bdff78c /qt-kde-team
parent7821182e449171f7a2f7f17e3ac9c9f928a6b530 (diff)
downloadpkg-kde-tools-1eef87a364c23554ac2646972d939e993c43db28.tar.gz
Port library-packages.mk to dhmk.
Diffstat (limited to 'qt-kde-team')
-rw-r--r--qt-kde-team/2/library-packages.mk55
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